App startup: Runtime Error

What shouldn’t happen is that failed assertion. You should get an error specifying what declare couldn’t be done.

Jim, can you duplicate the project and remove the errorReporter entirely? If you still get the error, try removing other things.

Okay, at my desk and I found two places where the declares were not wrapped with #if targetCocoa then, I’ve since wrapped them and sent Jim an e-mail containing this version.

Jim if you can try your application without the ErrorReporter first, and if it works then try it with the newer version I sent you.

The two methods that were changed:

  • quitButton.action
  • codeSignature

Did that. Got a compile error on the two commented statements in the Open event of errorReporter2016r1, as shown below.

Dim architecture as string // --- Which target are we running on. #if TargetX86 then architecture = if( target32Bit, "i386", "x86_64" ) '#else targetARM then 'architecture = if( target32Bit, "arm32", "arm64" ) #endif

Thanks @Sam Rowlands

That’s odd, I’ve been working on a project with that very code in it and it’s been fine… Except I’m compiling for Mac and not Windows… I’ll take another look tomorrow.

I get that error for both Mac and Windows compile.

The error is “Syntax error”; change the “#else” to #elseif" and compiles ok. I should have noted that the first time.

BTW my last MAS rejection they attached the error report to the Rejection Note. It would be nice if there were a date and time on the report heading.

I’ll add that as a feature request.

I’m still having problem with the windows version getting the error message with the INSTALLED version.

Common\Loader\LoaderWindows.cpp:127
Failure Condition: byteRead == mDatSection.DataLength

As @Norman Palardy recommended I did the copy of the WindowsUniversalRuntime stuff, that did not change anything.

What I don’t understand is why the Debug run’s and also if I copy the app folder from the build to Windows and click on the .exe it runs, as it should, NO errors.

I am using the Inno installer. Should I look for another widows installer and try that.

[quote=270588:@Jim Smith]I’m still having problem with the windows version getting the error message with the INSTALLED version.

Common\Loader\LoaderWindows.cpp:127
Failure Condition: byteRead == mDatSection.DataLength[/quote]

Compare the executable that the compiler spit out to the executable that the installer installed. If they’re different, the installer or something in the process of creating the installer has corrupted it.

I don’t think I have anything that will compare binary files. Can you recommend something?

@Joe Ranieri You did notice that both executable ran ok, it’s when the .exe is installed.

[quote=270622:@Jim Smith]I don’t think I have anything that will compare binary files. Can you recommend something?

[/quote]

HxD can compare files. Free too.

https://mh-nexus.de/en/hxd/

Thanks, Peter.

Checked the .exe installer input to the installer output; they were the same.
Checked the .exe debug to the regular build output of course they were not the same. For one the application name and difference in compile options, i.e. #if TargetDebug stuff.

I do not know how to read compiled code, so I would not know what to look for. Beside I think that not allowed, is it.

If Xojo debug runs work and copied builds works fine outside of the installer, you’ve got an installer problem- not a Xojo problem. Have you crossed checked that in your “installed” directory that each file is present and the same size as your copied version that works OK? Otherwise, you may want to try a different installer or have someone review your InnoSetup script.

Have been able to make an install for my new version.

Had to revert to Xojo 2015.r4.1. (NOT GOOD, but it does let me go head with my app new version release.)

That is NOT a solution. Maybe by the time I’m ready for a new release Xojo will be fixed.

Then your installer script is incorrect, because you must be missing one or more of the files that exist in this folder.
Perhaps the whole resources / libs subfolders?

Did you refresh your Inno script when you changed Xojo versions? If not, and if there is a new .dll or something, then Inno will not pick it up.

Did you do this check? You must be missing a file.

This is the error message I get when the app is run:

This is the Inno script:

; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

[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={{ED0B5926-7E36-447E-A341-EF051FFFF7F3}
AppName=RVCare Log Book
AppVersion=2.7.4
;AppVerName=RVCare Log Book 2.7.4
AppPublisher=James A Smith
AppPublisherURL=http://www.rvcarelogbook.com/
AppSupportURL=http://www.rvcarelogbook.com/
AppUpdatesURL=http://www.rvcarelogbook.com/
DefaultDirName={pf}\RVCare Log Book
DefaultGroupName=RVCare Log Book
OutputDir=C:\Users\jim\Documents\RVCLB 2.7.4 Inno
OutputBaseFilename=RVCareLogBookSetup274
Compression=lzma
SolidCompression=yes

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

[Tasks]
Name: “desktopicon”; Description: “{cm:CreateDesktopIcon}”; GroupDescription: “{cm:AdditionalIcons}”; Flags: unchecked
Name: “quicklaunchicon”; Description: “{cm:CreateQuickLaunchIcon}”; GroupDescription: “{cm:AdditionalIcons}”; Flags: unchecked; OnlyBelowVersion: 0,6.1

[Files]
Source: “C:\Users\jim\Documents\RVCLB 2.7.4\RVCare Log Book.exe”; DestDir: “{app}”; Flags: ignoreversion
Source: “C:\Users\jim\Documents\RVCLB 2.7.4\*”; DestDir: “{app}”; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don’t use “Flags: ignoreversion” on any shared system files

[Icons]
Name: “{group}\RVCare Log Book”; Filename: “{app}\RVCare Log Book.exe”
Name: “{commondesktop}\RVCare Log Book”; Filename: “{app}\RVCare Log Book.exe”; Tasks: desktopicon
Name: “{userappdata}\Microsoft\Internet Explorer\Quick Launch\RVCare Log Book”; Filename: “{app}\RVCare Log Book.exe”; Tasks: quicklaunchicon

[Run]
Filename: “{app}\RVCare Log Book.exe”; Description: “{cm:LaunchProgram,RVCare Log Book}”; Flags: nowait postinstall skipifsilent


This is the build from Xojo, before Inno:

Heres a thought…
The installer lines look OK

My equivalent looks like this:

Source: “C:\RB_STUFF\myapp\myapp.exe”; DestDir: “{app}”; Flags: ignoreversion
Source: “C:\RB_STUFF\myapp\twain32.dll”; DestDir: “{app}”; Flags: ignoreversion
Source: “C:\RB_STUFF\myapp\zlib1.dll”; DestDir: “{app}”; Flags: ignoreversion
Source: “C:\RB_STUFF\myapp\myapp Resources\"; DestDir: “{app}\myapp Resources”; Flags: ignoreversion recursesubdirs createallsubdirs ; Attribs: hidden;
Source: "C:\RB_STUFF\myapp\myapp Libs\
”; DestDir: “{app}\myapp Libs”; Flags: ignoreversion recursesubdirs createallsubdirs ; Attribs: hidden;

The difference here is that I do all the files in the root one by one, and only use the \* syntax for the Libs and Resources

BUT:

On your development machine, you open the build folder, double click the EXE and it runs.
Have you done the SAME on the installed machine?

My icon line looks like this
Name: “{commondesktop}\{#MyAppName}”; Filename: “{app}\{#MyAppExeName}”; Tasks: desktopicon

but I am wondering if the WORKING DIRECTORY of the icons you create is wrong… in which case the app starts but ‘IN’ a folder that doesnt contain the runtime libraries you want…?

Or whether the RUN that occurs at the end of the install is doing the same.

After install, error message or not, try launching the app by double clicking on it inside the installed folder

Thanks Jeff.

I’m going to lay this aside for a while, I already have the MAS version approved. I need to do the Kaju stuff and get then uploaded to my Site and Fastspring.

I ready to start working on building the windows version of my app. and want to first verify that in the Build Settings for Windows after the Build step I put in a CopyFiles step. This copy step has the Behavior: Applies to: Both, Subdirectory: empty, Destination: App Parent Folder. The copy step list a bunch of .dll listed.

Is this correct?