Results 1 to 11 of 11

Thread: Error Exiting slot calls

  1. #1
    Join Date
    Jul 2011
    Posts
    18
    Qt products
    Qt4
    Platforms
    Windows

    Default Error Exiting slot calls

    So First thing first, this is a program specific to a web app only accessible on the intranet of the group I'm writing it for, sorry you cant really run it on your end.
    I am having the most bizarre problem and was hoping someone has seem this issue.

    So the process calls end and the program enters into and finished the moc_* file then I get one of 2 errors:

    1-
    Qt Code:
    1. First-chance exception at 0x655a3196 in Bommerd.exe: 0xC0000005: Access violation reading location 0xfeeeff0a.
    2. Unhandled exception at 0x655a3196 in Bommerd.exe: 0xC0000005: Access violation reading location 0xfeeeff0a.
    To copy to clipboard, switch view to plain text mode 
    With a break point on line 109 of free.c
    Qt Code:
    1. "#endif /* _WIN64 */
    2. {
    3. ---> retval = HeapFree(_crtheap, 0, pBlock);
    4. if (retval == 0)
    5. {
    6. errno = _get_errno_from_oserr(GetLastError());
    7. }
    8. }
    To copy to clipboard, switch view to plain text mode 

    Or something in malloc file (cant seem to populate this one after the changes)

    the weird part, in laman's terms, is all function calls finish and control should be returned to the central cpp in an "idle" mode but i get the above errors.

    QT 4.7.1 with VS2008 v 9.0.30729.1 SP on Win XP x86 machine

    EDIT: this only happens at the end of ONE of my signal-slot call. the rest work without a hitch

    Any help would be awesome. and if you have questions ask away.

  2. #2
    Join Date
    Sep 2008
    Location
    Poland
    Posts
    80
    Thanks
    4
    Thanked 5 Times in 4 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default 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

  3. #3
    Join Date
    Jul 2011
    Posts
    18
    Qt products
    Qt4
    Platforms
    Windows

    Default 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
    Qt Code:
    1. void __cdecl _unlock (
    2. int locknum
    3. )
    4. {
    5. /*
    6.   * leave the critical section.
    7.   */
    8. LeaveCriticalSection( _locktable[locknum].lock );
    9. BP-->}
    To copy to clipboard, switch view to plain text mode 
    Or in malloc.c
    Qt Code:
    1. #ifdef _WIN64
    2. return HeapAlloc(_crtheap, 0, size ? size : 1);
    3. #else /* _WIN64 */
    4. if (__active_heap == __SYSTEM_HEAP) {
    5. BP--> return HeapAlloc(_crtheap, 0, size ? size : 1);
    6. } else
    7. if ( __active_heap == __V6_HEAP ) {
    8. if (pvReturn = V6_HeapAlloc(size)) {
    9. return pvReturn;
    To copy to clipboard, switch view to plain text mode 

    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.
    Attached Files Attached Files

  4. #4
    Join Date
    Sep 2008
    Location
    Poland
    Posts
    80
    Thanks
    4
    Thanked 5 Times in 4 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: Error Exiting slot calls

    Quote Originally Posted by jacks916 View Post
    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
    Last edited by MasterBLB; 9th August 2011 at 21:42.

  5. #5
    Join Date
    Jul 2011
    Posts
    18
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Error Exiting slot calls

    Qt Code:
    1. QtGuid4.dll!655a3196()
    2. [Frames below may be incorrect and/or missing, no symbols loaded for QtGuid4.dll]
    3. QtGuid4.dll!657eb3ff()
    4. QtGuid4.dll!6506b95f()
    5. QtGuid4.dll!65353f51()
    6. QtGuid4.dll!650c0b95()
    7. QtGuid4.dll!65353ebc()
    8. QtGuid4.dll!650c0a54()
    9. QtGuid4.dll!657e7cd1()
    10. QtGuid4.dll!6583119a()
    11. QtGuid4.dll!657588ba()
    12. QtGuid4.dll!6575322d()
    13. QtGuid4.dll!657a0aa4()
    14. QtGuid4.dll!65750593()
    15. QtGuid4.dll!657a6456()
    16. QtGuid4.dll!657a02f6()
    17. QtGuid4.dll!650f2324()
    18. user32.dll!7e418bd9()
    19. ntdll.dll!7c962fe0()
    20. ntdll.dll!7c91a1ba()
    21. ntdll.dll!7c9152aa()
    22. ntdll.dll!7c91520d()
    23. ntdll.dll!7c9154f1()
    24. kernel32.dll!7c809acc()
    25. kernel32.dll!7c809ad6()
    26. kernel32.dll!7c80e6cb()
    27. kernel32.dll!7c80e4fc()
    28. MSCTFIME.IME!755dd55b()
    29. MSCTFIME.IME!755dd563()
    30. kernel32.dll!7c832f59()
    31. kernel32.dll!7c832f61()
    32. kernel32.dll!7c832f61()
    33. MSCTFIME.IME!755c7219()
    34. kernel32.dll!7c832f59()
    35. kernel32.dll!7c832f61()
    36. gdi32.dll!77f16b25()
    37. gdi32.dll!77f1609b()
    38. uxtheme.dll!5ad73c02()
    39. user32.dll!7e418bd9()
    40. user32.dll!7e4296f7()
    41. user32.dll!7e428dac()
    42. user32.dll!7e4296f7()
    43. user32.dll!7e418ffb()
    44. user32.dll!7e418ffb()
    45. uxtheme.dll!5ad746f6()
    46. QtGuid4.dll!650f339a()
    47. QtGuid4.dll!6507370b()
    48. QtGuid4.dll!6505f8ea()
    49. > msvcr90d.dll!_heap_alloc_base(unsigned int size=255) Line 105 + 0x28 bytes C
    50. ffffff90()
    To copy to clipboard, switch view to plain text mode 

    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.

  6. #6
    Join Date
    Sep 2008
    Location
    Poland
    Posts
    80
    Thanks
    4
    Thanked 5 Times in 4 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default 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
    Qt Code:
    1. > LoggerDLLTest.exe!LoggerDLLTest::LoggerDLLTest(QWidget * parent=0x00000000, QFlags<enum Qt::WindowType> flags={...}) Line 6 C++
    2. LoggerDLLTest.exe!main(int argc=1, char * * argv=0x003f6718) Line 7 + 0x17 C++
    3. LoggerDLLTest.exe!WinMain(HINSTANCE__ * instance=0x00400000, HINSTANCE__ * prevInstance=0x00000000, char * __formal=0x00141f44, int cmdShow=1) Line 136 + 0x12 C++
    4. LoggerDLLTest.exe!WinMainCRTStartup() Line 390 + 0x39 C
    5. kernel32.dll!7c816d4f()
    6. ntdll.dll!7c915b4f()
    7. kernel32.dll!7c8399f3()
    To copy to clipboard, switch view to plain text mode 

  7. #7
    Join Date
    Jul 2011
    Posts
    18
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Error Exiting slot calls

    I am not new to programming or debugging, you cant see the call stack without debugging...

    Above is after the fault,

    below is before it:
    Qt Code:
    1. > Bommerd.exe!Bommer::removePartFromBOM(QTreeWidgetItem * subpart=0x02a50420, int col=0) Line 1562 C++
    2. Bommerd.exe!Bommer::qt_metacall(QMetaObject::Call _c=InvokeMetaMethod, int _id=17, void * * _a=0x0012c1d0) Line 129 + 0x1a bytes C++
    3. QtCored4.dll!671ccae1()
    4. [Frames below may be incorrect and/or missing, no symbols loaded for QtCored4.dll]
    5. QtCored4.dll!671e4386()
    6. QtCored4.dll!672654f0()
    7. QtGuid4.dll!657e9622()
    8. msvcr90d.dll!_unlock(int locknum=0) Line 376 C
    To copy to clipboard, switch view to plain text mode 
    and just before "idle" mode (ie in the moc file)
    Qt Code:
    1. > Bommerd.exe!Bommer::qt_metacall(QMetaObject::Call _c=InvokeMetaMethod, int _id=17, void * * _a=0x0012c1d0) Line 129 + 0x1a bytes C++
    2. QtCored4.dll!671ccae1()
    3. [Frames below may be incorrect and/or missing, no symbols loaded for QtCored4.dll]
    4. QtCored4.dll!671e4386()
    5. QtCored4.dll!672654f0()
    6. QtGuid4.dll!657e9622()
    7. msvcr90d.dll!_unlock(int locknum=0) Line 376 C
    To copy to clipboard, switch view to plain text mode 

  8. #8
    Join Date
    Sep 2008
    Location
    Poland
    Posts
    80
    Thanks
    4
    Thanked 5 Times in 4 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default 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.

  9. #9
    Join Date
    Jul 2011
    Posts
    18
    Qt products
    Qt4
    Platforms
    Windows

    Default 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.

  10. #10
    Join Date
    Jul 2011
    Posts
    18
    Qt products
    Qt4
    Platforms
    Windows

    Default 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

  11. #11
    Join Date
    Sep 2008
    Location
    Poland
    Posts
    80
    Thanks
    4
    Thanked 5 Times in 4 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: Error Exiting slot calls

    As I said-a bad pointer :P

Similar Threads

  1. Replies: 5
    Last Post: 14th September 2010, 21:13
  2. error with a signal - slot
    By mmm286 in forum Newbie
    Replies: 1
    Last Post: 10th November 2009, 17:41
  3. error No such slot QMainWindow::open()
    By kavinsiva in forum Qt Programming
    Replies: 4
    Last Post: 12th August 2009, 07:39
  4. Doxgen call graphs also for signal-slot calls?
    By zavulon in forum Qt Programming
    Replies: 0
    Last Post: 25th September 2008, 15:29
  5. Error Comes in connet the signal and slot.
    By ashishsaryar in forum Qt Programming
    Replies: 2
    Last Post: 2nd February 2008, 22:15

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.