Repository navigation
Closed
Labels
bugSomething isn't workingpriority: highFix soon; user-facing safety or correctness impactsafetyClick-safety behavior (stop paths, limits, failsafe)
Description
Summary
With Advanced → Enable click queuing turned on, pressing Stop (F7) does not stop clicking, and every run after the first never clicks at all. For an input-automation tool, "Stop doesn't stop" is the most serious class of bug.
Why it matters
- Stop/F7 returns, the UI shows "Stopped", but the queue processor keeps firing queued clicks for seconds afterwards.
- After the first stop the processor thread is gone but
enable_queuingstaysTrue, so the next Start silently enqueues into a queue nobody drains — zero clicks, thendropped_click_countclimbs. - The queue path bypasses the safety design: a
SafetyErrorfrom the failsafe corner inside the processor is caught and logged (click_engine.py:284), soon_safety_stopnever fires; pause-when-unfocused only gates enqueueing, not execution.
Evidence
autoclicker/core/click_engine.py:237-253—_stop_queue_processor()(non-emergency path) appends a sentinel behind pending work,join(timeout=1.0), then setsqueue_processor_thread = Nonewhether or not the thread actually exited.stop_clicking()(:287) calls_stop_queue_processor()withoutdrop_pending=True.- Nothing restarts the processor on the next
start_clicking(); the GUI checkbox (gui/sections/advanced.py:71,main_window.py:377) still shows queuing enabled.
Reproduced with mocked pyautogui (interval 0, queuing on):
clicks at stop 188 clicks 1.5s after stop returned 276
queue run1 clicks 19 run2 clicks 0 queued 15 proc None
Suggested approach
The queue adds latency and failure modes without a real benefit for a single-target clicker (the click loop is already a dedicated thread, and docs/PERFORMANCE.md doesn't show a win). Preferred: remove the queue feature (engine code, checkbox, README/ARCHITECTURE references). If it must stay:
- Every stop path drops pending work, and the processor checks
_stop_eventbefore each click. - Start (re)launches the processor when
enable_queuingis set. - Processor routes
SafetyError/failsafe to_trigger_safety_stopand honours pause-when-unfocused at execution time.
Done when
- No clicks are emitted after
stop_clicking()/emergency_stop()returns (regression test). - Consecutive start/stop cycles behave identically with or without the option (or the option no longer exists).
docs/ARCHITECTURE.mdstop-path table updated.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingpriority: highFix soon; user-facing safety or correctness impactsafetyClick-safety behavior (stop paths, limits, failsafe)
Activity