Results 1 to 8 of 8

Thread: Windows not appearing in XP.

  1. #1
    Join Date
    Oct 2007
    Posts
    4
    Thanks
    3
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Red face Windows not appearing in XP.

    I have an odd issue in QT3.3.5.

    I have windows XP and Solaris (SunOS 5.8) platforms for testing on.

    My app has a toolbutton which creates a new window, further pushes of the toolbutton create new copies of the same window.

    In solaris I can do this many times (I've tested up to around 25 windows). However in windows after creating three windows, the system appears to give up drawing the windows. Within a debugger I can see all the memory (about 8-9MB) being allocated and objects created, etc. All seems fine with the internal data structures, there is simply no window drawing going on. All that happens is that each time the button is pushed the system appears to stall for a few seconds and then the entire screen flickers for a few seconds. This flicker also shows when I exit the application.

    Is there any known issue with window drawing in Windows XP versus Solaris that I should be aware of?

    Sorry for no code snippet, but I couldnt come up with a small enough snippet to demonstrate the issue.

  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: Windows not appearing in XP.

    Without seeing the code, we won't be able to do anything. Could you at least show the code used for constructing and displaying such a window?

  3. The following user says thank you to wysota for this useful post:

    beardybloke (23rd October 2007)

  4. #3
    Join Date
    Oct 2007
    Posts
    4
    Thanks
    3
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: Windows not appearing in XP.

    Thanks for that - I'll try to spend some time today looking at creating a minimum failing case that I can demonstrate the issue.

    Just to add some extra info to this....

    After an afternoon of single stepping through the code checking pointers, etc...

    I find that the stack goes as follows:-

    MyObject::show()
    QDialog::show()
    QWidget::show()
    .. which then loops around the child widgets.
    .. calling showChildren() which in turn calls show() recursively....
    QWidget::showChildren()
    QWidget::show()
    QWidget::showChildren()
    QWidget::ShowChildren() - at this point I am unable to trace further - this method begins the flicker. I dont appear to have the source for this method (with the Capitalised "S").

    On one occasion I was able to get the dialog window to appear but with none of the widgets on it. I attempted to resize the window and other things to see if any of the redraw mechanisms would refresh it.

    From there I saw the various widgets being painted on the screen, not on the window I expected but in the top left hand corner of the window on the background. All sorts of menus and tabbed windows were drawn but then disappeared one by one - which i think is probably what is happening when the code attempts to draw the window in the first place - manifesting itself as the flicker.

    Is it possible that somehow the parent window connection has been lost and its simply drawing on the main screen? Has anyone seen anything like this? Any hints/tips on following this up?

    As I said before I'm a but of a newbie at Qt.

    I'll spend some time today seeing if I can come up with a minimum failing case that I can post later.

  5. #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: Windows not appearing in XP.

    Quote Originally Posted by beardybloke View Post
    In solaris I can do this many times (I've tested up to around 25 windows). However in windows after creating three windows, the system appears to give up drawing the windows.
    How complex are these windows? AFAIR there's some limit of HWNDs you can have, but you shouldn't run out of them with just three windows.

  6. The following user says thank you to jacek for this useful post:

    beardybloke (24th October 2007)

  7. #5
    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: Windows not appearing in XP.

    We'd appreciate to see some code.

  8. #6
    Join Date
    Oct 2007
    Posts
    4
    Thanks
    3
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: Windows not appearing in XP.

    Quote Originally Posted by jacek View Post
    How complex are these windows? AFAIR there's some limit of HWNDs you can have, but you shouldn't run out of them with just three windows.
    These windows are fairly complex and allocate a load of memory.

    I havent had a chance to look at generating a code snippet to demonstrate this any further as I've been assigned to look at something else in the meantime.

    An extra piece of information that I did discover yesterday - I'm beginning to think its simply a resource issue on the PC rather than a Qt issue per se, while i was recreating this I had a small compile for something else going in the background, the compile failed with a win32 error 1114 whilst trying to load user32.dll. With that in mind I tried to load the taskmanager & a performance meter and they failed to load (reported by Event Viewer). Another less complex window within the app, which doesnt have the problem on its own will also redraw on the screen background rather than within the dialog once I get to this state. I'll dig around when I get back to this problem probably tomorrow.

    Thanks again for all your help so far.

  9. #7
    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: Windows not appearing in XP.

    Quote Originally Posted by beardybloke View Post
    I'm beginning to think its simply a resource issue on the PC rather than a Qt issue per se, while i was recreating this I had a small compile for something else going in the background, the compile failed with a win32 error 1114 whilst trying to load user32.dll.
    You can use Process Explorer to see how much resources your application uses (esp. it can display the number of open handles).

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

    beardybloke (24th October 2007)

  11. #8
    Join Date
    Oct 2007
    Posts
    4
    Thanks
    3
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Thumbs up Re: Windows not appearing in XP.

    Quote Originally Posted by jacek View Post
    You can use Process Explorer to see how much resources your application uses (esp. it can display the number of open handles).

    Thanks for that - this showed that the window was consuming about 3K User Handles. Everything goes screwy after 10K which appears to be the limit.

    Thanks for the pointers....

Similar Threads

  1. Replies: 10
    Last Post: 25th February 2007, 00:23
  2. converting unix exe to windows binary
    By deekayt in forum General Programming
    Replies: 2
    Last Post: 17th September 2006, 01:00
  3. Experience using KDevelop with Cygwin under windows
    By high_flyer in forum General Discussion
    Replies: 4
    Last Post: 11th September 2006, 16:50
  4. qt and mingw can not run on windows 98?
    By evewei in forum Installation and Deployment
    Replies: 4
    Last Post: 26th June 2006, 09:22
  5. MDI windows without QWorkspace
    By Big Duck in forum Newbie
    Replies: 2
    Last Post: 16th June 2006, 17:15

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.