Re: Error Exiting slot calls
Man,without showing us the code we can only guess and suspect,but cannot help you.I suspect some incorrect memory manage (you seem to delete some pointer too early,or use one without initializing it),but untill I see whole code I can't tell you more
1 Attachment(s)
Re: Error Exiting slot calls
Qt does it own memory management correct? then how am I deleting too soon?
(I promise you its not accessing something that is uninitialized, and I delete nothing, and only new as needed.)
mlock.c
Code:
void __cdecl _unlock (
int locknum
)
{
/*
* leave the critical section.
*/
LeaveCriticalSection( _locktable[locknum].lock );
BP-->}
Or in malloc.c
Code:
#ifdef _WIN64
return HeapAlloc(_crtheap, 0, size ? size : 1);
#else /* _WIN64 */
if (__active_heap == __SYSTEM_HEAP) {
BP--> return HeapAlloc(_crtheap, 0, size ? size : 1);
} else
if ( __active_heap == __V6_HEAP ) {
if (pvReturn = V6_HeapAlloc(size)) {
return pvReturn;
one weird thing is 2 of these are in what seems to be Win 64 ifndef blocks and im on a 32 bit machine...
I dont know how you are supposed to debug the functionality when you cant run the program... but if you wish to view my 2400+ lines I guess i can upload them. Just note that some functions are in another lib that i can not upload. these functions are self explanatory by title.
the error occurs after line 1561's function completes excution.
Re: Error Exiting slot calls
Quote:
Originally Posted by
jacks916
I dont know how you are supposed to debug the functionality when you cant run the program... but if you wish to view my 2400+ lines I guess i can upload them. Just note that some functions are in another lib that i can not upload. these functions are self explanatory by title.
the error occurs after line 1561's function completes excution.
Very easy-I'd check the stack to see inside what of your functions the segfault occurs.Because the bug lies somewhere in your code I bet,not inside Qt.
Hmm,I see that using a debugger is the only option to find out what's wrong,as those two files you've provided are not enough to compile the app.
Just run your app under debugger,and after segfault you'll be able to check where is the bug
Re: Error Exiting slot calls
Code:
QtGuid4.dll!655a3196()
[Frames below may be incorrect and/or missing, no symbols loaded for QtGuid4.dll]
QtGuid4.dll!657eb3ff()
QtGuid4.dll!6506b95f()
QtGuid4.dll!65353f51()
QtGuid4.dll!650c0b95()
QtGuid4.dll!65353ebc()
QtGuid4.dll!650c0a54()
QtGuid4.dll!657e7cd1()
QtGuid4.dll!6583119a()
QtGuid4.dll!657588ba()
QtGuid4.dll!6575322d()
QtGuid4.dll!657a0aa4()
QtGuid4.dll!65750593()
QtGuid4.dll!657a6456()
QtGuid4.dll!657a02f6()
QtGuid4.dll!650f2324()
user32.dll!7e418bd9()
ntdll.dll!7c962fe0()
ntdll.dll!7c91a1ba()
ntdll.dll!7c9152aa()
ntdll.dll!7c91520d()
ntdll.dll!7c9154f1()
kernel32.dll!7c809acc()
kernel32.dll!7c809ad6()
kernel32.dll!7c80e6cb()
kernel32.dll!7c80e4fc()
MSCTFIME.IME!755dd55b()
MSCTFIME.IME!755dd563()
kernel32.dll!7c832f59()
kernel32.dll!7c832f61()
kernel32.dll!7c832f61()
MSCTFIME.IME!755c7219()
kernel32.dll!7c832f59()
kernel32.dll!7c832f61()
gdi32.dll!77f16b25()
gdi32.dll!77f1609b()
uxtheme.dll!5ad73c02()
user32.dll!7e418bd9()
user32.dll!7e4296f7()
user32.dll!7e428dac()
user32.dll!7e4296f7()
user32.dll!7e418ffb()
user32.dll!7e418ffb()
uxtheme.dll!5ad746f6()
QtGuid4.dll!650f339a()
QtGuid4.dll!6507370b()
QtGuid4.dll!6505f8ea()
> msvcr90d.dll!_heap_alloc_base(unsigned int size=255) Line 105 + 0x28 bytes C
ffffff90()
this is the stack after error, its seems now to only error 40-50% of the time
I have 2 project specific linked libs and cant publish those sorry.
Re: Error Exiting slot calls
Very strange-where are functions from your application??At least main() shoud be visible there!Like in my project below.Hmmmm please ensure that you're using Debug build,and add breakpoint at those line 1561
Code:
> LoggerDLLTest.
exe!LoggerDLLTest
::LoggerDLLTest(QWidget * parent
=0x00000000, QFlags<enum Qt
::WindowType> flags
={...
}) Line
6 C
++ LoggerDLLTest.exe!main(int argc=1, char * * argv=0x003f6718) Line 7 + 0x17 C++
LoggerDLLTest.exe!WinMain(HINSTANCE__ * instance=0x00400000, HINSTANCE__ * prevInstance=0x00000000, char * __formal=0x00141f44, int cmdShow=1) Line 136 + 0x12 C++
LoggerDLLTest.exe!WinMainCRTStartup() Line 390 + 0x39 C
kernel32.dll!7c816d4f()
ntdll.dll!7c915b4f()
kernel32.dll!7c8399f3()
Re: Error Exiting slot calls
I am not new to programming or debugging, you cant see the call stack without debugging...:p
Above is after the fault,
below is before it:
Code:
> Bommerd.
exe!Bommer
::removePartFromBOM(QTreeWidgetItem * subpart
=0x02a50420,
int col
=0) Line
1562 C
++ Bommerd.
exe!Bommer
::qt_metacall(QMetaObject::Call _c
=InvokeMetaMethod,
int _id
=17,
void * * _a
=0x0012c1d0
) Line
129 + 0x1a bytes C
++ QtCored4.dll!671ccae1()
[Frames below may be incorrect and/or missing, no symbols loaded for QtCored4.dll]
QtCored4.dll!671e4386()
QtCored4.dll!672654f0()
QtGuid4.dll!657e9622()
msvcr90d.dll!_unlock(int locknum=0) Line 376 C
and just before "idle" mode (ie in the moc file)
Code:
> Bommerd.
exe!Bommer
::qt_metacall(QMetaObject::Call _c
=InvokeMetaMethod,
int _id
=17,
void * * _a
=0x0012c1d0
) Line
129 + 0x1a bytes C
++ QtCored4.dll!671ccae1()
[Frames below may be incorrect and/or missing, no symbols loaded for QtCored4.dll]
QtCored4.dll!671e4386()
QtCored4.dll!672654f0()
QtGuid4.dll!657e9622()
msvcr90d.dll!_unlock(int locknum=0) Line 376 C
Re: Error Exiting slot calls
Hmm,so at least we know,that the bug appears in the Bommer::removePartFromBOM() indeed...well,I'd put a beakpoint just at the beginning of the function and then check the code step by step watching carefully especially all pointers.I bet some of them is incorrect somehow.
Re: Error Exiting slot calls
I have seen nothing incorrect, this including the functions that removePartFromBOM calls.
Master, no offense to you, but i have been debugging this for 16hours over the past 3 days, and have looked at the easy stuff. This is not an easy fix.
Re: Error Exiting slot calls
YAY I found it, Corrupted Heap.
If you looked at the Code I was deleting the sent in parameter, not only once but twice
Re: Error Exiting slot calls
As I said-a bad pointer :P