Crashes after a few quick scans
See original GitHub issueHello! I’m using your great little app for attempting something crazy: data exfiltration via QR codes. See qrxfil for the project details, but suffice to say I am aiming to scan dozens of QR codes of ~1KB payload in quick succession.
Issue: App crashes (back to android home) after ~15 to 20 QR code scans (in ~20 seconds)
Expected behaviour: Scan hundreds of QR codes without crash (at a rate of 1 to 2 per second)
Reproduction steps
Initially using BinaryEye version 1.37.0
, reproduced on 1.39.0
(F-Droid)
- Generate a bunch of QR codes of ~1KB data (I used qrxfil on a 500KB file, creating ~500 numbered PNGs to scan)
- Enable
Scan Continously
- In an image viewer, open the first QR code image
- When a QR code is recognized (vibration), move to the next one
- After a few dozen, Android shows homepage without an explanation
Conjectures The crash seems to happen after I scan a few dozen codes, each of which shows a Toast containing the 1KB of decoded text (base64 strings), all overlapping with each other. It is possible the Toast creation logic gets an error when drawing one too many, doesn’t handle it, and crashes? If so, disabling the Toast of QR contents would make the issue disappear. Worth investigating?
Note I have not captured any logs pointing to reason for homepage, and haven’t done any investigation as to what’s wrong, am just reporting the issue naively for now. Expect more digging.
Am happy providing logs if I can, and can share sample QR codes that trigger issues.
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (5 by maintainers)
Nice fixes, I’m closing this ticket now, since we’ve got both a likely root cause, and a fix in the pipes.
This was a fascinating course through Android debugging for me, and I’m you were enthusiast at my crazy project idea. Thanks again for the prompt reaction and patience! Keep up the good work, BinaryEye is a great tool.
Very interesting indeed! So it seems to be the Toast after all! 🤔 And you’re right, this really fits the picture with the SurfaceFlinger errors.
About the truncation - I added this in the last version (in this commit) because I didn’t like the Toast to cover everything 😉 But I did it just for this Toast, when I really should have done in for all the Toasts Binary Eye is opening. That’s why the HTTP answer isn’t truncated yet. I’ll fix this soon and truncate all the Toasts.
Also I guess I should add another setting to switch off the HTTP Toast too. This is unrelated to scanning continousely and there might be use cases where someone wants one but not the other.
And you’re welcome! I’m always happy to help. And I also don’t like it when my apps crash 😉