-
Notifications
You must be signed in to change notification settings - Fork 40
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
save-screen: "IOError: image file is truncated" #10
Comments
Hi @shirriff, thanks for sharing this report. I fear, it's out of the scope of this software to fix that. In my opinion, the safe option is to pause the scope and then fetch the screenshot as otherwise the scope might be overloaded in cases as the one you mentioned. Did you make any further observations concerning this issue? |
To clarify, this happens when the scope is stopped, so it's not a matter of the scope being too busy. The problem happens if there are a lot of pixels displayed, for instance if you traced a signal that oscillated a lot. My assumption is that the image file is larger in this case (since the png file can't be as compressed), and this causes the problem with save-screen. Perhaps it overflows a buffer in save-screen, or gets split into two packets? |
Here's an example of a screen image that won't save from the oscilloscope. This trace was generated by leaving the probes connected to nothing so they pick up noise and putting them on 10mV / 200ms, so there's a lot of pixels on the screen. Trying to download this with Of course, this could be a problem on the oscilloscope side (either generating a bad image or truncating it while sending). But I'm putting the bug report here in case the problem is on the Python side. |
FWIW, Seeing the same issue here with my DS1054z. |
I know this issue is very old, but just hit same problem. Thank you for your input, it allowed me to nail down the reason. |
Thanks for this, @QrackEE - I just ran into
Which appears to be unhandled, as this is reported as well:
On Windows, the file might be at
I just added
as suggested. |
Yep, increasing that buffer fixed my truncated reads.
|
Marc Finet <[email protected]>: Since allowing BMP would generate a bigger traffic, and it seems that some PNG might be bigger than 100k [1] [1] pklaus#10
When I do
save-screen
and there's a whole lot of stuff on the oscilloscope screen (i.e. high frequency oscillations), it dies with IOError. This seems to happen repeatably for dense screen contents, but save-screen works fine most of the time.The text was updated successfully, but these errors were encountered: