mSparks43 / XPlane-11-AutoATC-plugin

C/C++ Source code for Xplane AutoATC plugin
GNU Lesser General Public License v3.0
16 stars 7 forks source link

xplane11 crash installing new version 0.9.7.2 #98

Closed fcapozzi62 closed 2 years ago

fcapozzi62 commented 2 years ago

I removed the previous versione and installed the new one. In the initalizing plugin step xplane11 crash. Here is the content of the log file. it seems to crash while initializing the JVM machine.

AutoATC: Settings are {"lin":{"library":"Resources/plugins/AutoATC/AutoATC_java/lib/server/libjvm.so","options":["-Xdump:none","-XX:UseAVX=0","-Xgc:scvNoAdaptiveTenure","-Xdisableexplicitgc","-Xgcpolicy:balanced","-Djava.class.path=Resources/plugins/AutoATC/AutoATC_java/lib/AutoATCPlugin.jar","-Xshareclasses:cacheDir=Resources/plugins/AutoATC/AutoATC_java/cache"]},"mac":{"library":"Resources/plugins/AutoATC/AutoATC_java/lib/server/libjvm.dylib","options":["-Xdump:none","-XX:UseAVX=0","-Xgc:scvNoAdaptiveTenure","-Xdisableexplicitgc","-Xgcpolicy:balanced","-Djava.class.path=Resources/plugins/AutoATC/AutoATC_java/lib/AutoATCPlugin.jar","-Xshareclasses:cacheDir=Resources/plugins/AutoATC/AutoATC_java/cache"]},"win":{"library":"Resources/plugins/AutoATC/AutoATC_java/bin/server/jvm.dll","options":["-Xdump:none","-XX:UseAVX=0","-Xgc:scvNoAdaptiveTenure","-Xdisableexplicitgc","-Xgcpolicy:balanced","-Djava.class.path=Resources/plugins/AutoATC/AutoATC_java/lib/AutoATCPlugin.jar","-Xshareclasses:cacheDir=Resources/plugins/AutoATC/AutoATC_java/cache"]}} AutoATC: Loading jvm dll 'Resources/plugins/AutoATC/AutoATC_java/bin/server/jvm.dll' AutoATC: Found CreateJavaVM AutoATC: Using option: -Xdump:none AutoATC: Using option: -XX:UseAVX=0 AutoATC: Using option: -Xgc:scvNoAdaptiveTenure AutoATC: Using option: -Xdisableexplicitgc AutoATC: Using option: -Xgcpolicy:balanced AutoATC: Using option: -Djava.class.path=Resources/plugins/AutoATC/AutoATC_java/lib/AutoATCPlugin.jar AutoATC: Using option: -Xshareclasses:cacheDir=Resources/plugins/AutoATC/AutoATC_java/cache AutoATC: Initialising the JVM

I'm available for other tests if any. Fabio

mSparks43 commented 2 years ago

Confirmed :( Trying to find where it went wrong now.

mSparks43 commented 2 years ago

So far the only potential culprit I can find is that the jlink tools for windows are broken, please could you try replacing the modules file with this one (pulled straight out of the jdk) - just extract to the plugins folder and it should overwrite the old one: https://github.com/mSparks43/XPlane-11-AutoATC-plugin/releases/download/v0.9.7/AutoATC.win.fix.zip

I'm slightly crippled for windows testing at the moment because the new windows laptop is back in the shop after its keyboard started falling apart 3 weeks after it was bought, and this old one is on its last legs.

fcapozzi62 commented 2 years ago

Hi all, after a few hours of experiments i've been able to make the new release work. This are the steps i've followed

1 - I downloaded the new JRE 1.8.311 from the Oracle Website and installed in my system.

2 - I removed the bin folder in the Resources/plugins/AutoATC/AutoATC_java/ and copied the C:\Program Files\Java\jre1.8.0_311\bin folder in Resources/plugins/AutoATC/AutoATC_java/

3 - I copied the C:\Program Files\Java\jre1.8.0_311\lib folder in Resources/plugins/AutoATC/AutoATC_java/ When system asks for substituting files with the same name i select yes for all

4 - With this configuration in the AutoATC_java lib folder all the application files are mainteined but the new java versions file are changed

5 - During some test flights i experimented some xplane11 GUI crash. Looking in the log files and crash reports i found some cloues about running out of java memory heap,

So i changed the windows java allocated heap space in the java control panel with the option -Xms2048m either for x86 and for x86_x64 architectures.

With this changes now the application works and seems stable. I made two flghts of about 1 hour each. Hope this help others with the same problem.

I didn't test your fix since for now my system works and do not want to mess it up ... however if you think that my workaround are not correct or can lead to some problems i will set up a test.

Have a nice flights, Fabio.

mSparks43 commented 2 years ago

I didn't test your fix since for now my system works and do not want to mess it up

Basically you came to the same solution. Java 17 moved to a "roll your own jre" model, during testing on the JDK was fine, but it seems the windows tools to make a distribution are broken. The temporary solution I put up fixed the file that wasn't building properly, as a more permanent solution for 0.9.7.3.win I moved to the JREv17 provided by bellsoft https://bell-sw.com/pages/downloads/

I would recommend 17 over 8, 17 is not just better at handling memory but also has much faster response times, but if everything is working there is no urgent need to switch.