Skip to content

Packaged app compressed with UPX crashes at startup in Windows x64 #4178

@MyDataIsReady

Description

@MyDataIsReady

If I use UPX, my app crashes as soon as it starts (there's no console output when I use cmd.exe). Weird thing is, bundled app with --onefile works with no issues (files seem to be compressed, *.exe is smaller when I use UPX if I recall correctly).
Everything works well in Windows 7 x86 too.

According to Windows 7 error message, "ucrtbase.dll" fails but according to Windows 10 (x64) error message, "vcruntime140.dll" does, so the workaround is easy: replacing each faulty *.dll file with its non-compressed version. It solves the problem but somewhat extensive testing is would be needed.
Have no tried Windows 8 yet.

OS: Windows 7 x64
UPX: 3.95 (x64 and x86), 3.94 and 3.93
Python: 3.7.3 x86 fresh install
Pyinstaller: 3.4 and 3.5dev0+b54a15d72e (no cache files)
Test toy code:

import os

print("hola")
os.system("pause")

A "hello world" app works though.

I'm new to GitHub so if there's something else I should do or test just tell me.
And thank you very very much for your hard work on PyInstaller!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions