Results 1 to 11 of 11

Thread: Unhandled exception at 0x01f71318 in Editor.exe: 0xC0000096: Privileged instruction"

  1. #1
    Join Date
    Apr 2009
    Posts
    132
    Thanks
    67
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Unhappy Unhandled exception at 0x01f71318 in Editor.exe: 0xC0000096: Privileged instruction"

    Hi friends!

    My program works perfectly in Debug mode. But if I choose Realeas mode, when I close my program I receive this nice window from Visual Studio 2005 (I use Qt4.5 open source):
    "Unhandled exception at 0x01f71318 in Editor.exe: 0xC0000096: Privileged instruction."
    Break or Continue.

    However, if I execute it outside IDE, everything works fine.

    I have no idea what is going on, I tried commenting all my signals/slots but no result.

    Any idea?
    Thanks a lot.

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Unhandled exception at 0x01f71318 in Editor.exe: 0xC0000096: Privileged instructi

    When such problems occur in release and not in debug,,, first thing is to check if all your variables are properly initialized...

  3. #3
    Join Date
    Apr 2009
    Posts
    132
    Thanks
    67
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Unhandled exception at 0x01f71318 in Editor.exe: 0xC0000096: Privileged instructi

    Quote Originally Posted by aamer4yu View Post
    When such problems occur in release and not in debug,,, first thing is to check if all your variables are properly initialized...
    Some variables were not initialized, but after fixing it, I still have the same problem.

    However, I realised I get this message when I lauch the app:
    QPainter::begin: Paint device returned engine == 0, type: 1
    QPainter::setPen: Painter not active

    Any idea?
    Thanks a lot

  4. #4
    Join Date
    Apr 2009
    Posts
    132
    Thanks
    67
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Unhandled exception at 0x01f71318 in Editor.exe: 0xC0000096: Privileged instructi

    Forget it. Now works fine, I don't know why. (maybe initialization and I forgot to rebuild)

    Anyway, any idea about this:
    "QPainter::begin: Paint device returned engine == 0, type: 1
    QPainter::setPen: Painter not active"

    Thanks.

  5. #5
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Unhandled exception at 0x01f71318 in Editor.exe: 0xC0000096: Privileged instructi

    Can you trace that to which line in your code it points to ?
    Do u get this message even after initialzing the variables ?

  6. #6
    Join Date
    Apr 2009
    Posts
    132
    Thanks
    67
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Unhandled exception at 0x01f71318 in Editor.exe: 0xC0000096: Privileged instructi

    Quote Originally Posted by aamer4yu View Post
    Can you trace that to which line in your code it points to ?
    Do u get this message even after initialzing the variables ?
    Thanks for reply. I only have this problem in release mode, so I'm cannot trace it, that's the problem

  7. #7
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Unhandled exception at 0x01f71318 in Editor.exe: 0xC0000096: Privileged instructi

    You can paste some qDebugs in your code (for example at the first lines of each suspected method with Q_FUNC_INFO, __FILE__ and __LINE__):
    Qt Code:
    1. qDebug() << Q_FUNC_INFO; // prints full method name
    2. qDebug() << "file:" << __FILE__ << " line:" << __LINE__; // prints file and line where this code is
    To copy to clipboard, switch view to plain text mode 
    then you can maybe find when those QPainter warnings are printed.
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

  8. #8
    Join Date
    Apr 2009
    Posts
    132
    Thanks
    67
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Unhandled exception at 0x01f71318 in Editor.exe: 0xC0000096: Privileged instructi

    Quote Originally Posted by faldżip View Post
    You can paste some qDebugs in your code (for example at the first lines of each suspected method with Q_FUNC_INFO, __FILE__ and __LINE__):
    Qt Code:
    1. qDebug() << Q_FUNC_INFO; // prints full method name
    2. qDebug() << "file:" << __FILE__ << " line:" << __LINE__; // prints file and line where this code is
    To copy to clipboard, switch view to plain text mode 
    then you can maybe find when those QPainter warnings are printed.
    I didn't know that. Very interesting.
    Q_FUNC_INFO works, but not __FILE__ and __LINE__

    Do last 3 macros belong to Qt or VS compiler?

    Thanks.

  9. #9
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Unhandled exception at 0x01f71318 in Editor.exe: 0xC0000096: Privileged instructi

    I used __FILE__ and __LINE__ with gcc on Linux, but I thought it's rather common and should work on VS for example.
    And there is also Qt Meta Object system whick can give you some info. Every class which has a moc part (so inherits QObject and has a Q_OBJECT macro) has a metaObject() which returns QMetaObject, which has methods like classInfo(), className() - can be also useful :]
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

  10. The following user says thank you to faldzip for this useful post:

    ricardo (4th May 2009)

  11. #10
    Join Date
    Apr 2009
    Posts
    132
    Thanks
    67
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Unhandled exception at 0x01f71318 in Editor.exe: 0xC0000096: Privileged instructi

    Interesting. I'll use it, thanks.

  12. #11
    Join Date
    Apr 2015
    Posts
    1
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: Unhandled exception at 0x01f71318 in Editor.exe: 0xC0000096: Privileged instructi

    Ran into the same error, it seems to be quite Random (at least in my case). The Error occured in debug mode, running the program in release mode, then again in debug mode fixed it.. Hope this helps to anyone. (Might be a bug...)

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.