The US2BNSFCar.wag, that is a car coming from the original MSTS release, doesn't load any more in recent OR versions, due to a problem of casting in braking parameters, see attached logfile.
OpenRailsLog.txt (57K)
Number of downloads: 233
OK, I found the problem: it's the same as here http://www.elvastowe...missing-wagons/ , in an ORIGINAL MSTS wagon. A parenthesis too much after the Lights() block...
Maybe there are other original wagons with this problem?
Page 1 of 1
MSTS legacy US2BNSFCar.wag no more loading
#2
Posted 03 April 2015 - 11:18 PM
Looking a bit better into the problem, I have the impression that (apart of the missing parenthesis) however maybe there could be an OR bug.
In the corrected .eng file I commented out the BrakeSystem () line and I got the same error. The error ( Unable to cast object of type 'ORTS.AirSinglePipe' to type 'ORTS.SingleTransferPipe') comes out at line 42 of SingleTransferPipe.cs, that is
I believe to remember that it was allowed to have cars without brake system line, or don't I remember well?
In the corrected .eng file I commented out the BrakeSystem () line and I got the same error. The error ( Unable to cast object of type 'ORTS.AirSinglePipe' to type 'ORTS.SingleTransferPipe') comes out at line 42 of SingleTransferPipe.cs, that is
SingleTransferPipe thiscopy = (SingleTransferPipe)copy;
I believe to remember that it was allowed to have cars without brake system line, or don't I remember well?
#3
Posted 03 April 2015 - 11:41 PM
What I am concerned about here is, how is it at all possible, that the copied wagon has AirSinglePipe brake system, while it is being copied to a one with SingleTransferPipe? They must have exactly the same config!
I recently changed the behavior, that by default, if no BrakeSystem() is present, single trasfer pipe will be selected. It was asked by copperpen, to match MSTS behavior. But this alone should not lead to any problems. (I will not be able to look into code before Tuesday.) The question is what I wrote above. :p
I recently changed the behavior, that by default, if no BrakeSystem() is present, single trasfer pipe will be selected. It was asked by copperpen, to match MSTS behavior. But this alone should not lead to any problems. (I will not be able to look into code before Tuesday.) The question is what I wrote above. :p
#4
Posted 03 April 2015 - 11:57 PM
Yes, it' strange, but when you have time it's easy to test. Take any car, remove the BrakeSystem line, make a consist of at least two such cars and run OR! :p
#5
Posted 04 April 2015 - 10:28 AM
The specific error is caused by not having a brake equipment line in the wag or eng file. If the line is present but no data in the brackets, OR substitutes with no error.
#6
Posted 04 April 2015 - 01:33 PM
Csantucci, on 03 April 2015 - 09:18 AM, said:
The US2BNSFCar.wag, that is a car coming from the original MSTS release, doesn't load any more in recent OR versions, due to a problem of casting in braking parameters, see attached logfile.
OpenRailsLog.txt
OK, I found the problem: it's the same as here http://www.elvastowe...missing-wagons/ , in an ORIGINAL MSTS wagon. A parenthesis too much after the Lights() block...
Maybe there are other original wagons with this problem?
OpenRailsLog.txt
OK, I found the problem: it's the same as here http://www.elvastowe...missing-wagons/ , in an ORIGINAL MSTS wagon. A parenthesis too much after the Lights() block...
Maybe there are other original wagons with this problem?
I have an install I call "Pure MSTS" an install from the CDs with no edits and no additions. Just checked all the US2xxxxx.WAG files and those two are the only ones with the extra closing paren. But there have been many, many repaints.
#7
Posted 05 April 2015 - 03:25 PM
Problem was caused by a straigthforward error in MSTSWagon.
The new method setting brake type was called during parsing of "brakesystemtype" in wagon or engine file, and during the copy action. If on these calls the defined brake type was "null", brake system would be set to "SingleTransferPipe".
However, if "brakesystemtype" was not set at all, then, after parsing, the brake type would also be "null", but then the brake system would be set to "AirSinglePipe".
So, the first loaded instance of a wagon which did not have "brakesystemtype" defined would get brake system "AirSinglePipe", while any copies would get brake system "SingleTransferPipe". This caused the mismatch, and thus the load error.
The error is corrected in version 2989, by setting the brake type to "SingleTransferPipe" if "brakesystemtype" is not defined at all.
Regards,
Rob Roeterdink
The new method setting brake type was called during parsing of "brakesystemtype" in wagon or engine file, and during the copy action. If on these calls the defined brake type was "null", brake system would be set to "SingleTransferPipe".
However, if "brakesystemtype" was not set at all, then, after parsing, the brake type would also be "null", but then the brake system would be set to "AirSinglePipe".
So, the first loaded instance of a wagon which did not have "brakesystemtype" defined would get brake system "AirSinglePipe", while any copies would get brake system "SingleTransferPipe". This caused the mismatch, and thus the load error.
The error is corrected in version 2989, by setting the brake type to "SingleTransferPipe" if "brakesystemtype" is not defined at all.
Regards,
Rob Roeterdink
Page 1 of 1