Results 1 to 1 of 1

Thread: Application asked to unregister timer which is not registered in this thread

  1. #1
    Join Date
    Jan 2011
    Posts
    32
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Application asked to unregister timer which is not registered in this thread

    Building this application for Linux/Win and I have been presented with the lovely warning:

    Application asked to unregister timer 0xd000007 which is not registered in this thread. Fix application.
    I have looked around and found that this is a Unix-specific bug already in bug tracker due for correction in 4.8.0. I can verify this happens on Linux, not Win. So, two questions:

    1) The bug report says warning has been disabled for the time being. I am still receiving it, obviously. Using QtCreator 2.0.94 based on Qt 4.7.0 (64-bit) on the Linux side. This is the latest package provided by my Fedora distro. Is there anything I can do to disable the warning? Set a config switch somewhere, etc.?

    2) I have scratched around a bit and found that when the warning occurs, it causes bool QTimerInfoList::unregisterTimer(int timerId) to return false. If I just ignore the warning, is this likely to cause further issues in my application?

    To explain further, this is what seems to have started this behavior. I have a fairly standard application with a QMainWindow along with associated dialogs, classes, etc. For this next step, I have a QToolButton on my QMainWindow. When it is pressed, I create a second QMainWindow, hide the "main" QMainWindow temporarily, then when the user closes the "second" QMainWindow, I once again show the "main" QMainWindow. What actually instigated this was when I installed a QToolButton on the "second" QMainWindow. When it is clicked, it brings up its own dialog. Bringing up and closing that dialog is what causes the warning to emit.

    Would someone perhaps have a suggestion as to a better procedure to follow? The idea is that, when the "second" QMainWindow is called up, the user is actually stepping into a completely different section of the program, and I want it to look that way.


    Added after 1 36 minutes:


    Hmm, OK, quick follow-up:

    When I began receiving the warning, I was creating and opening, then destroying a QDialog with an empty QComboBox and an empty QTreeView. In putting things together, I removed the QTreeView, replaced it with a QTreeWidget, and have populated the QComboBox, connected a few signals/slots, etc.

    Now it appears that the warning has disappeared.
    Last edited by lxman; 17th July 2011 at 18:35.

Similar Threads

  1. Replies: 1
    Last Post: 23rd April 2010, 14:23
  2. how to enable a timer in a non-gui thread?
    By zeopha in forum Qt Programming
    Replies: 3
    Last Post: 5th August 2008, 10:29
  3. Thread, Timer and Socket. Comuication problem
    By ^NyAw^ in forum Qt Programming
    Replies: 6
    Last Post: 17th January 2008, 17:48
  4. Thread(s) and socket, timer slots
    By stephdev1965 in forum Qt Programming
    Replies: 1
    Last Post: 8th November 2006, 15:04

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.