kayler-renslow / arma-dialog-creator

A dialog/GUI creation tool for Arma 3.
MIT License
76 stars 12 forks source link

Slow/Crashing shortly after launching #30

Open mjmjelde opened 6 years ago

mjmjelde commented 6 years ago

Version and Build

Version: 1.0.5 Build: 33

Summary

Becoming slow and crashing after short usage time. Most of the time becomes unresponsive and must force close java for the application to close

Detail

Below is the only error log that I have been able to get. Usually happens when I am opening a control properties page, but becomes very slow or just flat out freezes. Seems as if some memory is not freed up properly or the default memory size of the application is way too small.

java.lang.OutOfMemoryError: Java heap space
    at javafx.scene.Node.pickOnBoundsProperty(Node.java:1617)
    at javafx.scene.Node.setPickOnBounds(Node.java:1608)
    at javafx.scene.layout.Region.<init>(Region.java:458)
    at javafx.scene.layout.Pane.<init>(Pane.java:124)
    at javafx.scene.control.PopupControl$CSSBridge.<init>(PopupControl.java:1111)
    at javafx.scene.control.Tooltip$CSSBridge.<init>(Tooltip.java:667)
    at javafx.scene.control.Tooltip.<init>(Tooltip.java:168)
    at com.sun.javafx.scene.control.skin.ColorPalette$ColorSquare.<init>(ColorPalette.java:451)
    at com.sun.javafx.scene.control.skin.ColorPalette$ColorSquare.<init>(ColorPalette.java:394)
    at com.sun.javafx.scene.control.skin.ColorPalette$ColorPickerGrid.<init>(ColorPalette.java:505)
    at com.sun.javafx.scene.control.skin.ColorPalette.<init>(ColorPalette.java:98)
    at com.sun.javafx.scene.control.skin.ColorPickerSkin.getPopupContent(ColorPickerSkin.java:453)
    at com.sun.javafx.scene.control.skin.ComboBoxPopupControl.show(ComboBoxPopupControl.java:163)
    at com.sun.javafx.scene.control.skin.ColorPickerSkin.show(ColorPickerSkin.java:464)
    at com.sun.javafx.scene.control.skin.ComboBoxBaseSkin.handleControlPropertyChanged(ComboBoxBaseSkin.java:127)
    at com.sun.javafx.scene.control.skin.ColorPickerSkin.handleControlPropertyChanged(ColorPickerSkin.java:470)
    at com.sun.javafx.scene.control.skin.BehaviorSkinBase.lambda$registerChangeListener$61(BehaviorSkinBase.java:197)
    at com.sun.javafx.scene.control.skin.BehaviorSkinBase$$Lambda$111/8746743.call(Unknown Source)
    at com.sun.javafx.scene.control.MultiplePropertyChangeListenerHandler$1.changed(MultiplePropertyChangeListenerHandler.java:55)
    at javafx.beans.value.WeakChangeListener.changed(WeakChangeListener.java:89)
    at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:182)
    at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81)
    at javafx.beans.property.ReadOnlyBooleanPropertyBase.fireValueChangedEvent(ReadOnlyBooleanPropertyBase.java:72)
    at javafx.beans.property.ReadOnlyBooleanWrapper.fireValueChangedEvent(ReadOnlyBooleanWrapper.java:103)
    at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:110)
    at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:144)
    at javafx.scene.control.ComboBoxBase.setShowing(ComboBoxBase.java:185)
    at javafx.scene.control.ComboBoxBase.show(ComboBoxBase.java:391)
    at com.sun.javafx.scene.control.behavior.ComboBoxBaseBehavior.show(ComboBoxBaseBehavior.java:286)
    at com.sun.javafx.scene.control.behavior.ComboBoxBaseBehavior.mouseReleased(ComboBoxBaseBehavior.java:241)
    at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:96)
    at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:89)

THREAD:Arma Dialog Creator JavaFX Thread
kayler-renslow commented 6 years ago

Here is something you can try:

  1. Navigate to your folder where ADC is installed. There will be adc.jar, adc_updater.jar, and Arma Dialog Creator.exe files in it.
  2. Create a new file named start ADC with more RAM.bat. You can name it what ever you want, but it needs to end in .bat
  3. Inside start ADC with more RAM.bat, write java -Xmx1g -jar adc.jar.
  4. Run start ADC with more RAM.bat

This should expand the maximum amount of memory ADC can allocate to 1 gigabyte. From my experience, ADC doesn't even use 500MB, so this is way over kill. Hopefully overkill will get the job done.

Let me know if this works.

mjmjelde commented 6 years ago

This seems to have fixed my issue for now. Haven't been able to fully test the solution the past few days. When I did try it out a few days ago, it easily reached 500MB of RAM usage. Seemed to use more ram every time I opened up a control properties page and never really went down after I closed it. This could just have been java and how it allocates more memory. Should be able to do some more debugging in the next few days

kayler-renslow commented 6 years ago

What version of Java are you using and how much RAM does your computer have?

lyl-freeman commented 6 years ago

I had the same problem with Java 8. Java 9 did fix the problem for me.