Author Topic: Error in Execute Orders  (Read 4113 times)

0 Members and 1 Guest are viewing this topic.

Offline ndkid

  • Warrant Officer, Class 1
  • *****
  • n
  • Posts: 86
  • Thanked: 4 times
Re: Error in Execute Orders
« Reply #15 on: May 26, 2011, 01:58:05 PM »
I didn't realise this, probably because I haven't gone through the bugs thread in a while. Was this the most recently added bad guy?

Steve
Steve,

I think the email I sent you a while back with a link to a savegame had this error as one of the two it was showing.
 

Offline Steve Walmsley

  • Aurora Designer
  • Star Marshal
  • S
  • Posts: 11667
  • Thanked: 20429 times
Re: Error in Execute Orders
« Reply #16 on: May 28, 2011, 04:32:40 PM »
I'm seeing it when fighting Invaders.  So far, I've been killing one invader per salvo, and I get the apply internal damage error once for each ship destroyed.  I've also gotten a "strength 0 absorbtion shield secondary" message for each one, so I've been thinking it might be the shields (although I don't know how a-shields work, so maybe it's just the fact that they've always been down when I kill the ship).  In fact, that's an interesting data point - as far as I know, the Invaders haven't had their shields up when this happens.  And the reason you haven't seen it in bugs is that I haven't logged it yet - I figured you knew about it :)  Someone else might have logged it a while ago, though.


There is a line of code in the ApplyDamage function for ships equipped with absorption shields that divides current shield strength by maximum shield strength. However, there is no prior check to ensure max shield strength is greater than zero. If would be zero if the absorption shield was destroyed. I assume this is what is causing the problem, although I would have expected to see a divide by zero error rather than an overflow. I have added the prior check for v5.50 and we'll see if that fixes the problem

Steve