PDA

View Full Version : cannot create semaphore



Svaths
14th March 2007, 06:28
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.

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

Thanks in advance....

Regards,
Svaths

high_flyer
14th March 2007, 09:09
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.

wysota
14th March 2007, 20:09
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.

Svaths
15th March 2007, 08:30
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.


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....:cool:


Regards,
Svaths

kusumk
22nd May 2014, 08:30
Hi,

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

Kusuma