iOS crash on Pose tracking demo EXC_BAD_ACCESS
See original GitHub issueSystem information
- OS Platform and Distribution (e.g., Linux Ubuntu 20.04): iOS 14.8
- Target Platform: iOS 14.8
- Mobile Device (if the target is Android or iOS): iPhone XS
- MediaPipeUnityPlugin version or commit id: efc7664e3ed5d997ee618c364bd2256896a43aae
- Bazel version: 4.2.1
- GCC/G++ version:
- Android NDK version (if the target platform is Android):
- Xcode version (if the target platform is iOS): 13.1
Describe the current behavior App crash after running for while. The crash timing is random. Sometime 10 mins but sometimes can run for an hour.
Steps to reproduce the issue
- Choose pose tracking demo and run on the device for long period of time.
- Using front camera and choose 640x480 resolution
- Target the camera on a looping video that have human dance.
Full logs See https://docs.unity3d.com/Manual/LogFiles.html
Additional Context
The above behaviour is running the demo in Async
mode. Therefore, I have also tested on Sync
mode. It seems the error will not occur. The demo can run for more than 2 hours in Sync
mode
From the callback stack trace, I found out this is caused by the source code from mediapipe. I think Sync
mode can prevent to trigger the last element in mirrors_
so the bug cannot be triggered.
mediapipe/framework/output_stream_manager.cc
line 191
// mediapipe/framework/output_stream_manager.cc line 191 from https://github.com/google/mediapipe/
for (int idx = 0; idx < mirror_count; ++idx) {
const Mirror& mirror = mirrors_[idx];
if (add_packets) {
// If the stream is the last element in mirrors_, moves packets from
// output_queue_. Otherwise, copies the packets.
if (idx == mirror_count - 1) {
mirror.input_stream_handler->MovePackets(mirror.id,
packets_to_propagate);
} else {
mirror.input_stream_handler->AddPackets(mirror.id,
*packets_to_propagate);
}
}
if (set_bound) {
mirror.input_stream_handler->SetNextTimestampBound(mirror.id,
next_timestamp_bound);
}
}
Do you have any idea how to fix it? I would love to contribute in it. By the way, nice project. It helps me a lot.
Issue Analytics
- State:
- Created 2 years ago
- Comments:31 (14 by maintainers)
Top GitHub Comments
@siisee11 Thanks! I’ll wait another week or two, and if there are no reports, I’ll merge it into master.
I also tested
78b2d1a
and run on IPad Mini 6 for 2 hours. The crash didn’t happened. Let’s see if there are more testing result in the future. Thanks for the fix @homuler