Recent

Author Topic: Locked with Stop and Run active  (Read 9646 times)

Ruptor

  • Full Member
  • ***
  • Posts: 184
Re: Locked with Stop and Run active
« Reply #15 on: January 31, 2013, 12:22:05 am »
Good news for you or maybe not. I managed to lock Lazarus again with the log file running. It looks like a Lazarus problem to me since it is induced by press F9 at the wrong time when a run has been already initiated. I notice that the green and red are on in the break state too so perhaps the second F9 is being allowed during the program start period before the form appears where the red and green buttons are in the same state as if the program is held in a break state before starting. Just a thought. Any way the locked state is entered when F9 is pressed more than once but I think it has to be at the right time too because it took me several attempts to create the problem. OOPs the log is too big so I will try and send it on your email but if you don't get it can you send me an email to reply on.
Thanks
ps: can't see email in post any more. That's weird system said Laz2.txt was too large but it has taken it and it is the last half of the log.
« Last Edit: January 31, 2013, 12:46:14 am by Ruptor »

Ruptor

  • Full Member
  • ***
  • Posts: 184
Re: Locked with Stop and Run active
« Reply #16 on: January 31, 2013, 12:47:19 am »
Here is the first half then if it gets loaded.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 6374
    • wiki
Re: Locked with Stop and Run active
« Reply #17 on: January 31, 2013, 02:36:41 am »
Ok, thanks for the log.
I am still reading the log. That will take a while, and I may have to split this over a few days.

Indeed the "no register" is not the issue. It is entirely recovered. The IDE sends a command at the wrong time, gdb gives the error, and both are happy. (The IDE deals correctly with  that error). Anyway that all happens after a normal exit of the debugged app.
And that is already fixed, but only in 1.1. I will review it for future 1.0.x and decide if it gets merged.

Anyway, this is not the problem you have.

This also means, you can probably go back to gdb 7.2.
But as long as the newer one does the job, it's fine.

I will get back, as soon as I finished with the log

wjackson153

  • Sr. Member
  • ****
  • Posts: 267
Re: Locked with Stop and Run active
« Reply #18 on: January 31, 2013, 07:48:56 am »
Can you not compress the file before uploading it, to
reduce the file size ?
Lazarus 1.1 r39490 CT FPC 2.7.1 i386-linux KDE
Linux Mint 14 KDE 4

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 6374
    • wiki
Re: Locked with Stop and Run active
« Reply #19 on: January 31, 2013, 12:36:05 pm »
Good news for you or maybe not. I managed to lock Lazarus again with the log file running. It looks like a Lazarus problem to me since it is induced by press F9 at the wrong time when a run has been already initiated.

Almost.
Actually you managed to press F9 while the debugger was still finishing the last debug session.

That is you hit stop, killing the debugged app. Then the debugger indicates readiness for the next F9. But it is not yet. It still takes 1 or 2 seconds to shut down.

I know, you recompiled in that time, so it was maybe longer than 1 or 2 sec. But the debugger does not do anything while the compiler runs.
Normally you also can not compile while the debugger is active. But as indicated there seems to be a tiny moment at the end of a debug session.



Ruptor

  • Full Member
  • ***
  • Posts: 184
Re: Locked with Stop and Run active
« Reply #20 on: January 31, 2013, 03:09:44 pm »
I quite often edit the code and forget it is still running. When fiddling with values things can happen fast like hitting CTRL F9 then OK then F9 immediately hence the problem showed up under these conditions. FYI my background is real time embedded software and hardware not this high level stuff.

WJ I haven’t zipped this up for ages and it never crossed my mind but I thought of it after sending you my project. I assume the log would be unchanged by zipping.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 6374
    • wiki
Re: Locked with Stop and Run active
« Reply #21 on: January 31, 2013, 03:27:00 pm »
I quite often edit the code and forget it is still running.
The IDE actually supports that. You will see that the blue dots (indicatig lines with executable code in the current exe) move. In most cases the IDE gets them right. (Except if you join lines and then insert new lines again)

Breakpoints will still be correct too.

Quote
When fiddling with values things can happen fast like hitting CTRL F9 then OK then F9 immediately hence the problem showed up under these conditions.

Yep, the IDE needs to bi fixed.


Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 6374
    • wiki
Re: Locked with Stop and Run active
« Reply #22 on: January 31, 2013, 04:58:56 pm »
Ok, more details on how to reproduce, and how to avoid.

If the debugger is:
- running,
- and the debugged app is NOT paused (not at a breakpoint or stepping)
- and you choose "build" or "compile"
=> then a dialog will pop up "Can't compile while debugging. Stop Debugger?".
If you press:
-  yes,
- and then press F9 (or run), right after the compiler finishes (F9 is ignored, while the compiler runs),
=> then you will hang the debugger.

* Menu: "Run" > "Reset debugger" will fix the problem

* Using "stop" first and then build, is save

* Selecting "Build" or "compile" while the debugger is paused is also save.
The dialog, will show, and you can select "yes"  and hit F9 as often and as quick as you can.

---
 "stop" is  ctrl-F2. Using that first, also saves you from confirming the dialog
« Last Edit: January 31, 2013, 05:01:31 pm by Martin_fr »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 6374
    • wiki
Re: Locked with Stop and Run active
« Reply #23 on: January 31, 2013, 05:21:40 pm »
Given those findings, I also highly recommend to restore GDB 7.2

 

TinyPortal © 2005-2018