Results 1 to 4 of 4

Thread: PC reboot, could it be one of the QMutex undefined behaviour ?

  1. #1
    Join Date
    Jan 2006
    Posts
    162
    Thanks
    9
    Qt products
    Qt3
    Platforms
    Windows

    Default PC reboot, could it be one of the QMutex undefined behaviour ?

    Hello every body,

    Before posting my post here, I have searched a reasonable answer on windows XP forum, without any results so that's why I am now focusing on my application.

    As I said in my post title, does a PC reboot could be one of the multiple undefined behaviour of QMutex use ?

    I ask the question because I have an application wich has a HMI object, before and after each use of this object I use a QMutex that I lock and unlock. I use mutex to protect my HMI object because multiple threads can access it.

    Do you think it could be the reason why my PC reboot ?

    Thanks in advance.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: PC reboot, could it be one of the QMutex undefined behaviour ?

    Hmm... all thought this is possible, it should not be.
    That is to say, it is not likely that your program reboots the PC through a curropt call, since user space programs have no access to system space calls.
    But with windows, every thing is possible...
    Did you try to run the program on another PC/system?

  3. #3
    Join Date
    Jan 2006
    Posts
    162
    Thanks
    9
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: PC reboot, could it be one of the QMutex undefined behaviour ?

    The program is currently in use on a debug PC with another SYSTEM without any bug ... as the PC and SYSTEM are diffent, it is not possible to say that one or the other is the source of the problem.

    In fact my program run on an embedded PC since a few month without any bug. My problem is that I made some changes on the source code of the program a few weeks ago (using QMutex to protect my HMI object access), something very trivial I think, so trivial that I am (quite ) sure that is not my fault. In my opinion, the source of the problem does not come from my program but I prefer being sure before lookin for the other possible sources I am thinking of.

  4. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: PC reboot, could it be one of the QMutex undefined behaviour ?

    I could not quite aunderstand if the "new" version of your program, the one with the changes you inserted with the mutex, runs on both systems, or is it that the version with the changes only runs on one system.
    You should try to run the "problematic" version on more than one system and see how it behaves.
    If it only has problem on one system/configuration then it is more likely the problem is the system (but ofcourse, not 100%), but if the problem is the same on other systems as well, then it is likely that the porblem is your program.
    NEVER asume that threads are trivial!!
    Small changes in mulithreaded programs can introduce "hidden" problems very easely.

Similar Threads

  1. how to correctly compile threads support?
    By srhlefty in forum Installation and Deployment
    Replies: 9
    Last Post: 25th June 2006, 19:15
  2. Strange error while using Q3Canvas
    By Kapil in forum Newbie
    Replies: 13
    Last Post: 15th June 2006, 19:36
  3. I got two problems when I used static compiled library of QT4
    By qintm in forum Installation and Deployment
    Replies: 8
    Last Post: 20th April 2006, 08:52
  4. undefined reference to fftw libraries
    By kmyadam in forum General Programming
    Replies: 2
    Last Post: 9th March 2006, 01:01
  5. linking user space and kernel space programs with qmake
    By zielchri in forum Qt Programming
    Replies: 9
    Last Post: 8th March 2006, 23:11

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.