Skip to content

Possible inter-locking problem on GUI send button OnClick #3039

@fakatwork

Description

@fakatwork

Version

2.1.20

Hardware / Firmware

GRBL 1.1

What happened

I'm using a rather faulty mouse that somehow can issue very short double-clicks (or rather rapid fire successive clicks) when I click it once, but the fault is intermittent.

I've been getting "cannot start filestream" errors lately, with the exception message saying "stream already started".

I'm wondering if it's not a re-entrancy problem in the Send button OnClick handler. Like it receives the first event, starts the program, but somehow it has a second event queued already and thus is able to re-enter the event handler before the button control is disabled on the GUI.

That's my theory at least. When the error happens the machine stops after it has exhausted its commands buffer, but it is still controllable. But the Send button stays disabled on the GUI. I usually manage to go to zero + safe height, then I disconnect and reconnect and manually enter the machine position, and re-start the program from scratch.

Maybe some re-entrancy protection in the handler would not hurt? Like setting a flag once at the start of the handler (and only clearing it OnStop) plus having a check to exit the handler if it tries to execute with the flag already set. Oh well, provided it's really the problem.

How to reproduce

No response

Operating System

No response

Anything else

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions