[Qt-interest] help tracking down memory corruption on Mac Qt 4.7.3 Cocoa (64 bit)

Robert Escott robert at binarylogic.co.za
Tue May 24 00:16:27 CEST 2011


These symptoms sound exactly like a problem I had earlier this month.

My problem turned out to be nothing to do with the QWidget or QHash 
problems. It turned out to be a double deletion of one of the data 
members of my Model. I'd not properly implimented the asignment operator 
on one of the data members so incorrect referencing was causing data to 
be deleted. The model wasn't expecting this so it was trying to 
reference deleted data. That's when the random crashing occurred.

Go through all your data members' destructors, copy constructors and 
assignments to double-check all the referencing and deletions are 
occurring correctly.

Rob

On 23/05/2011 23:39, Paul Miller wrote:
> I've got a very bizarre memory corruption issue, with an application I'm
> developing. Using Qt 4.7.3, Cocoa, 64 bit, on OS X, the app will crash
> at various places, sometimes during startup, sometimes during shut-down.
> If I build against 32 bit Carbon, the problem doesn't happen.
>
> Most of the time it's crashing down in a QGLWidget, but the place moves
> around. Usually when deleting things. If I comment out the entire view,
> the application will run properly (though without the functionality I
> commented out)
>
> I've enabled various Debug Malloc env vars to help narrow down the
> problem. Are there any other OS X tools I can use to potentially help
> figure out the exact point at which the memory is getting corrupted? Any
> ideas?
>
> I really don't want to switch to a Carbon (32 bit) version of Qt to work
> around this but I'm running out of time.
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>




More information about the Qt-interest-old mailing list