I have an application made in python and gtk compiled with PyInstaller.
Everything is working perfectly. But, some times, the application crashes when loading. The Windows reports failure on ntdll.dll. This may ocorrur on any Windows Version. I found the motive.
First, according the documentation how the one file program works the application is stored in an temporary folder named MEIXXXX, where xxxxxx is a random number.
Then, if the name of this folder contains more than 8 characters, my application crashes in this line:
self.builder.add_from_file(glade_file)
My "glade_file" is mounted like that:
def resource_path(relative):
directory = getattr(sys, '_MEIPASS', os.path.abspath('.'))
return os.path.join(directory, relative)
It's based in this tips:
How to compile all resources into one executable file?
Bundling data files with PyInstaller (--onefile)
When the folder name is longer than eight characters, Windows truncates the name using the tilde. Like this:
C:\Users\myuser\AppData\Local\Temp_MEI41~1
In this case, the real file name is this:
_MEI 41402
I understood it was to work, but it's not what I'm experiencing.
My doubts:
- Is there a way to limit the size of this folder? I saw nothing in the documentation.
- Is there a way to change the temporary folder of place?
- Is there any other way to solve my problem so that my application run safely?