monich / sailfish-barcode

Barcode reader for Sailfish OS.
https://openrepos.net/content/slava/barcode
13 stars 12 forks source link

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

Open Pohli opened 5 years ago

Pohli commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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...

Pohli commented 5 months ago

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.