Defective shape causes hang (X2602, GM&O Springfield Switch, inspect)

Bug #1404751 reported by Jeffrey Kraus
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Open Rails
Expired
Undecided
Unassigned

Bug Description

Shape files use index values to refer to other parts of the shape file. If some of these values are out of range Train Simulator will function but display garbled graphics.

If a vertex index is out of range it will show a long line as shown at http://www.trainsim.com/vbts/showthread.php?320561-Corrupt-shape-files

Open Rails instead freezes in a loop but does not crash.

Tags: content crash
Revision history for this message
Jeffrey Kraus (krausyaoj) wrote :
Revision history for this message
Peter Gulyas (pzgulyas) wrote :

Could you please provide a download link to the vehicle OR freezes in an infinite loop with?

Revision history for this message
Jeffrey Kraus (krausyaoj) wrote :

Download link: https://www.adrive.com/public/secxyj/GMO880B.zip

Fixing this bug will involve changes to the shape file reading code to check the validity of files. In particular, that indexes are within range.

Revision history for this message
Peter Gulyas (pzgulyas) wrote :

Thank you for the reference!

I still think writing a full-featured validator for MSTS .s format is not worth the effort. It must have been done by the MSTS developers, when they wrote their GMAX export plugin. This .s shape format now is not our future, it is our past. In the future we would rather implement a more recent and more widely supported format, for which the validator is also available.

And think of it: If the content creator does not care about his model displaying faulty, why would we care about it? At best, we can get around the infinite loop and write a warning line into the log file about e.g. index out of range. But in neither case we would disallow displaying any shape that otherwise don't crash the program.

Revision history for this message
James Ross (twpol) wrote :

If you leave Open Rails hung for a minute or two, it should crash itself when it detects that it has hung. That log file would be more useful.

summary: - Cannot run with a defective shape
+ Defective shape causes hang (X2602)
tags: added: content crash
James Ross (twpol)
summary: - Defective shape causes hang (X2602)
+ Defective shape causes hang (X2602, GM&O Springfield Switch, inspect)
Revision history for this message
Cédric GNIEWEK (sharpeserana) wrote :

Does the problem still happen with version 1.4?

Changed in or:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Open Rails because there has been no activity for 60 days.]

Changed in or:
status: Incomplete → Expired
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.