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.

Closing very slow

See original GitHub issue

When I call stopCamera() on iOS, there’s about a 10-second delay where the camera image is still visible, and the rest of the app is frozen.

In Xcode, the last log entry when it freezes is:

2015-03-05 11:39:36.886 Investor[8271:1333954] Stopping session

and the first entry after it hides the window is:

2015-03-05 11:39:45.933 Investor[8271:1333841] THREAD WARNING: ['CameraPreview'] took '9047.212891' ms. Plugin should use a background thread.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Reactions:3
  • Comments:18 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
jacobwebercommented, Jun 10, 2015

This is easier to reproduce if I start the camera, switch to the back-facing camera, then stop the camera. I can only reproduce it on a real device; not a simulator.

I notice that it’s calling [self.sessionManager.session stopRunning] twice:

  • In CameraPreview’s stopCamera method, it first removes the view. This causes CameraRenderController’s viewWillDisappear method to be called, which calls stopRunning.
  • Then the stopCamera method calls stopRunning directly.

This second call seems to cause the delay. If I comment it out, I don’t see the delay. But I don’t know if this would have any other side-effects. What do you think?

1reaction
p3v9d5uicommented, Feb 23, 2018

I’ve tried every suggestion here, including @jacobweber 's and using the latest from master. Nothing has made any difference. @shadowjohn – I don’t understand your comment. Is there some change in the code you’ve pasted? It looks the same as what is in the package.

Has this really been resolved for others? Even with the current master?

Read more comments on GitHub >

github_iconTop Results From Across the Web

10 Factors That Can Dramatically Slow The Closing Process ...
10 Factors That Can Dramatically Slow The Closing Process On A New Home · 1. Lack of Communication with Your Realtor · 2....
Read more >
FIX: Word is slow to open or close. (Solved) - wintips.org
One common problem faced on many computers is the slow launching or termination of MS Word. This problem is usually due to a...
Read more >
Excel is slow when closing files - Microsoft Community
If I have more files open, when I close one of them (no matter the size and even if I choose "Don't save"),...
Read more >
Solved: Illustrator slow when closing documents - 12385426
When I close a document (that is already saved), it takes up to 5 seconds until it's closed. Same when I open a...
Read more >
slow/unresponsive closing Visual Studio with lots of C# projects
Visual Studio is slow to close and sometime becaue unresponsive closing the application when a solution is open with lots of projects. I...
Read more >

github_iconTop Related Medium Post

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