Reputation: 5667
I have a Codename One UWP app that works fine when I build it in debug mode and install the appxbundle using the supplied PowerShell script. However, when I build in release (appxupload) mode the resulting app (extracted from the appxupload file) crashes immediately after showing its window on startup. I thought it might be an issue with local install but when I submitted the app to the Windows store they reported the same behaviour.
I have recreated the problem with a blank project containing only this in start():
Form form = new Form("Test", new BorderLayout());
form.show();
And built it using these settings:
codename1.arg.windows.buildType=Release
codename1.arg.windows.makeReleaseAppxbundle=false
codename1.arg.windows.platforms=x86|x64|ARM
The error in the windows event viewer says:
Faulting module name: Windows.UI.Xaml.dll, version: 10.0.18362.997, time stamp: 0xe85f9394
Exception code: 0xc000027b
Fault offset: 0x0000000000713500
I tried with makeReleaseAppxbundle=true and that creates a working appxbundle file for the test program. Unfortunately the build takes a very long time for the test program (over 5 times as long) and fails after about 15 minutes for my main app with this error:
[exec] Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
[exec] at Microsoft.Cci.ISymUnmanagedWriter2.Close()
[exec] at Microsoft.Cci.PdbWriter.Finalize()
Upvotes: 1
Views: 112
Reputation: 4716
Thanks for reporting this. I've reproduced the problem, and applied a hotfix to the build server. I'm now able to build apps
codename1.arg.windows.buildType=Release
codename1.arg.windows.makeReleaseAppxbundle=true
codename1.arg.windows.platforms=x86|x64|ARM
and also with
codename1.arg.windows.buildType=Release
codename1.arg.windows.makeReleaseAppxbundle=false
codename1.arg.windows.platforms=x86|x64|ARM
And the resulting apps seem to install and run on my Windows 10 machine with no issues.
Upvotes: 2