Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.95a is out! (03/26/21); Blog post: Skill Changes, Part 2 (07/15/21)

Author Topic: [0.95a] Game crashes when mousing over sliders in interaction dialog  (Read 205 times)

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1350
    • View Profile
    • GitHub Profile

The game seems to crash in 0.95a when mousing over a slider in a custom interaction dialog plugin. Here's the stack trace:

Quote
53593 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
        at com.fs.starfarer.ui.newui.new$o.00000(Unknown Source)
        at com.fs.starfarer.ui.newui.new$1.createImpl(Unknown Source)
        at com.fs.starfarer.ui.impl.StandardTooltipV2Expandable.create(Unknown Source)
        at com.fs.starfarer.ui.impl.StandardTooltipV2Expandable.beforeShown(Unknown Source)
        at com.fs.starfarer.ui.Q.showTooltip(Unknown Source)
        at com.fs.starfarer.ui.ooOo.super.new(Unknown Source)
        at com.fs.starfarer.ui.ooOo.processInput(Unknown Source)
        at com.fs.starfarer.ui.Q.processInput(Unknown Source)
        at com.fs.starfarer.ui.donew.dispatchEventsToChildren(Unknown Source)
        at com.fs.starfarer.ui.donew.processInputImpl(Unknown Source)
        at com.fs.starfarer.ui.newui.new.processInputImpl(Unknown Source)
        at com.fs.starfarer.ui.Q.processInput(Unknown Source)
        at com.fs.starfarer.ui.donew.dispatchEventsToChildren(Unknown Source)
        at com.fs.starfarer.ui.donew.processInputImpl(Unknown Source)
        at com.fs.starfarer.ui.Oo0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInputImpl(Unknown Source)
        at com.fs.starfarer.ui.newui.V.processInputImpl(Unknown Source)
        at com.fs.starfarer.ui.Q.processInput(Unknown Source)
        at com.fs.starfarer.ui.donew.dispatchEventsToChildren(Unknown Source)
        at com.fs.starfarer.ui.donew.processInputImpl(Unknown Source)
        at com.fs.starfarer.ui.Q.processInput(Unknown Source)
        at com.fs.starfarer.campaign.CampaignState.processInput(Unknown Source)
        at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
        at com.fs.state.AppDriver.begin(Unknown Source)
        at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
        at com.fs.starfarer.StarfarerLauncher.o00000(Unknown Source)
        at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

The sliders haven't been changed since 0.9.1a, and are defined like this:
Code
                    // Console overlay font size
                    options.addSelector("Text Scaling Percentage", Selector.TEXT_SCALE, Color.WHITE, barWidth, 150f, 50, 150, ValueDisplayMode.VALUE,
                            "Scale displayed text by this percentage of the base font size.");
                    options.setSelectorValue(Selector.TEXT_SCALE, (int) (fontScale * 100));

                    // Console overlay font color
                    options.addSelector("Output Color (red)", Selector.COLOR_R, Color.RED, barWidth, 150f, 0f, 255f, ValueDisplayMode.X_OVER_Y_NO_SPACES,
                            "The red component of the overlay's text color.");
                    options.setSelectorValue(Selector.COLOR_R, red);
                    options.addSelector("Output Color (green)", Selector.COLOR_G, Color.GREEN, barWidth, 150f, 0f, 255f, ValueDisplayMode.X_OVER_Y_NO_SPACES,
                            "The blue component of the overlay's text color.");
                    options.setSelectorValue(Selector.COLOR_G, green);
                    options.addSelector("Output Color (blue)", Selector.COLOR_B, Color.BLUE, barWidth, 150f, 0f, 255f, ValueDisplayMode.X_OVER_Y_NO_SPACES,
                            "The green component of the overlay's text color.");
                    options.setSelectorValue(Selector.COLOR_B, blue);

                    options.addOption("Print current color", Option.TEST_COLOR, "Prints an example of the current color for easier comparisons.");
                    dialog.getVisualPanel().showCustomPanel(50f, 50f, new ColorDisplayPlugin());
                    optionSelected("Print current color", Option.TEST_COLOR); // Show the starting color
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 18905
    • View Profile
Re: [0.95a] Game crashes when mousing over sliders in interaction dialog
« Reply #1 on: March 26, 2021, 01:37:06 PM »

Thank you - should be fixed.
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1350
    • View Profile
    • GitHub Profile
Re: [0.95a] Game crashes when mousing over sliders in interaction dialog
« Reply #2 on: March 26, 2021, 06:45:18 PM »

The crash still occurs in RC9. It can be replicated by using the Settings command with the console mod, then clicking Misc Console Settings and mousing over the options.

Stack trace in RC9:
Quote
25704 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at com.fs.starfarer.ui.newui.new$o.Object(Unknown Source)
   at com.fs.starfarer.ui.newui.new$1.createImpl(Unknown Source)
   at com.fs.starfarer.ui.impl.StandardTooltipV2Expandable.create(Unknown Source)
   at com.fs.starfarer.ui.impl.StandardTooltipV2Expandable.beforeShown(Unknown Source)
   at com.fs.starfarer.ui.Q.showTooltip(Unknown Source)
   at com.fs.starfarer.ui.U.super.new(Unknown Source)
   at com.fs.starfarer.ui.U.processInput(Unknown Source)
   at com.fs.starfarer.ui.Q.processInput(Unknown Source)
   at com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.v.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.newui.new.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.Q.processInput(Unknown Source)
   at com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.v.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.Oo0O.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.newui.Stringsuper.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.Q.processInput(Unknown Source)
   at com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.v.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.Q.processInput(Unknown Source)
   at com.fs.starfarer.campaign.CampaignState.processInput(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 18905
    • View Profile
Re: [0.95a] Game crashes when mousing over sliders in interaction dialog
« Reply #3 on: March 26, 2021, 06:49:38 PM »

Ah, darn - noted it down, I'll take a look tomorrow!
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 18905
    • View Profile
Re: [0.95a] Game crashes when mousing over sliders in interaction dialog
« Reply #4 on: March 27, 2021, 12:09:06 PM »

Ok, actually fixed it for real this time. Tooltip highlights won't work for selectors, though, there's some internal stuff that makes it a tricky change to do on hotfix timescales. But the basic text of the tooltip shows up.
Logged