Route fails to load with rev #1720 and higher (was OK with #1719)

Bug #1219269 reported by BB25187
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Open Rails
Fix Released
High
cjakeman

Bug Description

I noticed that starting with experimental revision #1720 and higher, some routes fail to load. The log file contains numerous true errors "Error: SharedShapeManager.Get incorrectly called by Render Process; must be Loader Process or crashes will occur." (and not only the warning added at this revision!). More precisely, the first three errors reported in the log file are the following ones - none of those errors were present with revision #1719:

SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSWSTF Error in T:\Trains\MSTS\ROUTES\PLM\World\w-005938+014621.w
   Line 5018: Extra data at end of block Position
SSSSSSSSSSSSSSSSSSSSSSSSSSSS

Error: System.NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.
   à ORTS.WorldFile.WorldPositionFromMSTSLocation(Int32 tileX, Int32 tileZ, STFPositionItem MSTSPosition, STFQDirectionItem MSTSQuaternion)
   à ORTS.WorldFile..ctor(Viewer3D viewer, Int32 tileX, Int32 tileZ, Boolean visible)
   à ORTS.SceneryDrawer.LoadWorldFile(Int32 tileX, Int32 tileZ, Boolean visible)
   à ORTS.SceneryDrawer.Load()
   à ORTS.World.Load()
   à ORTS.Viewer3D.Load()
   à ORTS.LoaderProcess.Load()
   à ORTS.LoaderProcess.DoLoad()
   à ORTS.LoaderProcess.LoaderThread()
   à System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   à System.Threading.ExecutionContext.runTryCode(Object userData)
   à System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   à System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   à System.Threading.ThreadHelper.ThreadStart()

C

Error: SharedShapeManager.Get incorrectly called by Render Process; must be Loader Process or crashes will occur.
   à ORTS.ORTraceListener.TraceEventInternal(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String format, Object[] args)
   à ORTS.ORTraceListener.TraceEvent(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String format, Object[] args)
   à System.Diagnostics.TraceInternal.TraceEvent(TraceEventType eventType, Int32 id, String format, Object[] args)
   à System.Diagnostics.Trace.TraceError(String format, Object[] args)
   à ORTS.SharedShapeManager.Get(String path)
   à ORTS.StaticShape..ctor(Viewer3D viewer, String path, WorldPosition position, ShapeFlags flags)
   à ORTS.PoseableShape..ctor(Viewer3D viewer, String path, WorldPosition initialPosition, ShapeFlags flags)
   à ORTS.MSTSWagonViewer..ctor(Viewer3D viewer, MSTSWagon car)
   à ORTS.MSTSLocomotiveViewer..ctor(Viewer3D viewer, MSTSLocomotive car)
   à ORTS.MSTSDieselLocomotiveViewer..ctor(Viewer3D viewer, MSTSDieselLocomotive car)
   à ORTS.MSTSDieselLocomotive.GetViewer(Viewer3D viewer)
   à ORTS.TrainDrawer.LoadCar(TrainCar car)
   à ORTS.TrainDrawer.GetViewer(TrainCar car)
   à ORTS.Viewer3D.Initialize()
   à ORTS.RenderProcess.Initialize()
   à Microsoft.Xna.Framework.Game.Run()
   à ORTS.Viewer3D.Run(BinaryReader inf)
   à ORTS.Program.Start(UserSettings settings, String[] args)
   à ORTS.Program.<>c__DisplayClass6.<Main>b__3()
   à ORTS.Program.Main(String[] args)

The error "Error: SharedShapeManager.Get incorrectly called by Render Process; must be Loader Process or crashes will occur" is then dumped several times before RunActivity.exe exits.

To reproduce:
- 1 - Download the three following files:
http://download.activitysimulatorworld.net/asw/Chargements_Temporaires/OpenRails/OR_Reports/PLM.7z.001
http://download.activitysimulatorworld.net/asw/Chargements_Temporaires/OpenRails/OR_Reports/PLM.7z.002
http://download.activitysimulatorworld.net/asw/Chargements_Temporaires/OpenRails/OR_Reports/PLM.7z.003

- 2 - Open the file PLM.7z.001 with 7-Zip to unpack the route (route name is "PLM"). When prompted, provide the password "mistral"

- 3 - Move the PLM route folder in your OR/MSTS installation

- 4 - You may want to download the file below too: it contains a small activity which exposes the issue. This activity only makes use of the Kiha31 engine. Thus, it should be OK for most of the MSTS users. It alos contains the log file I got with revision #1719 (OK) and #1720 (KO):
http://download.activitysimulatorworld.net/asw/Chargements_Temporaires/OpenRails/OR_Reports/OR_1720_ACT.zip

It may happen that this route requires additional files in the GLOBAL folder. If some file are reported to be missing in your installation, please just ask: I will provide them.

cjakeman (cjakeman)
Changed in or:
status: New → In Progress
importance: Undecided → High
assignee: nobody → cjakeman (cjakeman)
milestone: none → 1.0
Revision history for this message
cjakeman (cjakeman) wrote :

Hi BB25187,

Thanks for your detailed instructions.

Tried several times to download and unzip the files using 7-Zip and the password
http://download.activitysimulatorworld.net/asw/Chargements_Temporaires/OpenRails/OR_Reports/PLM.7z.001
but they all give me "Unspecified error".

Not to worry too much, though, as several others have reported similar problems on other routes. If I can fix it for them, it will probably work for PLM too.

In the meantime, would you upload file T:\Trains\MSTS\ROUTES\PLM\World\w-005938+014621.w for me, please?

Thanks,

Chris

Revision history for this message
cjakeman (cjakeman) wrote :

v1741 committed which should fix this bug.

Changed in or:
status: In Progress → Fix Committed
Revision history for this message
BB25187 (bb25187) wrote :

Hi,

Thanks for you reply and work.
I placed the guilty world file on the server. The link to download it:

http://download.activitysimulatorworld.net/asw/Chargements_Temporaires/OpenRails/OR_Reports/w-005938+014621.w

This tile also has a corresponding sound beacon. I uploaded it as well, just in case:

http://download.activitysimulatorworld.net/asw/Chargements_Temporaires/OpenRails/OR_Reports/w-005938+014621.ws

As for the issue with the 7-zip archives, I downloaded the file from the server, and could uncompress it without error. Maybe one of the files was corrupted during the transfer. It sometimes happens when the server is busy or in case of temporary connection issue.

Fell free to tell me if you need further inputs.

Regards
Vincent

Revision history for this message
BB25187 (bb25187) wrote :

Oops sorry: I missed that you committed a fix :-(
I will test it and let you know.

Revision history for this message
BB25187 (bb25187) wrote :

Hi,

I tested the fix. Unfortunately, the issue is still present.
One thing though: I noticed that after the guilty worl file has been recompressed with Route Riter, then the error doesn't happen anymore.
In case you want to investigate, here are the links to the same world file, one uncompressed (exposes the error), the other compressed (OK):

http://download.activitysimulatorworld.net/asw/Chargements_Temporaires/OpenRails/OR_Reports/w-005938+014621.ko.s

http://download.activitysimulatorworld.net/asw/Chargements_Temporaires/OpenRails/OR_Reports/w-005938+014621.ok.s

Anyway, this world files should have been compressed already :-/

Kind regards and thanks again for your fix,
Vincent

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.