mediapipe: Flogger related exception blocking object instantiation.
Please make sure that this is a solution issue.
System information (Please provide as much relevant information as possible)
- Have I written custom code (as opposed to using a stock example script provided in Mediapipe):Yes
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04, Android 11, iOS 14.4):Ubuntu 18.04 in Google Colab
- MediaPipe version:Latest android release
- Bazel version:
- Solution (e.g. FaceMesh, Pose, Holistic):Hands
- Programming Language and version ( e.g. C++, Python, Java):Java/Android
Describe the expected behavior: When creating the initial Hands object, the logger used in framework.Graph.java which is Flogger, is throwing the exception as in the logcat attached. The expected behaviour is the instantiation happening with no exceptions.
Standalone code you may have used to try to get what you need :
To reproduce the issue one can use the official android example.
If there is a problem, provide a reproducible test case that is the bare minimum necessary to generate the problem. If possible, please share a link to Colab/repo link /any notebook:
Other info / Complete Logs : Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached:
2021-09-25 19:03:10.744 32150-32150/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.myapplication, PID: 32150 java.lang.ExceptionInInitializerError at com.google.common.flogger.backend.Platform$LazyHolder.access$100(Platform.java:65) at com.google.common.flogger.backend.Platform.getCallerFinder(Platform.java:189) at com.google.common.flogger.FluentLogger.forEnclosingClass(FluentLogger.java:70) at com.google.mediapipe.framework.Graph.<clinit>(Graph.java:33) at com.google.mediapipe.solutioncore.SolutionBase.initialize(SolutionBase.java:68) at com.google.mediapipe.solutioncore.ImageSolutionBase.initialize(ImageSolutionBase.java:53) at com.google.mediapipe.solutions.hands.Hands.<init>(Hands.java:130) at com.example.myapplication.MainActivityNew$1.onSurfaceTextureAvailable(MainActivityNew.java:66) at android.view.TextureView.getHardwareLayer(TextureView.java:390) at android.view.TextureView.draw(TextureView.java:339) at android.view.View.updateDisplayListIfDirty(View.java:16275) at android.view.View.draw(View.java:17059) at android.view.ViewGroup.drawChild(ViewGroup.java:3731) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3517) at android.view.View.updateDisplayListIfDirty(View.java:16270) at android.view.View.draw(View.java:17059) at android.view.ViewGroup.drawChild(ViewGroup.java:3731) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3517) at android.view.View.updateDisplayListIfDirty(View.java:16270) at android.view.View.draw(View.java:17059) at android.view.ViewGroup.drawChild(ViewGroup.java:3731) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3517) at android.view.View.updateDisplayListIfDirty(View.java:16270) at android.view.View.draw(View.java:17059) at android.view.ViewGroup.drawChild(ViewGroup.java:3731) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3517) at android.view.View.draw(View.java:17296) at com.android.internal.policy.DecorView.draw(DecorView.java:753) at android.view.View.updateDisplayListIfDirty(View.java:16275) at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:648) at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:654) at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:762) at android.view.ViewRootImpl.draw(ViewRootImpl.java:2834) at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2642) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2249) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1280) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6432) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874) at android.view.Choreographer.doCallbacks(Choreographer.java:686) at android.view.Choreographer.doFrame(Choreographer.java:621) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6290) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) Caused by: java.lang.IllegalStateException: No logging platforms found: com.google.common.flogger.backend.system.DefaultPlatform: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/common/flogger/util/Checks; at com.google.common.flogger.backend.Platform$LazyHolder.loadFirstAvailablePlatform(Platform.java:98) at com.google.common.flogger.backend.Platform$LazyHolder.<clinit>(Platform.java:66) ... 48 more
Interestingly this issue emerged just today. And my code was working as expected till yesterday. I observed Flogger had a release some hours ago. But the issue is still there when I tried with the previous release.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 3
- Comments: 15
The issue seems to be resolved for me. Able to run it without any issues using
implementation ‘com.google.flogger:flogger:latest.release’ implementation ‘com.google.flogger:flogger-system-backend:latest.release’
oh ~ I know your problems, When I use :
I got this error too, even if use version 0.6 flogger But when I used myself build pose_tracking_gpu.aar , there no this error.
Yes, I can confirm that this is solved since a new version of flogger (0.7.1) has been released which contains all necessary classes.
There are some missing classes in the latest release of flogger. I think we have to wait for a new release, see https://github.com/google/flogger/issues/297
@wingdi Same here, tried everything. Downgraded to version 0.6. Invalidated cache and restarted. But problem persists!
@sgowroji pls help