openrails / test-launchpad-bugs

TEST repository for Launchpad bug migration exploration
0 stars 0 forks source link

[BUG 1488329] System.NullReferenceException at ORTS.Viewer3D.RollingStock.MSTSLocomotiveViewer.StartRefilling (X3226, WP 3rd Sub, CZ Introduction, wash rack & signal) #1589

Open twpol opened 9 years ago

twpol commented 9 years ago

Imported from https://bugs.launchpad.net/bugs/1488329

Property Value
Reported by James Bradley, Jr. (jbrad1974)
Date reported Tue, 25 Aug 2015 05:33:24 GMT
Tags crash, graphics

The activity "CZ Introduction" on the WP Feather River Sub (by 3D Trains) requires you to take the train through the wash rack before proceeding on the main. The pop-up instructions say the following:

1)Proceed up to the wash rack signal, then stop your train. 2)Press "T" to request permission to enter the wash rack. 3)Wash rack signal will change from Lunar to Purple. 4)Press "CAPS LOCK" and "T" to activate the wash rack. 5)Proceed through the wash rack no faster than 2 MPH.

I have done this activity many times in MSTS, and it has worked. However, in OR, an error message comes up stating that you are too far from the water point, even though the feature works in MSTS. The wash rack signal will not change to Purple.

Proceeding into the wash rack while pressing "T" causes OR to fail.

Although this feature may be unique to the WP Feather River route, I would like to see it functional in OR. I have attached my OR Log, as well as the .sigcfg and .sigscr files.

twpol commented 9 years ago

Imported from https://bugs.launchpad.net/or/+bug/1488329/comments/1

Property Value
Posted by James Bradley, Jr. (jbrad1974)
Date posted Tue, 25 Aug 2015 05:33:24 GMT
twpol commented 9 years ago

Imported from https://bugs.launchpad.net/or/+bug/1488329/comments/2

Property Value
Posted by James Bradley, Jr. (jbrad1974)
Date posted Tue, 25 Aug 2015 05:34:54 GMT
twpol commented 9 years ago

Imported from https://bugs.launchpad.net/or/+bug/1488329/comments/3

Property Value
Posted by James Bradley, Jr. (jbrad1974)
Date posted Tue, 25 Aug 2015 05:35:48 GMT
twpol commented 9 years ago

Imported from https://bugs.launchpad.net/or/+bug/1488329/comments/4

Property Value
Posted by Carlo Santucci (carlosanit1)
Date posted Sat, 05 Sep 2015 07:37:24 GMT

This route seems to have unusual pickup types. Can you please attach: 1) the .tdb file; 2) the .w file where the pickup is located; to find out this, open the F5 debug hud, and when you are at the pickup read the first two parameters of the last HUD line (Camera). With these you can go in the World subfolder and get the file.

twpol commented 9 years ago

Imported from https://bugs.launchpad.net/or/+bug/1488329/comments/5

Property Value
Posted by James Bradley, Jr. (jbrad1974)
Date posted Sat, 05 Sep 2015 09:53:07 GMT
twpol commented 9 years ago

Imported from https://bugs.launchpad.net/or/+bug/1488329/comments/6

Property Value
Posted by James Bradley, Jr. (jbrad1974)
Date posted Sat, 05 Sep 2015 09:54:13 GMT
twpol commented 9 years ago

Imported from https://bugs.launchpad.net/or/+bug/1488329/comments/7

Property Value
Posted by James Bradley, Jr. (jbrad1974)
Date posted Sat, 05 Sep 2015 09:58:26 GMT

I can't see anything in the .w file other than random symbols. Hopefully...you can make sense of it.

twpol commented 9 years ago

Imported from https://bugs.launchpad.net/or/+bug/1488329/comments/8

Property Value
Posted by James Bradley, Jr. (jbrad1974)
Date posted Tue, 08 Sep 2015 10:20:28 GMT

Here is the entry for the Wash Rack signal:

Pickup ( UiD ( 963 ) SpeedRange ( 0 0 ) PickupType ( 5 0 ) PickupAnimData ( 3 2 ) PickupCapacity ( 200000 2000 ) TrItemId ( 0 836 ) CollideFlags ( 576 ) FileName ( wp_wash_2hd_lens.s ) Position ( 83.7086 1473.08 -321.759 ) QDirection ( 0 -0.528068 0 0.849202 ) VDbId ( 4294967295 ) )

And here is the entry for the wash rack itself:

Pickup ( UiD ( 859 ) SpeedRange ( 0 0 ) PickupType ( 5 0 ) PickupAnimData ( 3 2 ) PickupCapacity ( 200000 2000 ) TrItemId ( 0 751 ) CollideFlags ( 576 ) FileName ( GX-WashRack01.s ) Position ( 29.4134 1473.1 -351.351 ) QDirection ( 0 -0.533134 0 0.846031 ) VDbId ( 4294967295 ) )

I'm not sure what any of these values mean, so hopefully someone here can interpret them and fix the issue. Thanks!

twpol commented 9 years ago

Imported from https://bugs.launchpad.net/or/+bug/1488329/comments/9

Property Value
Posted by James Bradley, Jr. (jbrad1974)
Date posted Wed, 09 Sep 2015 02:51:39 GMT

Just attempted this activity again with the most recent version of OR, and it still causes OR to crash. The wash rack signal still does not function when pressing "T", however it does not cause OR to crash.

Entering the wash rack, OR counts down the distance in meters until the wash rack (water source) has been reached. A message then appears that the locomotive MUST be stationary, which contradicts the direction in the activity (proceed at 2 MPH) and the way MSTS would handle this pickup. When I stopped the train in the wash rack and pressed "T", an error message appeared that the wash rack was an incompatible water type and OR crashed.

I have attached the OR Log Report for reference.

twpol commented 9 years ago

Imported from https://bugs.launchpad.net/or/+bug/1488329/comments/10

Property Value
Posted by James Bradley, Jr. (jbrad1974)
Date posted Wed, 09 Sep 2015 02:54:24 GMT

F.Y.I....I have discovered that the Wash Rack signal is not part of the actual signaling system (i.e. SigCfg.dat), but is actually a "Pickup Object". The signal files can be ignored, as this appears to be an issue with Pickup Objects, not signals.

twpol commented 9 years ago

Imported from https://bugs.launchpad.net/or/+bug/1488329/comments/11

Property Value
Posted by James Bradley, Jr. (jbrad1974)
Date posted Wed, 09 Sep 2015 02:55:15 GMT
twpol commented 9 years ago

Imported from https://bugs.launchpad.net/or/+bug/1488329/comments/12

Property Value
Posted by Carlo Santucci (carlosanit1)
Date posted Sun, 18 Oct 2015 14:53:15 GMT

Hi James, long time since we interacted about this. At the moment I'm not able to say why you get the crash, but I can tell you that the fact that you get the message that the locomotive MUST be stationary is well justified, because the SpeedRange of the pickups as defined in the .w file is SpeedRange ( 0 0 ) as yourself can see in your post #8. So, min speed and max speed are both set to 0. So, in order for the pickups to become operating, these lines should be replaced with SpeedRange ( 0 2.0 ) (first value is min speed, second value is max speed in mph). I think this should be done for all wash rack pickup entries in the .w file, that is entries 963, 964, 859, 858 and 860. However I think this could not be enough, because I still expect you get the indication that the wash rack is of an incompatible water type. In fact OR checks if the pickup type is compatible with the loco running under it. So a water pickup can be activated only by a steam loco with tender.

twpol commented 8 years ago

Imported from https://bugs.launchpad.net/or/+bug/1488329/comments/13

Property Value
Posted by James Bradley, Jr. (jbrad1974)
Date posted Mon, 15 Feb 2016 21:26:23 GMT

Carlo,

It has been a long time since we interacted about this. Is it possible to remove the stipulation in OR that the locomotive MUST be of a compatible type? In the real world, a water tower would still be operable, even if it had a diesel below it instead of a steam loco. It shouldn't matter what type the player's locomotive is, only that the pickup object is operational. If the pickup were coal, but the locomotive doesn't use coal for fuel, the coal chute would still open and there would be no effect on the player train.

In the case of my scenario on the WP Feather River, the wash rack and wash rack signal should still be operational, even though a diesel loco doesn't use water. You should still be able to see the animation, but it won't have any effect on the player's train.

Just a suggestion.

--James

twpol commented 7 years ago

Imported from https://bugs.launchpad.net/or/+bug/1488329/comments/14

Property Value
Posted by James Bradley, Jr. (jbrad1974)
Date posted Wed, 01 Feb 2017 10:12:13 GMT

It has been awhile since I visited this issue. Just attempted changing the "PickupType" value to several values between 0-9. The only two values that appear to work are 6 & 7.

With 6, the Wash Rack signal is recognized as a "Coal" pickup, giving a distance to the coal chute. However, OpenRails crashes as soon as the distance is zero.

With 7, the Wash Rack signal is recognized as a "Diesel Fuel Oil" pickup, giving a distance to the fueling point. When the distance reaches zero, OR does not crash and I get a popup that states "Fuel Oil Full". The signal itself never changed from lunar to purple (animated) as it is supposed to.

Either OR doesn't recognize any PickupType value other than 6 & 7 (i.e. 5 is not defined), or the engine type is not compatible. I suspect it is the first reason, as the activity is using a diesel but still recognized the coal pickup. This would also explain why the sand towers were not recognized as a valid pickup either. OR needs to have it's code updated to recognize all pickup types, regardless of the type of locomotive being driven.