Python program with nuitka created exe and inno setup installer crashes: Faulting module python37.dll

2

I have a python program which I have compiled into an exe using nuitka:

python -m nuitka --standalone --follow-imports --enable-plugin=qt-plugins --mingw64 rs_main.py

This creates a exe in a distfolder which contains many dll's and pyd's. This exe works. Also on somebody's else computer (when I send entire dist folder)

Now I used inno setup to create an installer.

#define MyAppName "Test"
#define MyAppVersion "0.1"
#define MyAppPublisher "testcompany"
#define MyAppURL "www.testcompany.nl"
#define MyAppExeName "rs_main.exe"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{65359C01-197B-4EFF-9A75-E048817FD68C}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DisableProgramGroupPage=yes
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; 
GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: "D:\Users\user\Documents\1 - Projecten\test\trunk\rs_main.dist\rs_main.exe"; DestDir: "{app}";
Source: "D:\Users\user\Documents\1 - Projecten\test\trunk\rs_main.dist\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; 
Tasks: desktopicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

This inno setup file seems to work fine. It does create a setup.exe. Running this setup.exe does also seem to work fine. It runs the installer and I end up with all the files in the appropiate folder in c:\Program Files(x86)\test

However when I run it from this location it does not work! It crashes.

I found somewhere that this might be due to write permissions (although I would not know what in my program would need those). So I added a dirty fix to my inno setup file (which was suggested there):

[Dirs]
Name: {app}; Permissions: users-full

This did not work (but did I do it correctly?)

Finally I used event viewer to get a little more information and this told me:

Faulting application name: rs_main.exe, version: 0.0.0.0, time stamp: 0x5cb4928c
Faulting module name: python37.dll, version: 3.7.3150.1013, time stamp: 0x5c9954b1
Exception code: 0xc0000005
Fault offset: 0x000000000002324d
Faulting process id: 0x112d8
Faulting application start time: 0x01d4f398767f20e4
Faulting application path: C:\Program Files (x86)\test\rs_main.exe
Faulting module path: C:\Program Files (x86)\test\python37.dll

Does anyone have any idea where I should look next for a solution?

Edit: As mentioned in the comments I found out that it is not an inno setup problem. I will try some other things and come back with a new question if still needed.

python
inno-setup
python-3.7
nuitka
asked on Stack Overflow Apr 15, 2019 by user180146 • edited Apr 16, 2019 by user180146

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0