Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Heuristic crash
Hi!
I use screenlets (usually AssetListScreenlet or WebContentDisplayScreenlet) to display contents, but sometimes it's crashing with this error:
Why get this error?How can I prevent/catch this crash?
Thank you!
I use screenlets (usually AssetListScreenlet or WebContentDisplayScreenlet) to display contents, but sometimes it's crashing with this error:
java.lang.IllegalMonitorStateException:
at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease (ReentrantLock.java:152)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.release (AbstractQueuedSynchronizer.java:1285)
at java.util.concurrent.locks.ReentrantLock.unlock (ReentrantLock.java:458)
at com.liferay.mobile.android.auth.refresh.OAuth2AuthenticationRefreshHandler$1.onFailure (OAuth2AuthenticationRefreshHandler.java:45)
at com.liferay.mobile.android.auth.oauth2.TokenRequester$1.onResponse (TokenRequester.java:101)
at com.squareup.okhttp.Call$AsyncCall.execute (Call.java:177)
at com.squareup.okhttp.internal.NamedRunnable.run (NamedRunnable.java:33)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
at java.lang.Thread.run (Thread.java:764)Why get this error?How can I prevent/catch this crash?
Thank you!
Hey, this should be fixed with the 7.2.2 version of the liferay-mobile-sdk-core
I've modified the dependency to the 7.2.2., but the the error is still coming!
Now is coming the below exception.... it's not the same, but similar
java.lang.IllegalMonitorStateException:
at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease (ReentrantLock.java:152)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.release (AbstractQueuedSynchronizer.java:1285)
at java.util.concurrent.locks.ReentrantLock.unlock (ReentrantLock.java:458)
at com.liferay.mobile.android.auth.refresh.OAuth2AuthenticationRefreshHandler$1.onFailure (OAuth2AuthenticationRefreshHandler.java:45)
at com.liferay.mobile.android.auth.oauth2.TokenRequester$1.onFailure (TokenRequester.java:93)
at com.squareup.okhttp.Call$AsyncCall.execute (Call.java:185)
at com.squareup.okhttp.internal.NamedRunnable.run (NamedRunnable.java:33)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
at java.lang.Thread.run (Thread.java:764)
Hey,Are you using liferay-screens in the same project? I think it is using a past version imported for liferay-screensCan you check the version used executing
I hope it helps
./gradlew app:dependencies app is the name of the gradle project, yours can be different I hope it helps
The relevant dependencies
+--- com.liferay.mobile:liferay-material-viewset:4.0.1@aar
+--- com.liferay.mobile:liferay-screens:5.0.3@aar
+--- com.liferay.mobile:liferay-push:1.2.1@aar
+--- com.liferay.mobile:liferay-android-sdk:7.2.2@aar
+--- com.liferay.mobile:liferay-android-services-v62:7.2.2@aar
+--- com.liferay.mobile:liferay-android-services-v7:7.2.2@aar
+--- com.liferay.mobile:liferay-android-services-v71:7.2.2@aar
+--- com.liferay.mobile:liferay-android-services-v72:7.2.2@aar
+--- com.liferay.mobile:liferay-android-sdk-core:7.2.2@aar
+--- com.liferay.mobile:liferay-material-viewset:4.0.1@aar
+--- com.liferay.mobile:liferay-screens:5.0.3@aar
+--- com.liferay.mobile:liferay-push:1.2.1@aar
+--- com.liferay.mobile:liferay-android-sdk:7.2.2@aar
+--- com.liferay.mobile:liferay-android-services-v62:7.2.2@aar
+--- com.liferay.mobile:liferay-android-services-v7:7.2.2@aar
+--- com.liferay.mobile:liferay-android-services-v71:7.2.2@aar
+--- com.liferay.mobile:liferay-android-services-v72:7.2.2@aar
+--- com.liferay.mobile:liferay-android-sdk-core:7.2.2@aar
HeyIf you have the 7.2.2 version it shouldn't be possible to get that error because we didn't even use a reentrantLock in that class, can you check in your project the class OAuth2AuthenticationRefreshHandler and let me know if this is using the lock?
Thanks
Thanks
As you've seen above, I use 7.2.2. I'd like to believe that it shouldn't be possible, but this error is created by endusers mobile. After refreshing to 7.2.2, the error occurrence is less than before in 7.2.1.I don't know how can I check client's lock.I trying to refresh the application one more time.
I inspected the apps logs, on newer version it runs good... no error.Thank you!