Forum > Debugger

Unable to debug issue

(1/2) > >>

Tony Stone:
So I am having this problem in my program that seems to have popped up out of no where.  When i run it in release mode I get a range check error as my main form loads.  If i run it in debug mode i get no errors... however SOMETIMES in debug mode it seems to take 10 plus minutes to load.  All the while freezing my PC.  Mouse becomes stuck and hard drive flashes away.  This is on Linux Mint with Lazarus RC 2.2.0RC1

I don't know how to go about debugging this issue because it doesn't crash when running in debug mode.

I am using the forms sessionProperties with an XML prop storage component.  It has always worked great.  BUT, I have this feeling the issue may be there as none of my session properties load when this happens now.

Is there some other debugger tools I can try and use?

Thanks for any help and direction.  I hope I provided enough info to get started with solving this.

Martin_fr:
You may have an uninitialized value....

- Check the warnings and notes that the compiler issues.
- debug using the -gt option (also -gtt and -gttt and -gtttt). 4 debug runs, with 1 to 4 "t".

You can also try to run in valgrind. Compile with -gv

valgrind --tool=memcheck  yourapp

Note, running in valgrind is slow. Seriously slow. But often worth it.

Tony Stone:

--- Quote from: Martin_fr on August 22, 2021, 09:12:32 pm ---You may have an uninitialized value....

- Check the warnings and notes that the compiler issues.
- debug using the -gt option (also -gtt and -gttt and -gtttt). 4 debug runs, with 1 to 4 "t".

You can also try to run in valgrind. Compile with -gv

valgrind --tool=memcheck  yourapp

Note, running in valgrind is slow. Seriously slow. But often worth it.

--- End quote ---

Ok, so i went into my projects debugger options.  I did find the valgrind option but i am not seeing the -gt and -gttt options...  Where would i find those?

Martin_fr:
The simple "gt" is on the same page "trash variables"

For the -gtt... there is a "custom options" where you can add this.

If you write -gtt in the custom opts, then do not check the simple -gt. In the end all the "t" are added, and giving -gt and -gtt at the same time is the same as -gttt (3 t).

Tony Stone:
THANK YOU THANK YOU!

You were right... an uninitialized variable!  :-[

So I fixed that issue for now... but I think I am also finding other issues now with these debugger settings. 

Again, THANKS for the responsiveness!  The Lazarus forums truly have some of the best people in all of internet forum history...


--- Quote from: Martin_fr on August 22, 2021, 09:29:32 pm ---The simple "gt" is on the same page "trash variables"

For the -gtt... there is a "custom options" where you can add this.

If you write -gtt in the custom opts, then do not check the simple -gt. In the end all the "t" are added, and giving -gt and -gtt at the same time is the same as -gttt (3 t).

--- End quote ---

Navigation

[0] Message Index

[#] Next page

Go to full version