Results 1 to 6 of 6

Thread: 0xc0000005 error when using qVector

  1. #1
    Join Date
    Dec 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default 0xc0000005 error when using qVector

    hello,
    I've just started working with QT and wanted to test some core classes, before working with gui. However, even at this point I encountered difficulties. This is the code
    Qt Code:
    1. #include <QtCore/QVector>
    2.  
    3. int main(int argc, char* argv[])
    4. {
    5. QVector<uchar> vector;
    6. vector.push_back(30);
    7.  
    8. return 0;
    9. }
    To copy to clipboard, switch view to plain text mode 

    Everything compiles fine. On runtime I get the following error:
    The application failed to initialize properly (0xc0000005). Click OK to terminate
    I noticed that it's a problem of QVector. QList, for example, works fine.
    It's the same either both on debug an release.
    IDE: Code-Blocks 10.05
    compiler: mingw 4.5.0-1
    QT 4.7.1 compiled for mingw

    I'd be thankful for any help to this frustrating problem.

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

    Default Re: 0xc0000005 error when using qVector

    Read the message - your application didn't even start. c00(0...)5 is an access violation error. There is something messed up in your system - http://www.0xc0000005.com/
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Dec 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: 0xc0000005 error when using qVector

    Thank You, but I've just solved it

    I've seen this page already, but this is rather for people who generally have this error, no matter what application they are running.My problem was only with my own programs.

    The solution was to compile program with mingw provided with qt, not the "general" one. If it was obvious - sorry for bothering.

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

    Default Re: 0xc0000005 error when using qVector

    Quote Originally Posted by przemo View Post
    I've seen this page already, but this is rather for people who generally have this error, no matter what application they are running.My problem was only with my own programs.
    Are you serious? You think the solution is different depending on whether you are the author of the program or not?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Dec 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: 0xc0000005 error when using qVector

    Quote Originally Posted by wysota View Post
    Are you serious? You think the solution is different depending on whether you are the author of the program or not?
    Yes, i'm serious. If this is Your conclusion, then i'm afraid i didn't make myself clear.
    All i wanted to say is that in my case it was a problem with the compiler. After switching to mingw provided with qt, it worked. I don't know if this is right explanation, but now I can run this program.

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

    Default Re: 0xc0000005 error when using qVector

    Quote Originally Posted by przemo View Post
    Yes, i'm serious. If this is Your conclusion, then i'm afraid i didn't make myself clear.
    All i wanted to say is that in my case it was a problem with the compiler. After switching to mingw provided with qt, it worked. I don't know if this is right explanation, but now I can run this program.
    It was a problem with the dlls in your system. The point is it was not caused by using QVector instead of QList as your application didn't even manage to launch.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 6
    Last Post: 17th March 2010, 10:53
  2. Replies: 1
    Last Post: 3rd December 2009, 10:17
  3. Replies: 1
    Last Post: 25th October 2008, 19:18
  4. Replies: 2
    Last Post: 13th August 2008, 17:46
  5. 0xc0000005 when linking against lib
    By niko in forum Qt Programming
    Replies: 10
    Last Post: 8th March 2006, 08:55

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.