Cura: [3.6.0] Please stop detecting file changes in real time

Created on 4 Feb 2019  路  16Comments  路  Source: Ultimaker/Cura

Gotta say I am loving Cura, but the file handling in Ubuntu/Mint at least, needs a little work to make it more user-friendly. But, back to the bug-like issue.

Application Version
3.6.0 Appimage

Platform
Ubuntu 16.04, Ubuntu 18.04, Mint 19.1

Printer
Custom Delta -- sorry cannot attach .3mf as printer at another site, but NOT printer dependent issue

Steps to Reproduce
Add the steps needed that lead up to the issue
Using Workspaces: Cura running in Workspace-1. FreeCAD running in Workspace-2. Load .obj file from Workspace-2 into Cura, Slice and "Save to File." Leave as is, go to FreeCAD Workspace, make changes and save. Come back to Cura Workspace and the attached pic says it all.

Actual Results
What happens after the above steps have been followed
Multiple panels that must be cleared before Cura is alive again. Must be removed by clicking "X" in the lowest panel until all are gone. Make ten change/save then ten panels must be removed.

Expected results
What should happen after the above steps have been followed
It does happen, Cura comes back to being usable after clearing all the "RELOAD..." panels.

Additional Information
Extra information relevant to the issue, like screenshots
A picture paints a thousand words. Cura needs to stop monitoring the currently open file to request "RELOAD..."

cura-file-bug-001

Uranium FixeSolved Bug

Most helpful comment

that last part needs a minor refactor to allow changing the text on the fly, iirc.

Just close it and recreate it with a new text. Much less annoying than having multiple messages stacked on top of eachother.

All 16 comments

This bug has been around for quite a while (https://github.com/Ultimaker/Cura/issues/3936). They don't seem to be worried about fixing it.

You know, thinking about this some more. I don't know why they have this feature at all. Given that the user has probably just updated the model file (STL/OBJ) by exporting it from their drawing package.

It's easy to disable these messages with a little edit to the code but as you are using the AppImage I don't know if you can get to the Python easily. Anyway, here's a patch that will stop these messages appearing. They have already disabled this feature for Windows as it causes crashes. It seems to me that it would be much better if it was disabled completely for all platforms.

````
diff --git a/UM/Scene/Scene.py b/UM/Scene/Scene.py
index d09b33540..cccc640c7 100644
--- a/UM/Scene/Scene.py
+++ b/UM/Scene/Scene.py
@@ -145,14 +145,14 @@ class Scene:
# param file_path The path to the file that must be watched.
def addWatchedFile(self, file_path: str) -> None:
# The QT 5.10.0 issue, only on Windows. Cura crashes after loading a stl file from USB/sd-card/Cloud-based drive
- if not Platform.isWindows():
+ if False and not Platform.isWindows():
self._file_watcher.addPath(file_path)

 ##  Remove a file so that it will no longer be watched for changes.
 #   \param file_path The path to the file that must no longer be watched.
 def removeWatchedFile(self, file_path: str) -> None:
     # The QT 5.10.0 issue, only on Windows. Cura crashes after loading a stl file from USB/sd-card/Cloud-based drive

- if not Platform.isWindows():
+ if False and not Platform.isWindows():
self._file_watcher.removePath(file_path)

 ##  Triggered whenever a file is changed that we currently have loaded.

````

I don't know Python so maybe it's possible to simply omit the bodies of those functions completely.

OK, thanks, but what do I do with the Patch? I just did some searching and cannot find anything on applying patches to Cura.

A bit bizarre that this issue has been removed from windows version, but the poor old Hay-seeds using Linux still must suffer. :)

Sorry, I don't know how the file in the AppImage can be altered. Perhaps it's possible to unpack the AppImage, edit the file and either pack the AppImage again or just execute Cura from the unpacked files. I don't have any experience of doing that.

I don't know Python so maybe it's possible to simply omit the bodies of those functions completely.

No, that doesn't work so the simplest fix is to insert a return statement as the first line of those two functions (addWatchedFile() and removeWatchedFile()).

I don't use this feature very often but when I do, it's a bit annoying.

The simplest proper fix would be to create only one message and just make it visible and change the text every time it needs to appear. I looked at it in between stuff a while ago, but that last part needs a minor refactor to allow changing the text on the fly, iirc.

But given that the feature has been disabled on Windows anyway, why not just remove it completely?

that last part needs a minor refactor to allow changing the text on the fly, iirc.

Just close it and recreate it with a new text. Much less annoying than having multiple messages stacked on top of eachother.

I think this feature is used in @thopiekar his Solidworks plugin.

No. I contributed the feature, yes, but it is not part of any plugin. I contributed directly to Cura/Uranium, I think.

@smartavionics The feature is basically not bad. It just needs some tuning like @fieldOfView suggested.
The comment says that it only happens on 5.10.0 (or the 5.10 series?). Why not adding a check, which Qt version we are running at?
Think that would make sense, so as soon as we are running on more recent Qt, then it should work.

You may be right but I've given up with it and now it is disabled. For me, the feature is just irksome and provides zero benefit.

For me, the feature is just irksome and provides zero benefit.

It is irksome only when it does the multiple things. I think it is a good thing, but it needs taming. :)

if (!panel.open) { panel.show; }
So, where does that leave me with the appimage?

Yeah, it's pretty damn annoying. I also use cura via AppImage and would be very happy if this gets fixed. I like the idea behind this feature. But right now it's just broken.

We fixed this for version 4.0: https://github.com/Ultimaker/Uranium/commit/1ec5023152977ec7099508302e5915bce7f7804d

It now only shows the message once.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dstulken picture dstulken  路  3Comments

Nemernemer picture Nemernemer  路  3Comments

timherrm picture timherrm  路  3Comments

ferociousdiablo picture ferociousdiablo  路  3Comments

jornada812 picture jornada812  路  3Comments