-
Notifications
You must be signed in to change notification settings - Fork 127
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
Crashes after a few quick scans #166
Comments
Hello, and thanks for submitting this issue! 👍 Off the top of my head, I have no idea what's going wrong here unfortunately. But this shouldn't happen for sure! Regarding your guess about the Toast, I am not sure if this is the cause - at least I can't see how this could be the cause just by looking at the code. But disabling the Toast would sure be a good idea for that use case. Also, there's a 500ms delay after recognizing a code at the moment. Two things that should better be configurable for your use case I guess. Unfortunately, I can't see anything related to the crash in Google's crash logs. And since it's not so easy to reproduce this crash, I'd really appreciate it if you could capture the logcat output. You'd need the adb tool for it (comes with Android Studio, the bare Android SDK, and may be available in your package manager, homebrew, apt, etc), and to enable "adb debugging" on your device. Then you can do:
And look for errors. If you want to see the messages in color, you could use pidcat:
About your use case and your project: what do you do with all the scanned codes in Binary Eye? How do you export them? Off topic, do you know QR Codes have a binary input mode? This way you could save up to 2,953 bytes in a single QR Code (also that would mean the QR Code would become harder to read because of its size). A quick and easy way to find a sweet spot would be to use qrencode (also available in your package manager) because it can produce QR Codes with binary content:
And Binary Eye can read barcodes with binary content, of course. |
Right! Logs: Culled a bit to be relevant time-wise. That's a lot of noise but not a lot of signal I can see. The back-to-homepage crash I witnessed was at 22:54:10, but may have crashed internally a few seconds earlier (timeouts, escalation of kill etc). Best I can see is:
I don't know where to go from there, but I am happy posting a few dozen Chunks for issue reproductibility. Currently I export scans to file in semicolon CSVs, and do a little Regarding my project, I saw binary mode, and am excited to get to it, but my cheapo prototyping in bash had issue in decoder when exporting CSV of binary so I went with base64 as a stopgap, as that works everywhere and is readable as ASCII. I look forward to using binary QR code to triple my payload (currently 1KB of base64 ~=750 bytes decoded). I also noticed the big QR codes like version 40 was a lot more prone to decoding issues in binaryeye (finding EAN codebar instead, guessing something about a low-pass filter early in the pipeline?) so I limited myself to 1KB payload ~= QR version 26-ish? Thank you for your interest in my crazy endeavour! |
I too experience crashes - can't use the app at all: ScreenRecord-2021-03-08-19-30-05.mp4 |
@doronbehar This is a most probably a known RenderScript issue 😬 Sorry for that! I guess you installed the app with F-Droid? Because F-Droid's build is broken for some devices running Android 6 🙈 Find the details in #113 A possible workaround would be to install the app either from GitHub or Google Play. |
@OverkillGuy Thanks a lot for the logcat! 👍 And yes, I know, it's a lot of noise 😬 I think the snippet you posted is just the aftermath of the real problem - before that there are a lot of camera errors 🤔 But I can't see exactly what's causing the error yet either. So I took Now, to rule out the Toast hypothesis I just added a new setting to disable that Toast in when scanning continuously: I don't know if you're interested, but if you could build and run the app from source, you could try that right away. You'd just need the Android SDK (or Android Studio). Then, it would be a simple as cloning the app and running If you're not interested in building the app yourself, I will happily publish a beta version for you to try that change. PS: So, this works with GNU and BSD tools and is zipping the file before it's transferred. Also I used the 8-bit mode I mentioned before to make the QR Codes have as few modules as possible.
Binary Eye would export binary data as a Hex Dump, which can be used with
|
Am running a Nexus 5X (from 2016, getting a bit senile, worried the root cause is running out of RAM somehow) on LineageOS 15.1 (Android Oreo 8.1) non-rooted with F-Droid package version 1.39.0. Here is a full unredacted logcat, crash around 00:14:35. I mostly truncated before because it looked like logcat captured stuff from my local wifi to bluetooth MACs, but meh. For completeness here is the 581 chunk file I tried to scan Tried building, but the Ubuntu (pop OS) package For the script, thanks for having a look, I'm just glad people are as excited as I am about breaking airgaps creatively. It does looks much simpler without base64, chunk integer identification, and more bash knowledge =) Funny you mention compression, I created a few tickets to log bugs/ideas that were on my mind and nowhere else, including OverkillGuy/qrxfil#8 and OverkillGuy/qrxfil#10, those are indeed relevant to what you describe (I went for zstd in my mind though). |
Thanks for the full logcat and the original chunk files. I just scanned all 581 chunks with a Nokia 5 (with 2 GB RAM, which is the same as your Nexus 5X has) on Android 9 without a crash. Hm. So it's probably not a memory issue. Also, memory consumption should be stable over time - otherwise there would be a memory leak that I haven't noticed yet 😬 I will try more devices in the coming days and check for memory leaks just to be sure it's not a leak. The last error before the crash in logcat comes from the SurfaceFlinger so maybe the crash has something to do with the Toasts. And yes, I know installing the Android SDK on Ubuntu can be quite a hassle 😉 So I put the new version (1.40.0) in beta so you can try it without having to build the app (you can always go back from beta). This version, 1.40.0, should also be on F-Droid in a few hours, if you prefer to install it from F-Droid. |
I checked version 1.40.0 from here on GitHub and it ran fine for me. The F-Droid version is not updated to 1.40.0 yet. |
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 😉 |
Ellipsize texts in Toasts after 128 characters to not clutter the UI with too long texts. There's at least one case where too long toast texts caused crashes: #166
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. |
Hello! 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 on1.39.0
(F-Droid)Scan Continously
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.
The text was updated successfully, but these errors were encountered: