.eng file generates error in x3650 but not in x3642

Bug #1635871 reported by MikeBond
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Open Rails
Fix Released
Low
Carlo Santucci

Bug Description

UP_GP38_622.eng file loads without error in x3642 but generates "Error: System.IO.FileLoadException: J:\MSTS\trains\trainset\UP_GP38-2_622\UP_GP38_622.eng ---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection" when attempting to load as a drivable engine in x3650. Also, the UP_GP38_622.eng file will load as an AI engine in x3642 but does not load as an AI engine in x3650.

Revision history for this message
MikeBond (mbond-o5) wrote :

Bug report attached.

Revision history for this message
MikeBond (mbond-o5) wrote :

.eng file attached

Revision history for this message
Carlo Santucci (carlosanit1) wrote :

Can you please attach also the .cvf file?

Revision history for this message
MikeBond (mbond-o5) wrote :

Here's the file (I should have included it when I submitted the bug report).

Revision history for this message
Carlo Santucci (carlosanit1) wrote :

Thanks Mike. There is an error in the .cvf file that causes OR to crash. I will seek to protect OR against the error, however it would be wise to correct that error.
In such file there is this block:
  Lever (
   Type ( TRAIN_BRAKE LEVER )
   Position ( 113 288 178 75 )
   Graphic ( "Train brake.ace" )
   Style ( NOT_SPRUNG )
   MouseControl ( 1 )
   NumFrames ( 9 3 3 )
   NumPositions ( 5 0 1 13 14 15 )
   NumValues ( 5 0 0.3 0.85 0.9 0.95 )
   Orientation ( 0 )
   DirIncrease ( 0 )
   ScaleRange ( 0 1 )
  )
So this block has 9 frames but in NumPositions it refers also to frame #15, which does not exist.
If one replaces
   NumPositions ( 5 0 1 13 14 15 )
with
   NumPositions ( 5 0 1 6 7 8 )
the engine should load correctly.

Changed in or:
status: New → In Progress
assignee: nobody → Carlo Santucci (carlosanit1)
Revision history for this message
Carlo Santucci (carlosanit1) wrote :

Fixed in x.3653.

Changed in or:
status: In Progress → Fix Committed
Revision history for this message
MikeBond (mbond-o5) wrote :

Carlo,

I changed NumPositions as you suggested and the engine loads without any errors now. Many thanks for finding that error in the .cvf file.

Mike

James Ross (twpol)
Changed in or:
importance: Undecided → Low
milestone: none → 1.2
James Ross (twpol)
Changed in or:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.