Results 1 to 9 of 9

Thread: Memory warning within windows

  1. #1
    Join Date
    Nov 2006
    Posts
    28
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Question Memory warning within windows

    I've recently upgraded to 4.2.2 But now i'm getting heap memory warnings. Can't seem to see whats causing it. Any ideas?

    Could this have anything to do with linking c:\Qt\4.2.2\lib\QtSql4.lib?

    Harvey

    ################################################## #######
    db = QSqlDatabase::addDatabase("QMYSQL");
    db.setHostName(hostName);
    db.setPort(port);
    db.setDatabaseName(databaseName);
    db.setUserName(userName);
    db.setPassword(password);
    .
    .
    .
    .

    QString test = db.lastError().text();
    qDebug() << "DB open failed: " << test; // OK

    qDebug() << "DB open failed: " << db.lastError().text(); //Causes error to flag see below

    ################################################## #######
    Debug errors:
    HEAP[foo.exe]: Invalid Address specified to RtlValidateHeap( 00B60000, 00B7A108 )
    Windows has triggered a breakpoint in foo.exe.

    This may be due to a corruption of the heap, and indicates a bug in foo.exe or any of the DLLs it has loaded.

  2. #2
    Join Date
    Nov 2006
    Posts
    28
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Post Re: Memory warning within windows - VS2005 related?

    Hello

    Can Qt projects be built in Visual studio 2005 Debug mode?

    I have no problems building the project as a "Release binary". But as soon as I try and build a "Debug binary" version I get very annoying trigger point windows popping up. Is this normal?

    Is anyone using Visual studio 2005 in debug mode?

    Harvey
    Last edited by Harvey West; 12th September 2007 at 17:05. Reason: New thought

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

    Default Re: Memory warning within windows - VS2005 related?

    Do you have all the plugins and libs compiled in debug mode as well?

  4. #4
    Join Date
    Nov 2006
    Posts
    28
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Question Re: Memory warning within windows

    I have used this file qt-win-commercial-4.2.2-vs2005.exe to install qt.
    Only use the dll libs that came with this install i.e. Did not do a recompile. Should I?

    I then build the project like so .....

    qmake -project -t vcapp
    qmake foo.pro

    I then edit foo.pro. See red text .....

    ################################################## ####################
    # Automatically generated by qmake (2.01a) Tue 11. Sep 16:55:27 2007
    ################################################## ####################

    TEMPLATE = vcapp
    TARGET =
    DEPENDPATH += .
    INCLUDEPATH += . C:\PROJECTS\Toolbar\include
    win32:LIBS += C:\PROJECTS\Toolbar\lib\WS2_32.Lib


    # Input
    HEADERS += quemanager.h spreadsheet.h tasksthread.h track.h
    SOURCES += main.cpp quemanager.cpp spreadsheet.cpp tasksthread.cpp track.cpp

    QT += xml sql network
    CONFIG += debug

    ################################################## ####################

    I then go into vs2005 and add include directories & additional dependencies to the project settings. Like so ....
    c:\Qt4.2.2\include\QtXml
    c:\Qt4.2.2\include\QNetwork
    c:\Qt4.2.2\include\QtSql



    c:\Qt\4.2.2\lib\QtSql4.lib
    c:\Qt\4.2.2\lib\QtNetwork4.lib
    C:\Qt\4.2.2\lib\QtXml4.lib

    C:\PROJECTS\Toolbar\lib\WS2_32.Lib

    Does this look all quite normal?

    Some ones mentioned Qts intergration kit. Whats this?

    Cheers

    Harvey

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

    Default Re: Memory warning within windows

    If you want to use debug libraries, plugins have to be compiled in debug mode as well. So if you don't have those compiled in debug mode, you'll have to do that first.

  6. #6
    Join Date
    Nov 2006
    Posts
    28
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Memory warning within windows

    Arrrr

    So the qt-win-commercial-4.2.2-vs2005.exe only comes with release dll/libs. no debug dll/libs.

    If i want to compile for debug will i need to install MinGW?

    Tried VS2005 "nmake.exe" but this does not seem to work.

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

    Default Re: Memory warning within windows

    No, you just need Qt's source code which you should be able to download from your restricted area on Trolltech site if it's not included in the above mentioned archive. Then run configure and nmake sub-src.

  8. #8
    Join Date
    Nov 2006
    Posts
    28
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Memory warning within windows

    Tried running configure but get this. Any ideas?

    See attached file.
    Attached Files Attached Files

  9. #9
    Join Date
    Oct 2006
    Posts
    279
    Thanks
    6
    Thanked 40 Times in 39 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Memory warning within windows

    I think nmake can't find cl.exe. Did you use a normal console? You have to use the "Visual Studio 2005 Command Prompt".

Similar Threads

  1. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 15:21
  2. Problem at time compilation in traslation of language
    By thomasjoy in forum Qt Programming
    Replies: 3
    Last Post: 22nd May 2007, 14:18
  3. how to corss compile for windows in Linux
    By safknw in forum Qt Programming
    Replies: 24
    Last Post: 13th May 2006, 05:23
  4. a Text Editor with line numbers...
    By fullmetalcoder in forum Qt Programming
    Replies: 47
    Last Post: 5th April 2006, 11:10
  5. warning message on compile not understood
    By impeteperry in forum Qt Programming
    Replies: 13
    Last Post: 23rd January 2006, 23:36

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.