Skip to content
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

Memory Leak with Cura 5.x and OctoPrint Plug-in #277

Open
muckypaws opened this issue May 30, 2022 · 16 comments
Open

Memory Leak with Cura 5.x and OctoPrint Plug-in #277

muckypaws opened this issue May 30, 2022 · 16 comments
Labels

Comments

@muckypaws
Copy link

Hi,

Using the release edition of Cura 5.0 and latest Octoprint Plugin 3.7.2 on macOS 10.15.7, I left a print running on macOS with the Monitor Window open, and left it for several hours.

Cura was unresponsive, iStats was showing over 75Gb memory allocated to Cura. Raised with Cura team as Issue #12372 but seems the problem is possibly related to the ?plugin
Screenshot 2022-05-27 at 20 59 06

@fieldOfView
Copy link
Owner

Thanks for opening an issue here.
For completeness, here's your original log: https://github.com/Ultimaker/Cura/files/8789491/cura.log.zip

@muckypaws
Copy link
Author

cura.log.zip
Thank you, re-uploaded to this issue number. Kind Regards

@fieldOfView
Copy link
Owner

What is striking me as strange is that the logs show the plugin is using zeroconf version 0.31.0, but it should be using version 0.38.1

2022-05-25 15:36:19,837 - DEBUG - [MainThread] OctoPrintPlugin.OctoPrintOutputDevicePlugin.<module> [59]: Using included Zeroconf module version 0.31.0

Could you go to Help -> Show configuration folder..., and then zip up at post the contents of the plugins/OctoPrintPlugin folder inside the configuration folder that opens?

@fieldOfView
Copy link
Owner

Hmm, never mind. I can reproduce the issue that version 0.31.0 is being used instead of the version that should be used. No need to zip up your configuration folder!

@fieldOfView
Copy link
Owner

Could you try disabling the UM3 Network Printing plugin (via the Marketplace) and keeping the OctoPrint Connection plugin enabled? It turns out that if the UM3 Network Printing plugin already imports an older zeroconf version, the newer, fixed version that I supply with the plugin is not being used.

@muckypaws
Copy link
Author

Trying this now, it will take several hours for the issue to manifest it self. Ran for 6 hours this morning and memory usage was at 19Gb, so most likely will update you in the morning. Thanks for you help so far :)

@muckypaws
Copy link
Author

Hi @fieldOfView

Disabled the UM3 component and restarted Cura, Been running two hours and memory already at 8Gb and increasing by around 100mb every second.

Kind Regards

Screenshot 2022-05-30 at 18 52 14
Screenshot 2022-05-30 at 18 52 57

@fieldOfView
Copy link
Owner

Could you post a new cura.log?

@muckypaws
Copy link
Author

Here you go... Happy Hunting :)

cura.log 2.zip
Screenshot 2022-05-30 at 19 08 07

@fieldOfView
Copy link
Owner

It looks like that trick did not get Cura to use the zeroconf version that I include with the plugin. I'll have to come up with another trick.

Something for you to try is to uncheck the "Automatically discover local OctoPrint instances" checkmark in the "Connect to OctoPrint" dialog. You will then have to "Add" your printer by its IP or hostname for it to connect to Cura.

@fieldOfView
Copy link
Owner

Could you test this prerelease of this plugin? https://github.com/fieldOfView/Cura-OctoPrintPlugin/releases/tag/v3.7.3-DEV

  • Download the file for your version of Cura (see the "Assets" section).
  • Drop the curapackage onto the build volume in Cura, as if you were opening a 3d model.
  • Restart Cura.

Please post a new cura.log after you have installed this version of the plugin.

@muckypaws
Copy link
Author

I've just done this, and restarted Cura 5.0, however on the install Plug-In it shows 3.7.2 and not 3.7.3, I'm assuming something more I need do?
Screenshot 2022-06-02 at 19 19 07
?

@fieldOfView
Copy link
Owner

That just shows what version is available in the Marketplace. If you want to see what version is installed, you have to press the cogweheel (top right of the Marketplace dialog). Alternatively, check the top right of the "Connect to OctoPrint" dialog.

@muckypaws
Copy link
Author

Got it, thank you, I have been running your latest code over night.

Observations... Still a memory leak, but not to the extent it was happening before. Cura was around 650mb at 4pm yesterday, left running overnight (mainly doing not much) and this afternoon (about 22.5 hours later) showing under 8Gb memory usage.

I've attached my latest log.

Kind Regards

Screenshot 2022-06-03 at 14 38 38
cura.log 3.zip
Screenshot 2022-06-03 at 14 39 30

@muckypaws
Copy link
Author

I spoke too soon. Left running and memory over 40Gb now.

cura.log 4.zip
Screenshot 2022-06-03 at 19 13 27

@fieldOfView
Copy link
Owner

I think I have finally fixed loading the newer version of zeroconf here:
b4b7d68

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants