Opengl es 2.0 live wallpaper on Nexus 7 (2012) - java

I'm developing a live wallpaper in android with opengl es 2.0. Started code is enter link description here. I want to reload textures on onSurfaceChanged method of renderer linked to wallpaper (and GLSurfaceView). On my Nexus 7 (2012) with tegra 3, when i try to do this, sometimes i obtain the following error:
08-11 03:54:41.128: D/NvOsDebugPrintf(26131): NvRmChannelSubmit: NvError_IoctlFailed with error code 1
08-11 03:54:41.130: D/NvOsDebugPrintf(26131): NvRmChannelSubmit failed (err = 1, SyncPointValue = 19952985, returning = 0)
08-11 03:54:41.130: D/NvOsDebugPrintf(26131): NvRmChannelSubmit failed (err = 196623, SyncPointValue = 0)
Is anybody got the same problem?

Related

android api 30 Fatal signal 6 (SIGABRT)

My app worked fine at api29. Now getting this native error. No clue otherwise.
D/TransportRuntime.SQLiteEventStore: Storing event with priority=DEFAULT, name=FIREPERF for destination cct
V/FA: Connection attempt already in progress
V/FA: Connection attempt already in progress
D/TransportRuntime.JobInfoScheduler: Scheduling upload for context TransportContext(cct, DEFAULT, MSRodHRwczovL2ZpcmViYXNlbG9nZ2luZy1wYS5nb29nbGVhcGlzLmNvbS92MS9maXJlbG9nL2xlZ2FjeS9iYXRjaGxvZ1xBSXphU3lDY2traUg4aTJaQVJ3T3MxTEV6RktsZDE1YU9HOG96S28=) with jobId=-546033166 in 30000ms(Backend next call timestamp 1639520060629). Attempt 1
D/mainact: buildDisplayDataBase:
A/libc: fdsan: attempted to close file descriptor 75, expected to be unowned, actually owned by FILE* 0xf108246c
Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 20661 (eymoreau.fitlog), pid 20661 (eymoreau.fitlog)
Disconnected from the target VM, address: 'localhost:60917', transport: 'socket'
If you are displaying images try eliminating them to see of it fixes the error.
It did for me and I ended up changing my image loading from:
mainMenu_viewHolder.getImageView().setImageResource(R.drawable.gear);
to...
Bitmap checkImg = BitmapFactory.decodeResource(fragment.getResources(), R.drawable.check);
mainMenu_viewHolder.getImageView().setImageBitmap(checkImg);
The issue is buried very deep so if this doesn't work for you don't try stepping through your code or researching the native error. It will be wasted time. Just disable your fragments entire view structure and add back in piece by piece.

Android cursor = mydatabase.rawQuery breaks app - signal 11

I know that similar questions to this have been asked here before, but this is boggling my mind. I have researched this error and it seems to mostly pop up when you are referencing some part of an array outside its bounds or something, but this error ONLY occurs when I run the app on a virtual device with an API below 23. The machine it fails on is a Galaxy Nexus on API 22, however it also fails on a Nexus 4 with API 22. I tested it also on a virtual Nexus 4 with API 23 and it works, every API above this also works. I want my minimum SDK to be even lower but until I resolve this that will be impossible. Below is some code to help you geniuses see what's driving me insane.
(Cursor resultSet is set globally but it doesn't make a difference)
resultSet = mydatabase.rawQuery("SELECT * FROM words WHERE" + allowRepeats + " frequency >= 0 ORDER BY RANDOM() LIMIT 1",null); -THIS is the line that breaks no matter what I do.
This code renders to "SELECT * FROM words WHERE solved < 1 AND frequency >= 0 ORDER BY RANDOM() LIMIT 1" and this code works on EVERY API above 22, but when running on 22 I get the error "A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x2c in tid 27273 (ics.choicewords)"
Some notes on what I've tried:
I have made sure that the database does exist and like I said it works on other APIs
I have tried setting the cursor just to null and returning empty strings as the result instead of any data, this works fine but of course is not an option
The rawQuery is run inside a loop that cycles 4 times, but taking it out and just running that single line once still breaks with the same error
Error Log:
I/art: Rejecting re-init on previously-failed class java.lang.Class<Tz>
Rejecting re-init on previously-failed class java.lang.Class<Tz>
W/cr_media: Requires BLUETOOTH permission
E/libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY)
D/: HostConnection::get() New Host Connection established 0xae9b0880, tid 5080
E/chromium: [ERROR:gl_surface_egl.cc(411)] eglChooseConfig failed with error EGL_SUCCESS
D/EGL_emulation: eglCreateContext: 0xae9bf7c0: maj 2 min 0 rcv 2
I/Ads: This request is sent from a test device.
D/EGL_emulation: eglMakeCurrent: 0xae9bf7c0: ver 2 0 (tinfo 0xae839eb0)
E/chromium: [ERROR:gl_surface_egl.cc(411)] eglChooseConfig failed with error EGL_SUCCESS
I/DynamiteModule: Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:21001
Selected remote version of com.google.android.gms.ads.dynamite, version >= 21001
V/DynamiteModule: Dynamite loader version >= 2, using loadModule2NoCrashUtils
I/art: Background partial concurrent mark sweep GC freed 2186(176KB) AllocSpace objects, 1(12KB) LOS objects, 33% free, 7MB/11MB, paused 9.052ms total 67.508ms
W/Ads: Invoke Firebase method getInstance error.
The Google Mobile Ads SDK will not integrate with Firebase. Admob/Firebase integration requires the latest Firebase SDK jar, but Firebase SDK is either missing or out of date
I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es
W/cr_MediaCodecUtil: HW encoder for video/avc is not available on this device.
D/EGL_emulation: eglCreateContext: 0xaea6c640: maj 2 min 0 rcv 2
D/EGL_emulation: eglMakeCurrent: 0xaea6c640: ver 2 0 (tinfo 0xae839eb0)
A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x2c in tid 4979 (ics.choicewords)```
I fixed this error a long time ago, so I'm not entirely sure how, but looking back at my old code, it appears the error was created when there were no results that matched the query. I accounted for this afterwards by checking the resultSet count, if it was < 1, I replaced the resultSet with a set of arbitrary values that my app would understand meant no-results. This resolved the issue!

I have error while take screenshot on surface

I have error while take screenshot on surface. After a lot of pictures, this error is made (it comes with the device), but the application does not stop.
After a lot of pictures, this method is no longer working. Do you have an idea about how to solve problems?
#SuppressLint("NewApi")
public static void request(Activity activity, SurfaceView surfaceView, OnScreenShotFinishedListener onScreenShotFinishedListener) {
// Create a bitmap the size of the scene surfaceView.
final Bitmap bitmap = Bitmap.createBitmap(surfaceView.getWidth(), surfaceView.getHeight(), Bitmap.Config.ARGB_8888);
// Create a handler thread to offload the processing of the image.
final HandlerThread handlerThread = new HandlerThread("PixelCopier" + String.valueOf(new Random().nextInt()));
handlerThread.start();
// Make the request to copy.
PixelCopy.request(surfaceView, bitmap, (copyResult) -> {
activity.runOnUiThread(() -> onScreenShotFinishedListener.onScreenShotFinished(copyResult, bitmap));
Log.d("MyData", bitmap.toString());
handlerThread.quitSafely();
handlerThread.interrupt();
}, new Handler(handlerThread.getLooper()));
}
2019-01-29 18:36:07.361 23730-23768/ge.bunny.giffer E/Parcel: dup() failed in Parcel::read, i is 0, fds[i] is -1, fd_count is 2, error: Too many open files
2019-01-29 18:36:07.361 23730-23768/ge.bunny.giffer W/OpenGLRenderer: Failed to get last queued buffer, error = -22
I have seen the same error when using PixelCopy to grab the contents of a SurfaceView continuously (ie. for video transmission). I saw this effect only on Android 7.0 devices.
I attribute this to a memory leak that was present in Readback.cpp which, if I'm not wrong, is what PixelCopy uses internally.
https://github.com/aosp-mirror/platform_frameworks_base/commit/8a29c0ec86a9411a07bb10018c3da69fffc0fe7d#diff-3f79906243073ec92400b65644d330654c8b349e6317259e9639f3a026347d17
This fix was added on September 1st 2016, while Android 7.0 was released August 22nd 2016,

Getting NullPointerException at onFilterTouchEventForSecurity

I have built app in which I integrate YouTube API and it is working fine without any crash but on Fabric I checked some crash whis is ipf.onFilterTouchEventForSecurity. Here is the full logs of the crash:
java.lang.NullPointerException:
at ipf.onFilterTouchEventForSecurity(ipf.java:115)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2351)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2844)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2461)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2844)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2461)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2844)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2461)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2876)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2461)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2844)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2519)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2844)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2519)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2844)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2519)
at com.android.internal.policy.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2840)
at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1853)
at android.app.Activity.dispatchTouchEvent(Activity.java:3061)
at com.android.internal.policy.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2801)
at android.view.View.dispatchPointerEvent(View.java:10246)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:5447)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5283)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4721)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4774)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4740)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4882)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4748)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4939)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4721)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4774)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4740)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4748)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4721)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:7429)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:7298)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:7259)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:7539)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
at android.os.MessageQueue.nativePollOnce(MessageQueue.java:0)
at android.os.MessageQueue.next(MessageQueue.java:323)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:7325)
at java.lang.reflect.Method.invoke(Method.java:0)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
I know that this issue is not because of code but I need to prevent crashing.
Here is list of devices on which I am facing issue:
Samsung Galaxy J7 (j7elte), 1536MB RAM, Android 6.0
Xiaomi Redmi Note 3 (kenzo), 2048MB RAM, Android 6.0
Lenovo TB3-710F (TB3-710F), 1024MB RAM, Android 5.0
Xiaomi Redmi 3S (land), 2048MB RAM, Android 6.0
LeTV Le 2 (le_s2_ww), 3072MB RAM, Android 6.0
LGE LG Stylus2 4G (ph2), 2048MB RAM, Android 6.0
Infocus M2_3G (G10), 10124MB RAM, Android 4.4
I am not able to reproduce it but there are several things you can try:
If possible try adding android:filterTouchesWhenObscured=false as pellucide suggested from the docs:
Specifies whether to filter touches when the view's window is obscured
by another visible window. When set to true, the view will not receive
touches whenever a toast, dialog or other window appears above the
view's window. Refer to the View security documentation for more
details.
May be a boolean value, such as "true" or "false".
Otherwise, you can try overriding the dispatch method of your root view and place a try catch there, you can use it as a custom Component if needed.
#Override
void dispatchTouchEvent(MotionEvent event){
try{
super.dispatchTouchEvent(event);
}
catch (Exception e){
e.printStackTrace();
}
}

Android media.AudioTrack.finalize Throwing IllegalStateException: Binder has been finalized

I am using a custom camera to record Videos on android.
The device experiencing the issue is a Nexus 5 with Android 6.0.1 on it.
When the camera finishes recording for only for the 2nd time, i get the following exception in the under-the-hood android media AudioTrack class. This is something that is called implicitly by android, by the FinalizerDaemon, and not as a result of any code I execute directly. So the FinalizerDaemon calls finalize on AudioTrack, and gets an IllegalStateException.
12-02 09:20:23.155 23705-23714/social.ivideo.greetings E/System: Uncaught exception thrown by finalizer
12-02 09:20:23.160 23705-23714/social.ivideo.greetings E/System: java.lang.IllegalStateException: Binder has been finalized!
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(Binder.java:615)
at com.android.internal.app.IAppOpsService$Stub$Proxy.stopWatchingMode(IAppOpsService.java:435)
at android.media.PlayerBase.baseRelease(PlayerBase.java:136)
at android.media.AudioTrack.finalize(AudioTrack.java:979)
at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:222)
at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:209)
at java.lang.Thread.run(Thread.java:761)
Perhaps I need to do some sort of clean up when the camera finishes recording? Here's the current code I'm using when the recording stops:
#Override
public void stopRecording(boolean wasCancelled, float duration) {
if (mMediaRecorder != null) {
mMediaRecorder.stop();
mMediaRecorder.reset();
if (flashState) {
toggleFlash();
}
if (!wasCancelled) {
callbacks.onFinishedRecording(null, mediaPath, duration, wasCancelled);
}
}
}
mMediaRecorder is an instance of MediaRecorder class.
Any suggestions?
So I think this might be an Android bug. Looks suspiciously like this issue, which is marked as fixed in a "future version": https://issuetracker.google.com/issues/37138597
Same Issue Reported in Android 7.1.2
fixed in Android 8.0 https://android.googlesource.com/platform/frameworks/base/+log/aee6ee94675d56e71a42d52b16b8d8e5fa6ea3ff/media/java/android/media/PlayerBase.java

Categories

Resources