Author Topic: Crash in 2.42.7f  (Read 2706 times)

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Crash in 2.42.7f
« on: July 27, 2006, 08:43:10 AM »
Got a crash with a dialog saying 'This array is fixed or temporarily locked'. If you run this sim it should crash again within a couple of hours or so.
The internet is corrupt and controlled by criminally minded people.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Crash in 2.42.7f
« Reply #1 on: July 27, 2006, 10:41:03 AM »
Those "the array is locked" crashes were always impossible for me to reproduce.  I'm at work, so I can't tell if this is or isn't going to crash, but in general those errors ghost away when you try to debug them.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Crash in 2.42.7f
« Reply #2 on: July 27, 2006, 02:10:03 PM »
I know exactly what and where this bug is.  I still don't know for sure how to fix it.  I've tried a few things, obviously haven't nailed it yet.

It occurs when the size of the Shots array is increased using the VB "Redim Preserve" directive which re-dimensions the array while preserving the values.  It's hard to reporduce because a) Shots arn't saved in sim files and  is is highly timing dependent.

What little I have been able to find on the web about this error seems to indicate that if an element of the array is on the stack, then it MAY be locked, so I'm currently modifying any routine which passes an element of the Shots array to a routine that can grow it to use a temp var instead...  Sigh.
Many beers....