Printrun icon indicating copy to clipboard operation
Printrun copied to clipboard

Pronterface showing traceback error

Open oldegoraptor opened this issue 6 years ago • 10 comments

I ran into this issue a few times on multiple multi day prints. So far I've only had this happen with this object. The error wasn't generated until I updated my firmware on my Prusa I3 MK2. This error showed up when slicing with Cura 3.0.4, and PrusaSlicer 2.0. I was able to get past this issue by spamming pause/resume until the printer continued by itself. I am unable to provide the STL and Gcode due to size, but would be more than happy to email them to support bug fixes.

Error message is as follows:

[ERROR] Print thread died due to the following error: Traceback (most recent call last): File "printrun\printcore.pyc", line 534, in _print File "printrun\printcore.pyc", line 619, in _sendnext File "printrun\printcore.pyc", line 644, in _send MemoryError

oldegoraptor avatar Jun 06 '19 02:06 oldegoraptor

This is a memory leak - dict sentlines is never freed. I believe this can be fixed with a macro even for running instances.

volconst avatar Jun 10 '19 12:06 volconst

Try this macro: !print('Before free', len(self.p.sentlines)) !_max = 0 !_min = float('inf') !for k in self.p.sentlines.iterkeys(): ! _max = max(_max,k) ! _min = min(_min,k) !print('min max', _min, _max) !if _min < _max: ! for k in xrange(_min, _max-1024): ! self.p.sentlines.pop(k, None) !print('After free', len(self.p.sentlines))

It should be run when the MemoryError is about to happen or ealier, even every 100 layers in the slicer if supported

volconst avatar Jun 10 '19 18:06 volconst

Already fixed. You must put: (i tried on windows, and get working)

git clone https://github.com/kliment/Printrun py -m venv venv venv\Scripts\activate python -m pip install -r requirements.txt python pronterface.py

CostanzoPablo avatar Apr 12 '20 00:04 CostanzoPablo

Hi @oldegoraptor, I know the issue is quite old, but were you able to solve this problem? Did you try the given solution?

rockstorm101 avatar Apr 18 '20 19:04 rockstorm101

I haven’t been able to mess with it for the last couple months due to a move from the EU. But my stuff arrives here in the next week so I’ll be able to see if the fix mentioned before takes care of that issue.

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10

From: Rock Stormmailto:[email protected] Sent: Saturday, April 18, 2020 13:28 To: kliment/Printrunmailto:[email protected] Cc: oldegoraptormailto:[email protected]; Mentionmailto:[email protected] Subject: Re: [kliment/Printrun] Pronterface showing traceback error (#1007)

Hi @oldegoraptorhttps://github.com/oldegoraptor, I know the issue is quite old, but were you able to solve this problem? Did you try the given solutionhttps://github.com/kliment/Printrun/issues/1007#issuecomment-500525377?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/kliment/Printrun/issues/1007#issuecomment-615932014, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMIL6SWZCT3Q7TPDK34WZGTRNH5MXANCNFSM4HUVLEQQ.

oldegoraptor avatar Apr 19 '20 01:04 oldegoraptor

Hi @oldegoraptor, I hope your moving went alright, do you have any updates on this?

rockstorm101 avatar May 09 '20 08:05 rockstorm101

When I got this error and printing stopped, I was able to hit pause, define and run the macro and then hit resume and it worked. Thanks for the macro @volconst!

davija avatar Aug 13 '20 15:08 davija

Thanks for the feedback, @davija ! How large was the file in MB and lines?

volconst avatar Aug 14 '20 08:08 volconst

Here is the file

modified-fan-base3.zip

davija avatar Aug 14 '20 17:08 davija

2.1M lines, 67MB, thanks.

volconst avatar Aug 14 '20 19:08 volconst