Results 1 to 15 of 15

Thread: Unhandled exception in qatomic

  1. #1
    Join Date
    Jun 2006
    Posts
    19
    Thanks
    4
    Qt products
    Qt4

    Default Unhandled exception in qatomic

    've decided to make a text searching utility in Qt as an excercise. I have a problem however. I've just reformatted my computer, and I took a backup of my Visual Studio projects. Now when I try to exit my application by the X in the upper right corner I get this message for Visual Studio:
    "Unhandled exception at 0x004044e9 in Qt Text Searcher.exe: 0xC0000005: Access violation writing location 0xfeeefeee."
    Visual Studio also says CX0030: Error: Expression cannot be evaluated

    Visual Studio then points me to the following line in qatomic.h:
    "{ return _InterlockedDecrement(reinterpret_cast<volatile long *>(ptr)); }"

    How can I help this? To my knowing I have not used any Atomic counters (I am not even sure what it is)

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Unhandled exception in qatomic

    Did you recompile your application after reformatting? Also check if all examples bundled with Qt work ok.

  3. #3
    Join Date
    Jun 2006
    Posts
    19
    Thanks
    4
    Qt products
    Qt4

    Default Re: Unhandled exception in qatomic

    Yes I did recompile. The examples bundled with works fine

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 975 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Unhandled exception in qatomic

    Could you post the backtrace?

  5. #5
    Join Date
    Jun 2006
    Posts
    19
    Thanks
    4
    Qt products
    Qt4

    Default Re: Unhandled exception in qatomic

    backtrace? I can upload the whole project if that would help. It's about 9 MB large
    Last edited by NewGuy; 22nd July 2006 at 18:15.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Unhandled exception in qatomic

    No, we definitely prefer a backtrace, it'll only be few lines long

  7. #7
    Join Date
    Jun 2006
    Posts
    19
    Thanks
    4
    Qt products
    Qt4

    Default Re: Unhandled exception in qatomic

    Ah well then, what is a backtrace?

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Unhandled exception in qatomic

    A backtrace is... a backtrace Also called a call stack or stack trace or whatever. It is a list of function calls that led to the crash. A debugger produces it.

  9. #9
    Join Date
    Jun 2006
    Posts
    19
    Thanks
    4
    Qt products
    Qt4

    Default Re: Unhandled exception in qatomic

    Hmm I guess this is a backtrace then

    'Qt Text Searcher.exe': Loaded 'H:\My Documents\Visual Studio 2005\Projects\Qt Text Searcher\debug\Qt Text Searcher.exe', Symbols loaded.
    'Qt Text Searcher.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded.
    'Qt Text Searcher.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded.
    'Qt Text Searcher.exe': Loaded 'C:\Qt\4.1.1\bin\QtCored4.dll', Symbols loaded.
    'Qt Text Searcher.exe': Loaded 'C:\WINDOWS\system32\user32.dll', No symbols loaded.
    'Qt Text Searcher.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', No symbols loaded.
    'Qt Text Searcher.exe': Loaded 'C:\WINDOWS\system32\ole32.dll', No symbols loaded.
    'Qt Text Searcher.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', No symbols loaded.
    'Qt Text Searcher.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', No symbols loaded.
    'Qt Text Searcher.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded.
    'Qt Text Searcher.exe': Loaded 'C:\WINDOWS\system32\ws2_32.dll', No symbols loaded.
    'Qt Text Searcher.exe': Loaded 'C:\WINDOWS\system32\ws2help.dll', No symbols loaded.
    'Qt Text Searcher.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc 8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcp80d.dll', Symbols loaded.
    'Qt Text Searcher.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc 8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcr80d.dll', Symbols loaded.
    'Qt Text Searcher.exe': Loaded 'C:\Qt\4.1.1\bin\QtGuid4.dll', Symbols loaded.
    'Qt Text Searcher.exe': Loaded 'C:\WINDOWS\system32\comdlg32.dll', No symbols loaded.
    'Qt Text Searcher.exe': Loaded 'C:\WINDOWS\system32\shlwapi.dll', No symbols loaded.
    'Qt Text Searcher.exe': Loaded 'C:\WINDOWS\system32\comctl32.dll', No symbols loaded.
    'Qt Text Searcher.exe': Loaded 'C:\WINDOWS\system32\shell32.dll', No symbols loaded.
    'Qt Text Searcher.exe': Loaded 'C:\WINDOWS\system32\oleaut32.dll', No symbols loaded.
    'Qt Text Searcher.exe': Loaded 'C:\WINDOWS\system32\imm32.dll', No symbols loaded.
    'Qt Text Searcher.exe': Loaded 'C:\WINDOWS\system32\winmm.dll', No symbols loaded.
    'Qt Text Searcher.exe': Loaded 'C:\WINDOWS\system32\winspool.drv', No symbols loaded.
    'Qt Text Searcher.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll', No symbols loaded.
    'Qt Text Searcher.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll', No symbols loaded.
    'Qt Text Searcher.exe': Loaded 'C:\WINDOWS\system32\msctf.dll', No symbols loaded.
    'Qt Text Searcher.exe': Loaded 'C:\WINDOWS\system32\version.dll', No symbols loaded.
    'Qt Text Searcher.exe': Unloaded 'C:\WINDOWS\system32\version.dll'
    'Qt Text Searcher.exe': Loaded 'C:\WINDOWS\system32\msctfime.ime', No symbols loaded.
    'Qt Text Searcher.exe': Loaded 'C:\WINDOWS\system32\usp10.dll', No symbols loaded.
    'Qt Text Searcher.exe': Loaded 'C:\WINDOWS\system32\xpsp2res.dll', Binary was not built with debug information.
    'Qt Text Searcher.exe': Loaded 'C:\Program Files\Internet Download Manager\idmmkb.dll', Binary was not built with debug information.
    First-chance exception at 0x00404559 in Qt Text Searcher.exe: 0xC0000005: Access violation writing location 0xfeeefeee.
    Unhandled exception at 0x00404559 in Qt Text Searcher.exe: 0xC0000005: Access violation writing location 0xfeeefeee.
    The program '[2600] Qt Text Searcher.exe: Native' has exited with code 0 (0x0).

    [EDIT] What the hell?!? Why does the application load Internet Download Manager?

  10. #10
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,518 Times in 1,388 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Unhandled exception in qatomic

    In VS2005: "Debug->Windows->Call Stack", select all, copy and paste here..
    J-P Nurmi

  11. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Unhandled exception in qatomic

    Quote Originally Posted by NewGuy
    Hmm I guess this is a backtrace then
    No, it's not This is a log of loading symbols from imported libraries into the debugger.

  12. #12
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 975 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Unhandled exception in qatomic

    Quote Originally Posted by NewGuy
    What the hell?!? Why does the application load Internet Download Manager?
    Maybe it's some kind of trojan or spyware? Try AdAware.

  13. #13
    Join Date
    Jun 2006
    Posts
    19
    Thanks
    4
    Qt products
    Qt4

    Default Re: Unhandled exception in qatomic

    Right, this should be a backtrace then

    > Qt Text Searcher.exe!q_atomic_decrement(volatile int * ptr=0xfeeefeee) Line 137 + 0x9 bytes C++

    Qt Text Searcher.exe!QBasicAtomic::deref() Line 71 + 0x10 bytes C++

    Qt Text Searcher.exe!QVector<char *>::~QVector<char *>() Line 72 + 0x1b bytes C++

    Qt Text Searcher.exe!WinMain(HINSTANCE__ * instance=0xfeeefeee, HINSTANCE__ * prevInstance=0xfeeefeee, char * __formal=0xfeeefeee, int cmdShow=-17891602) Line 104 + 0xe bytes C++
    feeefeee()

  14. #14
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 975 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Unhandled exception in qatomic

    Quote Originally Posted by NewGuy
    Right, this should be a backtrace then
    Yes, that's it.

    The problem occurs in QVector<char *> destructor that is invoked from main() on line 104. Do you know which QVector<char *> this might be? Maybe you are deleting something twice?

  15. #15

    Default Re: Unhandled exception in qatomic

    I may be find the solution,or not.

    Goto C:\WINDOWS\system32,and change the name of xpsp2res.dll to others for invalid the xps services.
    And clear the windows memory using "360åŠ é€Ÿçƒ".

    In Visual Studio 2010, press F5.
    All is fine.

Similar Threads

  1. Qt's Exception Handling
    By bruce1007 in forum Qt Programming
    Replies: 2
    Last Post: 13th June 2006, 09:30
  2. Exceptions and qApp->processEvents()
    By mcostalba in forum Qt Programming
    Replies: 3
    Last Post: 8th January 2006, 17:06

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.