Results 1 to 3 of 3

Thread: MSVC2008 debugger hangs after adding a further QSettings group...

  1. #1
    Join Date
    Feb 2006
    Posts
    23
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default MSVC2008 debugger hangs after adding a further QSettings group...

    Hi all,

    i have a problem with my application. i have a QmainWindow derivate called myMainWindow. In it's ctor i'm calling a function loadSetting() beeing a private member of myMainWindow. The correspondant function saveSettings() is called in myMainWindow::closeEvent(). This approach worked fine through several versions of my application.

    I recently added a new group to both loadSettings():

    Qt Code:
    1. settings.beginGroup("Other Options");
    2. double factor=settings.value("my factor",1.2).toDouble();
    3. doSomeThing(factor);
    4. settings.endGroup();
    To copy to clipboard, switch view to plain text mode 

    and saveSettings():

    Qt Code:
    1. settings.beginGroup("Other Options");
    2. settings.setValue("my factor",getFactor());
    3. settings.endGroup();
    To copy to clipboard, switch view to plain text mode 

    I'm building this code in MSVC2008 as 32 bit code, and running on Windows 7 32 bit. The release code works, and the registry keys all look ok. The debug code is running outside MSVC2008 debugger, too. However, if i want to debug my app in MSVC2008, the debugger hangs, and win7 tells me that MSVC2008 is busy. After a minute or so, i can step to the next expression in the debugger, and again i have to wait a minute...

    Before i added the statements above, all was running fine. Without these lines, i can step into loadSettings(), the debugger is reactive, and i can switch beteen the main thread and the other thread running at that moment: a QFileInfoGatherer. My app uses a QTreeView along with a QFileSystemModel.

    Any ideas?

    Regards, sepp

  2. #2
    Join Date
    Feb 2006
    Posts
    23
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: MSVC2008 debugger hangs after adding a further QSettings group...

    Well, although i have no solution for the problem and no idea why it happens: if i set a breakpoint later in my loadSettings() function instead on the first expression, all is fine. Hmm. Maybe some race condition?

  3. #3
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Thanks
    5
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: MSVC2008 debugger hangs after adding a further QSettings group...

    what happens in doSomeThing(factor)???
    A camel can go 14 days without drink,
    I can't!!!

Similar Threads

  1. Mutlithreading hangs gui
    By thahir1986 in forum Newbie
    Replies: 2
    Last Post: 28th September 2010, 10:10
  2. QSettings and colons in group name
    By anthon in forum Qt Programming
    Replies: 1
    Last Post: 15th August 2010, 18:01
  3. Debugger problem retrieving data for watch view hangs
    By frenk_castle in forum Installation and Deployment
    Replies: 0
    Last Post: 5th May 2010, 23:09
  4. qwt 5.2.0 msvc2008 build Qt 4.6.0
    By hml in forum Qwt
    Replies: 3
    Last Post: 18th December 2009, 12:58
  5. QProcess hangs
    By Skizmo in forum Qt Programming
    Replies: 4
    Last Post: 8th March 2007, 10:27

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.