Unsolved QCamera busy problem
-
@mrjj said in QCamera busy problem:
Hi
Why does it say that ?
You try to open it multiple times or does your app crash and dont clean up ?
I have not seen such feature in QCamera and it seems to be very tied to the OS
but there might be :)@SGaist said in QCamera busy problem:
Hi,
What are you doing with that camera ?
Hi, its just when the app crash suddenly, the camera dont clean up and I got an error message at the next run, that the camera is busy.
-
@CptN3m0 Hi,
are u using c++?
solution is:
delete the QCamera object before u initialize it,
do like this to avoid program crash//cam is QCamera Pointer object if(cam) { delete cam; } //Then do initialization of cam object
It will frees the previous resource if it is still holding.
Let me the status of ur problem.
:) -
@thippu You are aware that there is nothing to delete if you did not yet initialize it?
-
@jsulm yeah,
It won't enter the if statement ,if there is nothing; -
@thippu That's the point: it will not solve the issue as it will not do anything
-
@jsulm How can you say, it can not solve?Have you tried this?
-
@thippu You start the app, it crashes and leaves the device in busy state. Now you start the app again and execute this lines:
// cam will not be initialized, so if part will not be executed // So, how can this fix the problem? if(cam) { delete cam; // This will NEVER be executed }
-
@jsulm .It will enter the if statement ,if there is any previous resource right?
-
@thippu There will not be previous ressource in the app as you start the app again...
-
The memory used in an application run has nothing to do with the memory used in the next run. Therefore an object allocated in one application run won't be available at all in the next run. The memory space have nothing in common.
-
@jsulm said in QCamera busy problem:
@thippu You start the app, it crashes and leaves the device in busy state. Now you start the app again and execute this lines:
// cam will not be initialized, so if part will not be executed // So, how can this fix the problem? if(cam)//if cam not initialized this statement will not be executed right? { delete cam; // This will NEVER be executed }
-
@thippu yes ,you are getting it;
-
@SGaist Yes, true