View previous topic :: View next topic |
Author |
Message |
DanRRight
Joined: 10 Mar 2008 Posts: 2819 Location: South Pole, Antarctica
|
Posted: Fri Apr 18, 2008 8:14 am Post subject: debugger crash |
|
|
Please remind me one thing I always forget with time. How to return back to debugger during the run of the program under sdbg ?
Also, I am fighting now whole day with some obscure bug which causes code and debugger to crash not leaving me any info about what line causes it. I see or the message that illegal floating point instruction took place or logarithm function is negative. Or degugger switches to assembler mode with no info at which subroutine this happen. Any ideas how to make debugeer be normally working?
I have tried many switches, increased the stack to almost 2 GB but this happen. Most probabe reason is iverflow of some single precision variable somwhere, but I have 50 thousand of them and the code is huge, so step by step execution will take hours... |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Fri Apr 18, 2008 3:49 pm Post subject: |
|
|
You should ensure that all of your code is compiled using /checkmate (or something similar). Then load your program into SDBG and click on the run button. It should then halt at the point in the code where the problem arises.
Chances are that you have omitted to use debugging options in some of your routines.
You should get a interactive dialog box when the program is just number crunching. |
|
Back to top |
|
|
Robert
Joined: 29 Nov 2006 Posts: 445 Location: Manchester
|
Posted: Fri Apr 18, 2008 9:52 pm Post subject: |
|
|
Does the debugger crash as the program loads or when the floating point exception happens? |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2819 Location: South Pole, Antarctica
|
Posted: Sat Apr 19, 2008 7:46 am Post subject: |
|
|
Wow...I think this was Salford own problem. The program crashed at
call scale_font@(SizeFontXaxis)
SizeFontXaxis was equal 1.2 and after 150 calls the font went to crazy size (and I did not see it, it was out of screen scale) and crashed compiler... |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Sat Apr 19, 2008 8:04 am Post subject: |
|
|
scale_font@ takes the dimensions of the existing font for the drawing surface and scales it up or down depending on the argument.
If you call this routine repeatedly with an argument greater than one then the font will continue to grow. The exception is probably raised during a resulting call to a Windows API function. |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2819 Location: South Pole, Antarctica
|
Posted: Sat Apr 19, 2008 9:04 am Post subject: |
|
|
Thanks all for the suggestions.
One thing, please remind me this debugger feature: how to return back to debugger during the run of the program ? I mean, how to interrupt the run of the program (when it is in windows mode made with Clearwin+) and go back to the debugger ? |
|
Back to top |
|
|
Robert
Joined: 29 Nov 2006 Posts: 445 Location: Manchester
|
Posted: Sat Apr 19, 2008 1:10 pm Post subject: |
|
|
The best way is to alt-tab back to the debugger and press the 'pause' button (or break in Visual Studio). |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2819 Location: South Pole, Antarctica
|
Posted: Mon Apr 21, 2008 2:21 am Post subject: |
|
|
I remember there was a key combination for this. Pressing on "Pause" button almost always causes the debugger fall into the assembler and crash - (weakest point of the sdbg) |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Mon Apr 21, 2008 7:24 am Post subject: |
|
|
You will end up in assembler if the break point is in code that has not be compiled with one of the FTN95 (or SCC) debugging options. This could be your own code or someone else's DLL.
You should still be able to see the call stack to see where you are. |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2819 Location: South Pole, Antarctica
|
Posted: Tue Apr 22, 2008 6:53 am Post subject: |
|
|
No, I always compile all subroutines with /check when debug.
BUT I AFRAID TO PUSH "Pause" button on the debugger,
you never know if debugger will crash into assembler (basically, completely, you have to drop this and start new debugger session after that) or not.
The key combination (anyone knows it ?) though always returned me to from running code to debugger without crash but I again forgot it...What is it, folks ? |
|
Back to top |
|
|
|