Results 1 to 5 of 5

Thread: cannot create semaphore

  1. #1
    Join Date
    Jul 2006
    Posts
    16
    Thanks
    4
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Question cannot create semaphore

    Hi all,

    I amusing Qt-3.3 Embedded version for my Arm platform.

    Scenario and issue:

    I was trying to test my application recursively by restating it.
    After several succesful iterations, application exited with the following prints:

    Cannot create semaphore /tmp/qtembedded-root/QtEmbedded-0 'd'
    Error 22 Invalid argument

    Cannot get display lock


    I knew that Qt creates semaphores qtembedded-root and qtembedded-unknown in /tmp directory when system initializes.

    May I know what these semaphores are related to and what could have caused such that Qt could not get the display lock???

    Thanks in advance....

    Regards,
    Svaths

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

    Default Re: cannot create semaphore

    I am not much of an embedded programmer, but you stated that you are doing a recursive operation.
    I would check the code for a memory leak (better with a tool), it could be, that you are allocating memory in each iteration, not freeing it, and after several iteration you might run out of memory, specially on limited systmes like embedded ones.
    Just an idea.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    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: cannot create semaphore

    Qtopia could be locking the display for the device and it may have a limited number of locks to use and it's easy to run out of resources if you do recursive operations as high_flyer already said.

  4. #4
    Join Date
    Jul 2006
    Posts
    16
    Thanks
    4
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Lightbulb Re: cannot create semaphore

    Quote Originally Posted by wysota View Post
    Qtopia could be locking the display for the device and it may have a limited number of locks to use and it's easy to run out of resources if you do recursive operations as high_flyer already said.
    Quote Originally Posted by high_flyer
    I would check the code for a memory leak (better with a tool), it could be, that you are allocating memory in each iteration, not freeing it, and after several iteration you might run out of memory, specially on limited systmes like embedded ones..
    Thank you very much both of you.
    I have understood the problem. Some other process of my application was touching files in /tmp directory and was not clearing them which resulted in Qt running out of resources.

    I could fix the problem. Thanks again...

    So the locking of my display had no serious problems, I suppose....


    Regards,
    Svaths

  5. #5
    Join Date
    Mar 2012
    Posts
    7
    Qt products
    Qt4
    Platforms
    Symbian S60 Maemo/MeeGo

    Default Re: cannot create semaphore

    Hi,

    We are facing the same problem. How exactly have you solved this problem.
    Appreciate your response.

    Kusuma

Similar Threads

  1. QFormbuilder : can not create widget of Q3ListView
    By user_mail07 in forum Qt Programming
    Replies: 5
    Last Post: 26th January 2007, 23:12
  2. How to create a standalone executable?
    By Ashish in forum Qt Programming
    Replies: 1
    Last Post: 25th January 2007, 15:04
  3. how to create resource fork & data fork
    By jyoti in forum General Discussion
    Replies: 4
    Last Post: 28th November 2006, 17:20
  4. Replies: 1
    Last Post: 24th October 2006, 16:40
  5. How to create an Insert/Submit button for a form.
    By fnmblot in forum Qt Programming
    Replies: 5
    Last Post: 4th August 2006, 16:18

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.