U++ framework
Do not panic. Ask here before giving up.

Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » How to inspect memory at pointer-address while debugging
Re: How to inspect memory at pointer-address while debugging [message #52022 is a reply to message #52021] Sat, 06 July 2019 08:38 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
slashupp wrote on Fri, 05 July 2019 16:11
Eventually found the cause for my segfault..
I used three global string-vars that got set by some classes and used elsewhere
for context-data.
For some reason the system tried to free their memory twice (found by single-stepping with gdb)
I moved them to their own class and used getter/setters for access and passed a pointer to this
class around, and the segfault went away.
Took days to find & fix...
Lesson learned: try to avoid global variables!
Hope this will help someone with similar symptoms


Interesting. Usually it works fine and it would be good to know exact circumstances....

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: log-file is empty
Next Topic: Compiling Fortran sources in TheIde
Goto Forum:
  


Current Time: Thu Oct 01 13:29:35 GMT+2 2026

Total time taken to generate the page: 0.01159 seconds