Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: an intresting crash!  (Read 1547 times)

dmaiski

  • Captain
  • ****
  • Posts: 422
  • resistance is futile
    • View Profile
an intresting crash!
« on: November 09, 2013, 04:23:43 AM »

Spoiler
68156 [Thread-6] ERROR com.fs.starfarer.combat.String  - java.lang.IllegalArgumentException: Color parameter outside of expected range: Green
java.lang.IllegalArgumentException: Color parameter outside of expected range: Green
   at java.awt.Color.testColorValueRange(Color.java:298)
   at java.awt.Color.<init>(Color.java:382)
   at com.fs.starfarer.D.OoOO.?0000(Unknown Source)
   at com.fs.starfarer.D.OoOO.?0000(Unknown Source)
   at com.fs.starfarer.D.new.class.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.O.render(Unknown Source)
   at com.fs.starfarer.ui.oOo0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.O.render(Unknown Source)
   at com.fs.starfarer.combat.F.????00(Unknown Source)
   at com.fs.super.oOOO.?0000(Unknown Source)
   at com.fs.starfarer.combat.String.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$2.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:619)
[close]

this was caused be a  pilum lrp hitting an experimental regenerative armor script ship i was playing around with
my best guess is that armor recovered to 101% and this resulted in the colour the armor is set to display going to 256++ green value
it culd also be the colour the  pilum lrp explosion is set to display or something similar (my script dose not even use colours, so i think its an external bug)

ill ph alex the code i used to cause crash

you need to put in a limiter in there saying (colour>0 ? colour:0)

is repreducable on a paragon

small damage (damage less then 100%of the armor black) dose not cause crash

found cause -ve armor values making the color less then 0...
« Last Edit: November 09, 2013, 05:11:55 AM by dmaiski »
Logged
BISO
(WIP) lots of shiny new weapons ( :-[ i have more weapons then sprites :-[ )

i got a cat pad
its like a mouse pad but better!

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24118
    • View Profile
Re: an intresting crash!
« Reply #1 on: November 09, 2013, 08:30:32 AM »

Thanks! Tidied it up so that won't cause a crash.

Overall, though, your script really shouldn't be setting armor values to less than 0. I'm sure there's other invalid values you could set various things to that would cause the game to crash; the game isn't going to check all of those, and the solution is simply not to do that :)
Logged

dmaiski

  • Captain
  • ****
  • Posts: 422
  • resistance is futile
    • View Profile
Re: an intresting crash!
« Reply #2 on: November 09, 2013, 08:33:43 AM »

yea its a work in progress

ill put the working version in the code dump, cause its sexy regenerating armor
Logged
BISO
(WIP) lots of shiny new weapons ( :-[ i have more weapons then sprites :-[ )

i got a cat pad
its like a mouse pad but better!