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

Crash when opening stl files with Windows username that contains non-Latin characters #9644

Closed
btpavao opened this issue Apr 21, 2021 · 12 comments
Labels
Type: Bug The code does not produce the intended behavior.

Comments

@btpavao
Copy link

btpavao commented Apr 21, 2021

Application Version

4.9.0

Platform

W10 64

Printer

Ender 3

Reproduction steps

After Cura 4.9.0 installation, at add my printer, right after selecting Ender 3 (offline), Cura crashes. I've successfully added Ender 2 and 4, but Ender 3 and Ender 3 Pro crashes.
crashes.https://guides.github.com/features/mastering-markdown/

Actual results

Cura closes, no printer added.

Expected results

Add and comunicate with Ender 3

Additional information

No response

@btpavao btpavao added the Type: Bug The code does not produce the intended behavior. label Apr 21, 2021
@fieldOfView
Copy link
Collaborator

We really need your Cura.log to diagnose the issue. See https://github.com/ultimaker/cura/#logging-issues

@fvrmr fvrmr added the Status: Needs Info Needs more information before action can be taken. label Apr 22, 2021
@btpavao
Copy link
Author

btpavao commented Apr 22, 2021

Please, find attached the logs.
cura.log
DxDiag.txt

@no-response no-response bot removed the Status: Needs Info Needs more information before action can be taken. label Apr 22, 2021
@fieldOfView
Copy link
Collaborator

It could be that Cura does not like the unicode characters in your windows profile name. You might want to try creating another user without unicode characters, and see if Cura runs better when you are logged in as that user.

@btpavao
Copy link
Author

btpavao commented Apr 22, 2021

Thanks for the quick response!

I'll try, though it works with exactly same user name with Cura 4.8.0 without any problems, also the issue seems to be only on Ender 3 profile, while other printers model and brend is ok. Currently I'm using both 4.8.0 and 4.9.0.

@Ghostkeeper
Copy link
Collaborator

Ghostkeeper commented May 7, 2021

This seems to be the relevant part of the log file:

2021-04-21 19:13:11,007 - CRITICAL - [JobQueWorker [3]] cura.CrashHandler.__init__ [66]: An uncaught error has occurred!
2021-04-21 19:13:11,009 - CRITICAL - [JobQueWorker [3]] cura.CrashHandler.__init__ [69]: AttributeError: 'NoneType' object has no attribute 'close'
2021-04-21 19:13:11,060 - DEBUG - [JobQueWorker [2]] UM.FileHandler.ReadFileJob.run [75]: Loading file took 1.5 seconds
2021-04-21 19:13:11,074 - ERROR - [JobQueWorker [3]] UM.Logger.logException [112]: Exception: An exception occurred in 3mf reader.
2021-04-21 19:13:11,077 - ERROR - [JobQueWorker [3]] UM.Logger.logException [116]: Traceback (most recent call last):
2021-04-21 19:13:11,080 - ERROR - [JobQueWorker [3]] UM.Logger.logException [116]:   File "C:\Program Files\Ultimaker Cura 4.9.0\plugins\3MFReader\ThreeMFReader.py", line 225, in _read
2021-04-21 19:13:11,084 - ERROR - [JobQueWorker [3]] UM.Logger.logException [116]:     extents = mesh_data.getExtents()
2021-04-21 19:13:11,089 - ERROR - [JobQueWorker [3]] UM.Logger.logException [116]:   File "X:\4.9-exe\build\inst\lib\python3.8\site-packages\UM\Mesh\MeshData.py", line 220, in getExtents
2021-04-21 19:13:11,093 - ERROR - [JobQueWorker [3]] UM.Logger.logException [116]:   File "X:\4.9-exe\build\inst\lib\python3.8\site-packages\UM\Mesh\MeshData.py", line 296, in getConvexHullVertices
2021-04-21 19:13:11,097 - ERROR - [JobQueWorker [3]] UM.Logger.logException [116]:   File "X:\4.9-exe\build\inst\lib\python3.8\site-packages\UM\Mesh\MeshData.py", line 286, in getConvexHull
2021-04-21 19:13:11,099 - ERROR - [JobQueWorker [3]] UM.Logger.logException [116]:   File "X:\4.9-exe\build\inst\lib\python3.8\site-packages\UM\Mesh\MeshData.py", line 276, in _computeConvexHull
2021-04-21 19:13:11,101 - ERROR - [JobQueWorker [3]] UM.Logger.logException [116]:   File "X:\4.9-exe\build\inst\lib\python3.8\site-packages\UM\Mesh\MeshData.py", line 495, in approximateConvexHull
2021-04-21 19:13:11,104 - ERROR - [JobQueWorker [3]] UM.Logger.logException [116]:   File "X:\4.9-exe\build\inst\lib\python3.8\site-packages\UM\Mesh\MeshData.py", line 512, in createConvexHull
2021-04-21 19:13:11,107 - ERROR - [JobQueWorker [3]] UM.Logger.logException [116]:   File "qhull.pyx", line 2433, in scipy.spatial.qhull.ConvexHull.__init__
2021-04-21 19:13:11,109 - ERROR - [JobQueWorker [3]] UM.Logger.logException [116]:   File "qhull.pyx", line 270, in scipy.spatial.qhull._Qhull.__init__
2021-04-21 19:13:11,111 - ERROR - [JobQueWorker [3]] UM.Logger.logException [116]:   File "messagestream.pyx", line 36, in scipy._lib.messagestream.MessageStream.__init__
2021-04-21 19:13:11,114 - ERROR - [JobQueWorker [3]] UM.Logger.logException [116]: OSError: Failed to open file b'C:\\Users\\Bruno Pav\xc3\xa3o\\AppData\\Local\\Temp\\scipy-c1jpyola'
2021-04-21 19:13:11,141 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [66]: An uncaught error has occurred!
2021-04-21 19:13:11,143 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]: AttributeError: 'NoneType' object has no attribute 'close'
2021-04-21 19:13:11,172 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [66]: An uncaught error has occurred!
2021-04-21 19:13:11,174 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]: AttributeError: 'NoneType' object has no attribute 'close'
2021-04-21 19:13:11,205 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [66]: An uncaught error has occurred!
2021-04-21 19:13:11,206 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]: AttributeError: 'NoneType' object has no attribute 'close'
2021-04-21 19:13:11,237 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [66]: An uncaught error has occurred!
2021-04-21 19:13:11,239 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]: AttributeError: 'NoneType' object has no attribute 'close'

In particular: OSError: Failed to open file b'C:\\Users\\Bruno Pav\xc3\xa3o\\AppData\\Local\\Temp\\scipy-c1jpyola'

This is a known issue in Scipy. It is not yet solved: scipy/scipy#8850 See also my own comments in that issue report for the findings that we have. It is one of the more common crashes that get reported to us via the crash reporter.

This was referenced Jul 21, 2021
@Ghostkeeper
Copy link
Collaborator

Ghostkeeper commented Jul 21, 2021

So far we haven't seen this issue ourselves, but the problem appears to be that the temp folder contains non-Latin characters. Since the temp folder is located in the user folder, it occurs when the Windows username contains non-Latin characters.
We did recently test Cura with non-Latin characters in the username due to an issue with the Qt upgrade for Cura 4.9. But I don't know if we hit this same code path with that test.

We currently have a ticket to solve this issue upstream in Scipy if we can within reasonable time. Developers, see issue CURA-8416.

@Ghostkeeper
Copy link
Collaborator

Ghostkeeper commented Jul 21, 2021

A workaround may be to adjust the environment variable %TEMP% in the Windows environment variables configuration screen?

nallath added a commit to Ultimaker/Uranium that referenced this issue Jul 22, 2021
…issue

Note that this doesn't actually fix the issue, it just prevents it from pulling
down the entire application with it.

Contributes to  Ultimaker/Cura#9644
@nallath
Copy link
Member

nallath commented Jul 22, 2021

4.11 will have a partial fix for this; It won't be fully fixed, but at least it shouldn't crash anymore.

@Mejituu
Copy link

Mejituu commented Sep 8, 2021

4.11 将对此进行部分修复;它不会完全修复,但至少它不应该再崩溃了。

For example, does the official version of cura 4.11.0 fix the problem that the directory exists in non-Aladdin characters and causes a crash?

@fvrmr fvrmr mentioned this issue Sep 10, 2021
2 tasks
@fvrmr
Copy link
Contributor

fvrmr commented Sep 10, 2021

It seems like it isn't fixed in 4.11. I have made a ticket on our backlog for this. Developers see CURA-8552

A work around could be to change your path of the temp folder:

  • Search for environment variables in the windows search bar.
  • This will open system properties and there you can click on Environment Variables.
  • Edit the TEMP variable.
  • Change the Variable value to something like C:\Temp

Here you can read more about modify environment variables: https://docs.oracle.com/en/database/oracle/machine-learning/oml4r/1.5.1/oread/creating-and-modifying-environment-variables-on-windows.html#GUID-DD6F9982-60D5-48F6-8270-A27EC53807D0

@fvrmr fvrmr pinned this issue Sep 10, 2021
@fvrmr fvrmr changed the title Cura 4.9.0 Crash during Ender 3 selection Crash when opening stl files with Windows username that contains non-Latin characters Sep 10, 2021
@fvrmr fvrmr mentioned this issue Nov 18, 2021
2 tasks
@nallath nallath mentioned this issue Nov 30, 2021
2 tasks
@Goodfeat
Copy link

image
Can't open most stl files on сura 5

@MariMakes
Copy link
Contributor

We've made efforts to resolve this with #13394 and Ultimaker/Uranium#855

Closing this issue since it should be resolved for for Cura 5.2 Stable.
If it's not, please feel free to open the issue again and we'll take another look.

@MariMakes MariMakes unpinned this issue Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug The code does not produce the intended behavior.
Projects
None yet
Development

No branches or pull requests

8 participants