Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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: 13975
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: Mon Apr 29 13:40:10 CEST 2024

Total time taken to generate the page: 0.02329 seconds