Skip to content

[gui] Task execution finishes too quickly causing incomplete termination or stuck waiting state #2682

@z2010643575

Description

@z2010643575

Issue details

Summary
When a stage contains lightweight text file reading tasks that complete almost instantly,
the stopExecution() method may never be called, and the main thread gets stuck in waitTermination().

Steps to Reproduce

Create a stage with one or more very fast text file reading tasks.

Run the task pipeline sequentially (ExecType.SEQUENTIAL).

Observe that the UI or waiting loop never exits (waitTermination(Supplier cancelCheck) loop continues indefinitely).

Expected Behavior
stopExecution() should always be invoked even when tasks complete immediately.

Actual Behavior
The loop never terminates due to a timing race — the task finishes before internal state updates occur.

Temporary Workaround
Add a small delay (Thread.sleep(200)) before executing each task inside wrapTask(Runnable task) to prevent the race condition.
This is my current workaround, but I’d appreciate a better or more proper fix from your side.

Image

Jadx version

1.5.3

Java version

21.0.6 2025-01-21 LTS

OS

  • Windows
  • Linux
  • macOS

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions