Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera window fails if flash has been activated before outside of app #4

Open
Pohli opened this issue Dec 1, 2018 · 3 comments
Open

Comments

@Pohli
Copy link

Pohli commented Dec 1, 2018

CodeReader is running, home view with camera. Then open top menu and try to activate flashlight, it doesn't work. This is intended behaviour I guess.
But now minimise CodeReader, open top menu and activate flashlight. Then return to CodeReader, it'll break camera view.
Another way is: in CodeReader go to history page, call top menu and activate flashlight, close top menu and return to CodeReader's main view. Camera view won't work.
This bug doesn't occur if you activate flashlight and freshly start CodeReader app (not running before).

Jolla Phone with SFOS 3.0.0.8, CodeReader 1.0.12

@monich
Copy link
Owner

monich commented Dec 1, 2018

Thanks for the report! Both flashlight and CodeReader use the same API and the same resource (camera) so it's not surprising that they interfere with each other. But they shouldn't break each other, that's not good.

The funny thing is that when I run CodeReader under debugger everything works nicely. Without debugger, I can reproduce the problem. Let's see what I can do about it...

@monich
Copy link
Owner

monich commented Dec 1, 2018

Based on the core dump, the app seems to be eventually crashing inside gstreamer plugin. If the problem is that deep in the guts of the multimedia pipeline, I may not be able to fix it in the app...

monich added a commit that referenced this issue Feb 3, 2019
In case if GlobalHistogramBinarizer::getBlackMatrix() throws an exception
like this:

  #0 zxing::Exception::Exception () at Exception.h:34
  #1 ReaderException::ReaderException () at ReaderException.h:30
  #2 NotFoundException::NotFoundException () at NotFoundException.h:28
  #3 zxing::GlobalHistogramBinarizer::estimateBlackPoint() at GlobalHistogramBinarizer.cpp:198
  #4 zxing::GlobalHistogramBinarizer::getBlackMatrix () GlobalHistogramBinarizer.cpp:129
  #5 zxing::BinaryBitmap::getBlackMatrix () BinaryBitmap.cpp:40
  ...
@Pohli
Copy link
Author

Pohli commented Apr 28, 2024

At least on an Xperia 10 III with SFOS 4.5.0.24 and CodeReader 1.0.51 it works. In both cases flashlight is turned off automatically and camera view doesn't break but works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants