setPixmap cause assertion?
Hi all,
I have a QDialog derived class and in the constructor i load pixmap onto a QLabel
Code:
sLcgsDir.sprintf("%s\\UI\\Images",getenv("IGTS_DATA_FOLDER_PATH"));
lqpm.load(sLcgsDir+"\\welcome_IGTS.jpg");
mainPixmapLabel->setPixmap(lqpm);
this dialog is the mainwidget of the application , and when i close it to exit the application i get into an assertion in dbgDel.cpp on this line
Code:
_ASSERTE(_BLOCK_TYPE_IS_VALID(pHead->nBlockUse));
if i comment the load , or load an empty Pixmap the assertion does not happen.
Can you please assist?
I use QT 3.3.5 On WinXP
Thanks
Yariv
Re: setPixmap cause assertion?
What is the value of sLcgsDir when you get that assertion? What does QPixmap::load() return?
Could you post the backtrace?
Re: setPixmap cause assertion?
I get the assertion when exiting the application
Code:
HEAP[CPDM.exe]: Invalid Address specified to RtlValidateHeap( 02E70000, 02FD9108 )
Unhandled exception at 0x7c901230 in CPDM.exe: User breakpoint.
First-chance exception at 0x1020a752 (msvcr71d.dll) in CPDM.exe: 0xC0000005: Access violation reading location 0x05fa92b0.
Unhandled exception at 0x1020a752 (msvcr71d.dll) in CPDM.exe: 0xC0000005: Access violation reading location 0x05fa92b0.
the value of sLcgsDir is a valid path , QPixmap::load() returns true , the pixmap displays ok
The problem is when exititing the application there is an assertion.
If i remark the QPixmap::load() command or load an empty pixmap , i don't recive this assertion on exit
Re: setPixmap cause assertion?
The backtrace is too short to judge anything from it. Perhaps you should compile your application in debug mode and try again to get more info?
Either you destruct something twice or corrupt the heap in some way, or there's some problem in the way Qt handles that image. Does it crash when you load some other image?