Issue
I have an Android APP using Android NDK and a ANativeWindow. Sometimes, the app hangs and my logs show:
unable to lock window buffer (error code: -38)
Or
unable to lock window buffer (error code: -19)
This issue goes away if I press the power button to lock the device and again to unlock it. The app returns and starts to work OK.
The question is, I tried to search for a list of error codes returned by ANativeWindow_lock to find the meaning of this errors, but I found none.
How can I find the description of these error codes?
Thanks in advance, Carlos Santos
Solution
I believe these are INVALID_OPERATION
and NO_INIT
.
You can find the error codes typically used internally by the Android framework here.
As you can see, many of these error codes are defined as the negatives of error codes from errno.h
. Those error codes can be found here (first 34) and here (the rest).
So, if for example you look up the value 19, you see that it's ENODEV
. And the Android error code that is set to -ENODEV
(i.e. -19) is NO_INIT
.
Answered By - Michael
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.