question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iOS crash on Pose tracking demo EXC_BAD_ACCESS

See original GitHub issue

System 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

  1. Choose pose tracking demo and run on the device for long period of time.
  2. Using front camera and choose 640x480 resolution
  3. Target the camera on a looping video that have human dance.

Full logs See https://docs.unity3d.com/Manual/LogFiles.html Screenshot 2022-01-17 at 9 56 32 AM Screenshot 2022-01-17 at 9 56 43 AM

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:closed
  • Created 2 years ago
  • Comments:31 (14 by maintainers)

github_iconTop GitHub Comments

6reactions
homulercommented, Apr 28, 2022

@siisee11 Thanks! I’ll wait another week or two, and if there are no reports, I’ll merge it into master.

2reactions
laukahocommented, May 3, 2022

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

EXC_BAD_ACCESS crash when iPhone's…
The crash happens after iPhone's orientation is changed while a UIViewController is presented as form or page sheet. Crash only happens on iPhone....
Read more >
iOS EXC_BAD_ACCESS crash how to read errors
EXEC_BAD_ACCESS usually means that you are trying to access an object which is not in memory or probably not properly initialized.
Read more >
IOS app crashed with EXC_BAD_ACCESS in some devices.
Sometimes Description IOS app crashed in some ios devices when terminated app by swiping from device and got below error.
Read more >
EXC_BAD_ACCESS crash error: Understanding and ...
EXC_BAD_ACCESS crashes are annoying but solvable using the right tools. Learn how to use the Xcode sanitizers to fix those crashes in Swift....
Read more >
iOS EXC_BAD_ACCESS Crash
Hi, I'm running into a show stopping crash on iOS. Unity 2020.3.25f1. Trying to load scene using SceneManager.LoadScene() - even a empty ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found