Pose Estimation App keeps stopping

Hello, I’m using a clean install of the Pose Estimator Application from the Fritz AI Github.
The main method was updated recently, and I think that’s been causing issues.
After extracting the Pose Estimator from the fritz-examples repo, I loaded it into Android Studio and selected run. The build finished, and then the app installed. It attempts to run, but closes with the error message: “Pose Estimation App keeps stopping”

  • The version of the Fritz SDK, testing device, and Android API used (e.g Fritz v5.0.1, Samsung Galaxy S7, API 29):

ai.fritz:core:6.0.0-beta.2
ai.fritz:vision:6.0.0-beta.2
Google Pixel 3 XL
compileSdkVersion 29
minSdkVersion 24
targetSdkVersion 29

**Problematic code snippet **
poseResult = predictor.predict(visionImage);

  • Any important or relevant context about the code snippet and/or the solution you’re seeking:

I just wanted to let you guys know that this problem exists, and ask if you know of the potential solution to get the app to run. I do know that the last version worked fine, I tested it on my Pixel a couple days ago and there weren’t any problems.

The outputted error message in its entirety:

E/libc: Access denied finding property “vendor.gralloc.disable_ahardware_buffer”
W/Gralloc3: allocator 3.x is not supported

E/AndroidRuntime: FATAL EXCEPTION: inference
Process: ai.fritz.poseestimationdemo, PID: 18721
java.lang.NullPointerException: Attempt to invoke virtual method ‘ai.fritz.vision.poseestimation.FritzVisionPoseResult ai.fritz.vision.poseestimation.FritzVisionPosePredictor.predict(ai.fritz.vision.FritzVisionImage)’ on a null object reference
at ai.fritz.camera.MainActivity.lambda$onImageAvailable$2$MainActivity(MainActivity.java:211)
at ai.fritz.camera.-$$Lambda$MainActivity$BbZOhES36tGu02NAptQZle9NdHE.run(Unknown Source:2)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.os.HandlerThread.run(HandlerThread.java:67)

Hi @alonzor - Thanks for bringing this to our attention! It looks like an issue with our latest example where the predictor is not being initialized. I will look into that and fix it up but in the meantime, you can add this to the onCreate method of the MainActivity.

PoseOnDeviceModel poseEstimationOnDeviceModel = PoseOnDeviceModel.buildFromModelConfigFile("pose_recording_model.json", new HumanSkeleton());
predictor = FritzVision.PoseEstimation.getPredictor(poseEstimationOnDeviceModel);

That should get you up and running again.

Thanks,
Eric