Title Standalone binaries crash if run inside paths with unicode characters
Priority bug Status resolved
Superseder Nosy List davidbaack, kayhayen
Assigned To kayhayen Keywords standalone, windows, wrong_execution

Created on 2015-08-14.08:07:27 by davidbaack, last changed by kayhayen.

msg1433 (view) Author: davidbaack Date: 2015-08-17.17:57:54
Just tested it and it worked for me! Thanks a ton. And thanks for Nuitka in 
general, it's a godsend
msg1424 (view) Author: kayhayen Date: 2015-08-16.12:02:24
This was part of the hotfix I just made.

Let me know if this works for you too.
msg1422 (view) Author: kayhayen Date: 2015-08-16.11:03:33
So, this was tricks, but basically for Python2 standalone the issue exists.

For standalone, Nuitka was converting to a unicode path, which does not work, as the path is 
not UTF8 then. The right thing is to use the host path as a string, which then exists, even if 
it's ugly characters. But code objects seem to require strings, and not unicode objects, and 
therefore apparently CPython makes them work well internally everywhere.

Only for Python3, the conversion to UTF8 and then unicode strings is needed and done.

So that was tricky. I expect to make it part of the next pre-release, hopefully later today.

msg1420 (view) Author: kayhayen Date: 2015-08-15.08:32:36
Working in: ~/repos/Py2C/Arnþórr

The analysis of the depends.exe output fails, there are two wrong
characters there. And checking Mine.exe.depends, that is correct,
it doesn't handle these well at all.

    assert Utils.isFile(dll_filename), dll_filename
AssertionError: c:\users\hayen\repos\py2c\arn??rr\mini.dist\MINI.EXE

That file then does not exist. In the depends.exe output, in one
place it's correct, and in the detail output, it's wrong then, but
it might be possible to just not check it, and be good. I will be
trying that.

msg1419 (view) Author: kayhayen Date: 2015-08-15.08:17:13
The creation affects standalone mode only, acceleration works fine.
msg1418 (view) Author: kayhayen Date: 2015-08-14.08:11:53
The issue with compilation is that Scons requires for MSVC of paths to encoded in something 
that is definitely not UTF8. This is another issue already, one which needs help. May well be 
the case, that MSVC wouldn't handle it. Can you try MinGW32 or MinGW64 (depending on your 
Python) instead?

The run time issue is more of Nuitka's fault and much more severe as user paths cannot be 
dictated. I will look into it.

msg1417 (view) Author: davidbaack Date: 2015-08-14.08:07:27
For any program generated by Nuitka, if it is run under a directory with a 
Scandinavian character in the directory path (for example 
C:\Arnþórr\MyNuitkaProgram.exe) it will immediately crash when run. I also 
noticed Nuitka itself fails if you try to create an exe from within such a 
Date User Action Args
2015-08-17 19:33:34kayhayensetstatus: chatting -> resolved
2015-08-17 17:57:54davidbaacksetstatus: resolved -> chatting
messages: + msg1433
2015-08-16 12:02:24kayhayensetstatus: testing -> resolved
messages: + msg1424
2015-08-16 11:03:54kayhayensettitle: Generated program crashes if run in a directory with a Scandinavian character -> Standalone binaries crash if run inside paths with unicode characters
2015-08-16 11:03:33kayhayensetstatus: chatting -> testing
messages: + msg1422
2015-08-15 08:32:36kayhayensetmessages: + msg1420
2015-08-15 08:17:13kayhayensetmessages: + msg1419
keyword: + windows, standalone
2015-08-14 08:11:53kayhayensetstatus: unread -> chatting
assignedto: kayhayen
messages: + msg1418
keyword: + wrong_execution
nosy: + kayhayen
2015-08-14 08:07:27davidbaackcreate