On 02/08/2024 17:53, Michael Van Canneyt via lazarus wrote:
Hi,
Does lazarus (or gdb) start a binary twice sometimes when initializing
debugging ?
...
When I kill the prior process, the second F9 works at once, as do all
other
attempts to run it.
But if I stop the IDE and restart it, I have the same behaviour again:
first
attempt to run fails.
In the anchordockingdsgn IDE, when I switch project, run the new
project and then return to the first project (which could not be
debugged), all works again OK.
What is puzzling is that this only happens with the IDE that has
anchordocking enabled.
If I recompile the IDE after removing the anchordocking package,
debugging works
at once.
I don't think it is the debugger (neither of them). Except, if the IDE
would internally start 2 instance of the debugger (then there would
likely be mem leaks on exit).
I don't know if it is anything to do with ... but with anchordocking, I
have seen some keystrokes been send to the wrong control. The questions
then would be: Could a keystroke (F9) be duplicated? If the IDE received
two times F9 in a short enough time, would there be a race condition
were the first is in progress, but hasn't flagged the state internally,
so the 2nd would also go ahead?
(If that happens, and if that happens with the gdb backend, then there
would have to be 2 instances of gdb.exe running. Assuming that both runs
were triggered as "with debugger" and not one "without debugger")
Otherwise maybe the output of the IDE to console does have hints.
----
Of course, I assume you ensured that before you tried to start, there
wasn't any old instance already.
--
_______________________________________________
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus