-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Bug: Octoprint displays wrong file size and estimates wrong ETL #1765
Comments
Hi @wschadow, It looks like there is some information missing from your bug report that will be needed in order to solve the problem. Read the Contribution Guidelines which will provide you with a template to fill out here so that your bug report is ready to be investigated (I promise I'll go away then too!). If you did not intend to report a bug but wanted to request a feature or brain storm about some kind of development, please take special note of the title format to use as described in the Contribution Guidelines. Please do not abuse the bug tracker as a support forum - if you have a question or otherwise need some kind of help or support refer to the Mailinglist or the G+ Community instead of here. Also make sure you are at the right place - this is the bug tracker of the official version of OctoPrint, not the Raspberry Pi image OctoPi nor any unbundled third party OctoPrint plugins or unofficial versions. Make sure too that you have read through the Frequently Asked Questions and searched the existing tickets for your problem - try multiple search terms please. I'm marking this one now as needing some more information. Please understand that if you do not provide that information within the next two weeks (until 2017-02-24 22:30 UTC) I'll close this ticket so it doesn't clutter the bug tracker. This is nothing personal, so please just be considerate and help the maintainers solve this problem quickly by following the guidelines linked above. Remember, the less time the devs have to spend running after information on tickets, the more time they have to actually solve problems and add awesome new features. Thank you! Best regards, PS: I'm just an automated script, not a human being, so don't expect any replies from me :) Your ticket is read by humans too, I'm just not one of them. |
What were you doing?printing a gcode What did you expect to happen?print the gcode, and diplay correct information What happened instead?wrong information displayed: n the file list you can see that the file has 21.6 MB. In the print dialog it only shows 7.9MB and it printed 8.0MB (?!) of that file. The ETL was displayed wrong; it seems to have taken only 7.9MB into account for the calculation. It displayed a time until the 7.9MB were reached, now it's still "stabilizing", but at least it keeps printing :) Branch & Commit or Version of OctoPrint
Printer model & used firmware incl. versionPrusa I3 MK2 Browser and Version of Browser, Operating System running BrowserFirefox, Win10 Link to octoprint.log[On gist.github.com or pastebin.com. ALWAYS INCLUDE and never truncate.] Link to contents of terminal tab or serial.log[On gist.github.com or pastebin.com. If applicable, always include if unsure or serial.log is usually not written due to performance reasons and must be Link to contents of Javascript console in the browser[On gist.github.com or pastebin.com or alternatively a screenshot. If applicable - Screenshot(s) showing the problem:[If applicable. Always include if unsure or reporting UI issues.] I have read the FAQ. |
Log files please, they are not optional. Provide all requested data. It's impossible to debug anything without that. Also: did you by any chance do the upload of that file by watched folder? In general OctoPrint takes the file size it displays there from the file system. |
the print is not finished, could it that the content is buffered? I'll provide that, once the print is finished |
No, the content is not buffered but the file size is only read at the start of the print. Again, how did you upload that file? Web interface, API (eg through Slic3r), watched folder? |
Ah, log says watched folder. This is a duplicate of #1760 then :) |
I had uploaded the log file already.
The file was uploaded from Simplify3d into the watched folder. BTW the correct file size is in the filelist (see the screenshot)
From: Gina Häußge [mailto:notifications@github.com]
Sent: Freitag, 10. Februar 2017 23:57
To: foosel/OctoPrint <OctoPrint@noreply.github.com>
Cc: wschadow <wolfgang.schadow@t-online.de>; Mention <mention@noreply.github.com>
Subject: Re: [foosel/OctoPrint] Bug: Octoprint displays wrong file size and estimates wrong ETL (#1765)
No, the content is not buffered but the file size is only read at the start of the print.
Again, how did you upload that file? Web interface, API (eg through Slic3r), watched folder?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#1765 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AYgaaGqQRYHW8W4fihpWr78Dz2QbgWhkks5rbOtJgaJpZM4L97Lb> . <https://github.com/notifications/beacon/AYgaaN0RUWwhGGkujL6tPL52ike8f72Fks5rbOtJgaJpZM4L97Lb.gif>
|
I don’t think it’s a duplicate. I uploaded the file only once. Second the correct filesize is displayed in the file list, but not when it’s printed. You judge :)
From: Gina Häußge [mailto:notifications@github.com]
Sent: Samstag, 11. Februar 2017 00:00
To: foosel/OctoPrint <OctoPrint@noreply.github.com>
Cc: wschadow <wolfgang.schadow@t-online.de>; Mention <mention@noreply.github.com>
Subject: Re: [foosel/OctoPrint] Bug: Octoprint displays wrong file size and estimates wrong ETL (#1765)
Ah, log says watched folder. This is a duplicate of #1760 <#1760> then :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#1765 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AYgaaP6kXERxrgipOjG3ryFnK8I4sKy5ks5rbOvcgaJpZM4L97Lb> . <https://github.com/notifications/beacon/AYgaaPwAIvbl9rU_tPWxlfxbObVgmUnoks5rbOvcgaJpZM4L97Lb.gif>
|
Let me put it this way, something's up there with the watched folder with regards to files uploaded through it and their file size as reflected in the job data (which is read at a different point in time than the data in the file list). The original ticket ran into this issue when uploading a second version, you just proofed that the issue also manifests with a first version. But both problems are caused by the same piece of code (which I'll have to go through with a very fine toothed comb) and in all likelihood also the same core issue, the symptoms are just too similar for this to be two isolated issues. |
Ok, fine with me. At least you have enough information and know how to fix it ;)
From: Gina Häußge [mailto:notifications@github.com]
Sent: Samstag, 11. Februar 2017 00:13
To: foosel/OctoPrint <OctoPrint@noreply.github.com>
Cc: wschadow <wolfgang.schadow@t-online.de>; Mention <mention@noreply.github.com>
Subject: Re: [foosel/OctoPrint] Bug: Octoprint displays wrong file size and estimates wrong ETL (#1765)
Let me put it this way, something's up there with the watched folder with regards to files uploaded through it and their file size as reflected in the job data (which is read at a different point in time than the data in the file list). The original ticket ran into this issue when uploading a second version, you just proofed that the issue also manifests with a first version. But both problems are caused by the same piece of code (which I'll have to go through with a very fine toothed comb) and in all likelihood also the same core issue, the symptoms are just too similar for this to be two isolated issues.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#1765 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AYgaaP84iZN0hyZhYD0nHljD9V_JJ--qks5rbO8KgaJpZM4L97Lb> . <https://github.com/notifications/beacon/AYgaaNOQVHglI_4M_jLByUjpSLcPJPUqks5rbO8KgaJpZM4L97Lb.gif>
|
I hope so, if not (eg if I'm not able to reproduce it based on the information I now have) you might get a ping though from the other ticket to provide more details on your exact setup and workflow ;) |
Of course :)
From: Gina Häußge [mailto:notifications@github.com]
Sent: Samstag, 11. Februar 2017 00:35
To: foosel/OctoPrint <OctoPrint@noreply.github.com>
Cc: wschadow <wolfgang.schadow@t-online.de>; Mention <mention@noreply.github.com>
Subject: Re: [foosel/OctoPrint] Bug: Octoprint displays wrong file size and estimates wrong ETL (#1765)
I hope so, if not (eg if I'm not able to reproduce it based on the information I now have) you might get a ping though from the other ticket to provide more details on your exact setup and workflow ;)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#1765 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AYgaaA-jofhynHOh0PJcO5A64r3vnddAks5rbPQrgaJpZM4L97Lb> . <https://github.com/notifications/beacon/AYgaaGOCXxbgfz506D0mIWbhfIAevZudks5rbPQrgaJpZM4L97Lb.gif>
|
How does OctoPrint cope with a slowly written file in the watched folder?
I.e. when output from a slicer how does it decide it is complete? Should
files only be moved into there?
…On 10 February 2017 at 23:37, wschadow ***@***.***> wrote:
Of course :)
From: Gina Häußge ***@***.***
Sent: Samstag, 11. Februar 2017 00:35
To: foosel/OctoPrint ***@***.***>
Cc: wschadow ***@***.***>; Mention <
***@***.***>
Subject: Re: [foosel/OctoPrint] Bug: Octoprint displays wrong file size
and estimates wrong ETL (#1765)
I hope so, if not (eg if I'm not able to reproduce it based on the
information I now have) you might get a ping though from the other ticket
to provide more details on your exact setup and workflow ;)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <
#1765 (comment)> ,
or mute the thread <https://github.com/notifications/unsubscribe-
auth/AYgaaA-jofhynHOh0PJcO5A64r3vnddAks5rbPQrgaJpZM4L97Lb> . <
https://github.com/notifications/beacon/AYgaaGOCXxbgfz506D0mIWbhfIAevZ
udks5rbPQrgaJpZM4L97Lb.gif>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1765 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAijhS-dzTwyKjAd9ncZ8OEpfiEsZ0kvks5rbPTBgaJpZM4L97Lb>
.
|
Files should only be moved from watched to uploads and only when that completes fully should the event be fired that refreshes the file list and also triggers any auto select or print functionality. But I could imagine that something is happening there that's either firing that too early or there is some form of buffering going on after all even though it shouldn't which allows the file to be selected for printing before it is fully written. The problem here is that since I never expected a file to still be written when it is being selected, I'm only reading the file size during initial selection and not during printing (which also has performance reasons - it costs cycles and it should usually not be necessary). So if the file grows after selection stuff gets out of whack. I'll have to solve this by first figuring out what is different between the process in the handling of the watched folder and the regular upload (because something is different here or things like the above would happen all the time with regular upload too), but also making the file size tracking in the job handling more resilient against file size changes. |
Is there no indication that a file is still open? One could imagine a scenario where it takes a long time to write a file for whatever reason. In this case you need to figure out the “right” time to move the file from the watched folder.
From: Gina Häußge [mailto:notifications@github.com]
Sent: Samstag, 11. Februar 2017 08:40
To: foosel/OctoPrint <OctoPrint@noreply.github.com>
Cc: wschadow <wolfgang.schadow@t-online.de>; Mention <mention@noreply.github.com>
Subject: Re: [foosel/OctoPrint] Bug: Octoprint displays wrong file size and estimates wrong ETL (#1765)
Files should only be moved from watched to uploads and only when that completes fully should the event be fired that refreshes the file list and also triggers any auto select or print functionality. But I could imagine that something is happening there that's either firing that too early or there is some form of buffering going on after all even though it shouldn't which allows the file to be selected for printing before it is fully written. The problem here is that since I never expected a file to still be written when it is being selected, I'm only reading the file size during initial selection and not during printing (which also has performance reasons - it costs cycles and it should usually not be necessary). So if the file grows after selection stuff gets out of whack.
I'll have to solve this by first figuring out what is different between the process in the handling of the watched folder and the regular upload (because something is different here or things like the above would happen all the time with regular upload too), but also making the file size tracking in the job handling more resilient against file size changes.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#1765 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AYgaaO8M2485X-wKoWbscryAJB-xZrq1ks5rbWXDgaJpZM4L97Lb> . <https://github.com/notifications/beacon/AYgaaDqQGNDQ-2K9PPVqzWJgTuwRME-Bks5rbWXDgaJpZM4L97Lb.gif>
|
The problem here isn't that the file was moved too early from the watched folder (or your print wouldn't have continued but stopped in the middle). The problem is rather the move from watched folder to regular file storage/uploads folder, or maybe even just the timing of the "oh, look, new file" signal during that move. But I won't get around to look into this until next week, and guessing at possible causes without a close look at the code is pretty moot ;) |
Hm, the two sentences sound contradictory to me, maybe too early in the morning :)
In my “case” I was printing some other file while I uploaded a new one (once!) to the watched folder. In the file list it showed up correctly. At that time it was moved from the watched folder to the upload folder I think. Later, when I started printing the size did not show up in current job display …
From: Gina Häußge [mailto:notifications@github.com]
Sent: Samstag, 11. Februar 2017 09:18
To: foosel/OctoPrint <OctoPrint@noreply.github.com>
Cc: wschadow <wolfgang.schadow@t-online.de>; Mention <mention@noreply.github.com>
Subject: Re: [foosel/OctoPrint] Bug: Octoprint displays wrong file size and estimates wrong ETL (#1765)
The problem here isn't that the file was moved too early from the watched folder (or your print wouldn't have continued but stopped in the middle). The problem is rather the move from watched folder to regular file storage/uploads folder, or maybe even just the timing of the "oh, look, new file" signal during that move.
But I won't get around to look into this until next week, and guessing at possible causes without a close look at the code is pretty moot ;)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#1765 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AYgaaARgI7mmkDBfECxOpxYK2f3oYYgdks5rbW6sgaJpZM4L97Lb> . <https://github.com/notifications/beacon/AYgaaDs8tEgo3CuiBW_WuW2zbfl_HgqKks5rbW6sgaJpZM4L97Lb.gif>
|
When the watched and uploads folders are on different file systems then a
move becomes a copy and delete, so I can imagine the bug might be caused by
delayed write buffering. I have certainly run into race conditions on
Windows file systems with Python when I started using SSD. Here is an
example of my horrible workaround to rmtree() returning before it has
finished removing files.
shutil.rmtree(target_dir) #if making the BOM clear the
directory first
sleep(0.1)
os.makedirs(target_dir)
But I am still curious in how you know the file in the watched folder is
complete when it can be written arbitrarily slowly and can be arbitrarily
long.
…On 11 February 2017 at 08:26, wschadow ***@***.***> wrote:
Hm, the two sentences sound contradictory to me, maybe too early in the
morning :)
In my “case” I was printing some other file while I uploaded a new one
(once!) to the watched folder. In the file list it showed up correctly. At
that time it was moved from the watched folder to the upload folder I
think. Later, when I started printing the size did not show up in current
job display …
From: Gina Häußge ***@***.***
Sent: Samstag, 11. Februar 2017 09:18
To: foosel/OctoPrint ***@***.***>
Cc: wschadow ***@***.***>; Mention <
***@***.***>
Subject: Re: [foosel/OctoPrint] Bug: Octoprint displays wrong file size
and estimates wrong ETL (#1765)
The problem here isn't that the file was moved too early from the watched
folder (or your print wouldn't have continued but stopped in the middle).
The problem is rather the move from watched folder to regular file
storage/uploads folder, or maybe even just the timing of the "oh, look, new
file" signal during that move.
But I won't get around to look into this until next week, and guessing at
possible causes without a close look at the code is pretty moot ;)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <
#1765 (comment)> ,
or mute the thread <https://github.com/notifications/unsubscribe-auth/
AYgaaARgI7mmkDBfECxOpxYK2f3oYYgdks5rbW6sgaJpZM4L97Lb> . <
https://github.com/notifications/beacon/AYgaaDs8tEgo3CuiBW_WuW2zbfl_
HgqKks5rbW6sgaJpZM4L97Lb.gif>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1765 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAijhTk67mP8Mc_AyzrGDn-eqsFWwewSks5rbXC9gaJpZM4L97Lb>
.
|
Hi,
attached please find a screen shot of the issue. In the file list you can see that the file has 21.6 MB. In the print dialog it only shows 7.9MB and it printed 8.0MB (?!) of that file. The ETL was displayed wrong; it seems to have taken only 7.9MB into account for the calculation. It displayed a time until the 7.9MB were reached, now it's still "stabilizing", but at least it keeps printing :)
Cheers,
Wolfgang
The text was updated successfully, but these errors were encountered: