Message QWindowsNativeInterface::nativeResourceForWindow: 'handle' requested for null window or window without handle.



  • Hi! I recently migrated to Qt5 on Windows and run small app with main window and several widgets (childs of QVideoWidget) and custom dialogs.
    Sometimes I got this messages in console (then I exec dialog for example)
    @QWindowsNativeInterface::nativeResourceForWindow: 'handle' requested for null window or window without handle.@

    It doesn't seem to affect my app but I'm curious what it means and is there some hidden faults?



  • Here too, plenty of this message in the console since I upgraded to QT5... No idea what it means and how to get rid of it...



  • I have just upgraded to Qt 5.0.1 and I am now getting those messages too while I didn't at all with Qt 5.0.0...?!



  • I get the same messages, also using 5.0.1.



  • Is there a solution available?



  • I found my problem, the tcpserver and tcpclient has different qdatastream versions...

    qdatastream::setVersion solves my problem



  • Hmm, how is the QDataStream related to window handling?

    I have the same problem:
    Win 8 Pro 64 bit, MSVC2012, Qt 5.0.1 commercial.



  • Can you guys let me know how I can reproduce it at my end? any example or QTDIR\qtbase\ example ??
    Any certain steps ??

    Any hint or stack trace which can give any clue?



  • I can't give you a Qt example programm causing this problem (havent' compiled the examples) but I can you give a small programm that shows the error. it is a autoupdater library for qt based programms, based on the poject "flevor" together with the mentioned small example programm to show the effect.

    There are only two disadvantages: It depends on QuaZIP, a Qt wrapper for zLib/minizip. And it suffers the QtWebkit bug described here: http://qt-project.org/forums/viewthread/23571

    If you are interested please give me a note and I will send you the files.

    Torben



  • I also can confirm. Tested with official builds for both mingw 4.7.2 and MSVC 2010.
    One message for each control (QWidget child?).



  • [quote author="TorbenD" date="1360329674"]I can't give you a Qt example programm causing this problem (havent' compiled the examples) but I can you give a small programm that shows the error. it is a autoupdater library for qt based programms, based on the poject "flevor" together with the mentioned small example programm to show the effect.

    There are only two disadvantages: It depends on QuaZIP, a Qt wrapper for zLib/minizip. And it suffers the QtWebkit bug described here: http://qt-project.org/forums/viewthread/23571

    If you are interested please give me a note and I will send you the files.

    Torben[/quote]

    Yes sure if it is not too big example and if I can easily see the behavior then yes please let me know how I can get that code.



  • Same problem here with Qt 5.0.1 for mingw on Windows 7 64bit...



  • Same problem. Qt 5.0.1 mingw (official build from downloads), win7 64bit.



  • 只要创建widget,就是一大堆QWindowsNativeInterface::nativeResourceForWindow: 'handle' requested for null window or window without handle.

    自带的示例也是一样的.不知道是不是qt5.0.1的问题?
    QT5.0.1 win7 32bit ming/vs2010 (official build)都是!

    Just create widget, that is a lot of "QWindowsNativeInterface::nativeResourceForWindow: 'handle' requested for null window or window without handle."

    QT Example has the same problem in QT5.0.1!
    QT5.0.1 win7 32bit mingw4.7/vs2010 (official build)



  • [quote author="xisuosunboy" date="1360592779"]只要创建widget,就是一大堆QWindowsNativeInterface::nativeResourceForWindow: 'handle' requested for null window or window without handle.

    QT Example has the same problem in QT5.0.1!
    QT5.0.1 win7 32bit mingw4.7/vs2010 (official build)[/quote]

    Can you please point me which example and what steps required to see this , i just ran few widget based example and dont see this.



  • It seems you should compile in "debug" mode as in "release" mode, I do no get these messages.



  • [quote author="irfan.omair" date="1360629199"]
    [quote author="xisuosunboy" date="1360592779"]只要创建widget,就是一大堆QWindowsNativeInterface::nativeResourceForWindow: 'handle' requested for null window or window without handle.

    QT Example has the same problem in QT5.0.1!
    QT5.0.1 win7 32bit mingw4.7/vs2010 (official build)[/quote]

    Can you please point me which example and what steps required to see this , i just ran few widget based example and dont see this.

    [/quote]

    "Application Example",When you click to "open" or "save",then there will a lot of "QWindowsNativeInterface::nativeResourceForWindow: 'handle' requested for null window or window without handle."

    Whether in "debug" or "release",this problem occurs.



  • When in windows2003 .QT5.0.1 32bit mingw4.7 (official build)

    “Application Example”,When you click to “open” or “save”,then there one message like this "CoCreateInstance failed (在活动的激活上下文中没有找到任何查找密钥。)"



  • Alright, so it seems it is coming up when you are actually trying to show native dialog. Let me try to reproduce it here



  • [quote author="irfan.omair" date="1360695750"]Alright, so it seems it is coming up when you are actually trying to show native dialog. Let me try to reproduce it here[/quote]

    Did you able to reproduce this problem?Or the problem is only my case.



  • I'm sure it is not only your problem. As you can read in thes thread, many others are affected as well.



  • Yes I was able to reproduce it and have fix if you guys are willing to apply the patch.



  • fix is already in the repo so feel free to use latest or find the patch from there, commit is ac864956f8ba6f6cb527725a4347babab2a1e498



  • [quote author="irfan.omair" date="1360970748"]fix is already in the repo so feel free to use latest or find the patch from there, commit is ac864956f8ba6f6cb527725a4347babab2a1e498 [/quote]

    Received, thank you very much. Although I do not know how to fix the patch, had to wait for 5.02.
    I will continue to learn.
    Thanks again.



  • [quote author="irfan.omair" date="1360970748"]fix is already in the repo so feel free to use latest or find the patch from there, commit is ac864956f8ba6f6cb527725a4347babab2a1e498 [/quote]

    I got the same problem, thank you omair for providing a fix.



  • Also on QT5.0.2 - Qt Commercial MinGW on Win7 64



  • Also on Qt5.0.2 commercial, compiled with VS 2012.2 v110_xp 32 bit:

    Warning:painting\qbackingstore.cpp (101:void __thiscall QBackingStore::flush(const class QRegion &,class QWindow *,const class QPoint &)) - QBackingStore::flush() called with non-exposed window, behavior is undefined



  • Solved my reporting of "QWindowsNativeInterface::nativeResourceForWindow: ‘handle’ requested for null window or window without handle."

    This was was due to one of my DLLs being built by an earlier version of Qt.

    Once I rebuilt all of the code used in my project the error messages stopped.



  • thanks, my warnings are slightly different - it complains about non exposed windows...



  • Hi
    I want to know step by step how I can fix this problem.
    Thanks.



  • What kind of warning do you have in detail?

    "QBackingStore::flush() called with non-exposed window, behavior is undefined"

    or

    "QWindowsNativeInterface::nativeResourceForWindow: ‘handle’ requested for null window or window without handle."

    the latter one was fixed in 5.0.2 as far as I know, the first one still exists. In my app, the first warnign raises as soon as I tabify a dockwidget which is currently hidden.

    I have reported this issue to comemrcial support but did not get any response yet :/

    regards,
    Torben



  • the second one
    “QWindowsNativeInterface::nativeResourceForWindow: ‘handle’ requested for null window or window without handle”



  • Have you upgraded to 5.0.2?



  • I got this error on 5.0.1 but I have the 5.0.2 setup



  • well, then test it if the warning still occurs on in the current stable release (5.0.2) -ideally before asking for support ;)

    Good luck!



  • Ok! I didn't know that the 5.0.1 is unstable. Thanks!



  • hi,

    5.0.1 is not unstable, but it is not the current stable release.

    If you have a bug, it's always worth to verify that the used Qt version is the current stable release. If not, maybe the error is already fixed in the current stable release ;)



  • I get a lot of those messages with that call:

    QFileDialog::getOpenFileNames()



  • Cyttorak: sorry, I lost my crystal ball yesterday, so I cannot help you...

    ...If you really want to get help, you should provide at least a minimal set of information:
    which OS and with Qt version you use.

    Torben



  • Excuse me TorbenD for that poor example. I will create a minimum project in order to provide a better showing of this issue. Is there any jira about this problem so I can upload the example project?

    Thank you


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.