Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug&Questions] Uncoupling fixed coupler crash #936

Closed
JunmoreHeavyBox opened this issue Aug 26, 2023 · 15 comments
Closed

[Bug&Questions] Uncoupling fixed coupler crash #936

JunmoreHeavyBox opened this issue Aug 26, 2023 · 15 comments

Comments

@JunmoreHeavyBox
Copy link
Contributor

Description

I fixed some couplers to be semi-permanent, I tried to unhook the front fixed coupler on the last car and the game crashed.

Logs

Logs may be accessed through the 'Report Problem' button on the bottom left of the screen.
Please provide a log, and a crash-log if the game actually crashes.

OpenBVE Crash- 2023.8.23[22.30].log

Related information

  • OpenBVE Version: Build 2023-08-23

Other

  • The uncoupler sound only plays when the head car of the original train is uncoupled from the back car.

  • When I use the emergency brake, the detached train will emergency brake with my train, but not release.
    I'm still torn on whether I should keep this feature or not. It's similar to the emergency brake button provided at the station...

@JunmoreHeavyBox
Copy link
Contributor Author

Urge.

leezer3 added a commit that referenced this issue Aug 29, 2023
@leezer3
Copy link
Owner

leezer3 commented Aug 29, 2023

Build from today will sort out the coupler sound (accidentally restricted that to the driver car) and have looked at the brake systems some more.

It will now not follow the EB brake actions of the player train-
This needs a new configuration item somwhere to allow it to work properly (basically needs an uncouple action, so that we can have either EB, or nothing)- Thinking about that at the minute, but I think the probable answer will be at least temporarily to apply EB to the decoupled portion.

Other thing I'd quite like is to add brake pipe isolating cocks, forcing EB to apply to all portions unless closed after uncoupling (as per real life)
However, adding something like this requires another key assignment or sorting out a popup to do the job. Not so much difficult, as the scope of this keeps expanding from a simple change.

I can't however reproduce the crash at the minute- Please share the train.dat and train.xml

@JunmoreHeavyBox
Copy link
Contributor Author

JunmoreHeavyBox commented Aug 29, 2023

All I know is that I set CanUncoupled to False on the last coupler, and then try to decouple it at the end car.

@JunmoreHeavyBox
Copy link
Contributor Author

That's it.

<Car>CarMC.xml</Car>
<Car>CarT.xml</Car>
<Car>CarT.xml</Car>
<Car>CarT.xml</Car>
<Coupler>
    <CanUncoupled>False</CanUncoupled>
</Coupler>
<Car>CarTC.xml</Car><!--Here to uncoupler-->

@JunmoreHeavyBox
Copy link
Contributor Author

The middle coupler is surrounded by the fixed coupler and has no problem decoupling it from behind. Oddly enough, when I try to decouple from the front, it becomes a fixed coupler.

<Car>CarTC.xml</Car>
<Car>CarT.xml</Car>
<Car>CarT.xml</Car>
<Car>CarT.xml</Car>
<Coupler>
    <CanUncoupled>False</CanUncoupled>
</Coupler>
<Car>CarMC.xml</Car>
<Car>CarMC.xml</Car><!--Here to uncoupler front car-->
<Coupler>
    <CanUncoupled>False</CanUncoupled>
</Coupler>
<Car>CarT.xml</Car>
<Car>CarT.xml</Car>
<Car>CarT.xml</Car>
<Car>CarTC.xml</Car>

@JunmoreHeavyBox
Copy link
Contributor Author

Urge agin

leezer3 added a commit that referenced this issue Aug 31, 2023
@leezer3
Copy link
Owner

leezer3 commented Aug 31, 2023

OK, that should stop the crashing and the separate glitch where the camera jumps to a different car on uncoupling the front.

@JunmoreHeavyBox
Copy link
Contributor Author

JunmoreHeavyBox commented Aug 31, 2023

Ok. but these consists still don't uncouple the front.

<Car>CarTC.xml</Car>
<Car>CarT.xml</Car>
<Car>CarT.xml</Car>
<Car>CarT.xml</Car>
<Car>CarMC.xml</Car>
<Car>CarTC.xml</Car><!--Here to uncoupler front car-->
<Coupler>
    <CanUncoupled>False</CanUncoupled>
</Coupler>
<Car>CarT.xml</Car>
<Coupler>
    <CanUncoupled>False</CanUncoupled>
</Coupler>
<Car>CarT.xml</Car>
<Car>CarT.xml</Car>
<Car>CarMC.xml</Car>
<Car>CarMC.xml</Car>
<Car>CarMC.xml</Car>
<Car>CarMC.xml</Car><!--Here to uncoupler front car-->
<Coupler>
    <CanUncoupled>False</CanUncoupled>
</Coupler>
<Car>CarMC.xml</Car>

@JunmoreHeavyBox
Copy link
Contributor Author

ahh, Things aren't simple. Consider other coupler consists...

@JunmoreHeavyBox
Copy link
Contributor Author

I have not set CanUncoupled, but the last two couplers are not uncoupled.

The coupler is fixed, but can be uncoupled at the front.

<Car>CarMC.xml</Car>
<Coupler>
    <CanUncoupled>False</CanUncoupled>
</Coupler>
<Car>CarMC.xml</Car>
<Coupler>
    <CanUncoupled>False</CanUncoupled>
</Coupler>
<Car>CarMC.xml</Car><!--Here to uncoupler front car-->
<Car>CarMC.xml</Car>

@leezer3
Copy link
Owner

leezer3 commented Sep 3, 2023

OK, please try the build from today.

Indicies are giving me a headache......
The coupler when uncoupling the front is on the preceeding car, but to actually get the 'right' display number we need to add one.

Other additions to this are a new tag, UncouplingBehaviour to control the brake settings when uncoupling.
This isn't perfect, as the uncoupled consist currently has a dummy brake handle, so is unlikely to reflect an applied service brake correctly when uncoupled. ( #934 will help with this)

/// <summary>Emergency brake is applied to both consists</summary>
Emergency,
/// <summary>Emergency brake is applied to the player consist</summary>
/// <remarks>The uncoupled consist will retain the previous brake setting</remarks>
EmergencyPlayer,
/// <summary>Emergency brake is applied to the uncoupled consist</summary>
/// <remarks>The player consist will retain the previous brake setting</remarks>
EmergencyUncoupledConsist,
/// <summary>The brake is released on the uncoupled consist</summary>
/// <remarks>The player consist will retain the previous brake setting</remarks>
ReleasedUncoupledConsist,
/// <summary>The brakes are released on both consists</summary>
Released

@JunmoreHeavyBox
Copy link
Contributor Author

It's fixed. Almost.
Then add documentation for UncouplingBehaviour.

Still no sound is heard when the front car is decoupled and there is something wrong with the numbers in the decoupling description.

Uncoupling the DIRECTION of Car Number 11, 21, 31,... ,91, 101, 111, 131, 141...

Suggestions for uncoupling description.
My translation is such that it looks like it's saying that it's the index cart that's being decoupled... I thought about that meaning.

已解挂后方的车厢 [index]

Add a variable to it, I wanted to translate it like this.

在 [index] 号车解挂了后方的车厢

@leezer3
Copy link
Owner

leezer3 commented Sep 8, 2023

Fixed the string interpolation issue.

With the translation, could probably do something, but would prefer not to, as this is easier and less prone to typos.
I don't understand enough of the nuances of Chinese- Is this a matter of looking nicer or being more understandable?

@JunmoreHeavyBox
Copy link
Contributor Author

JunmoreHeavyBox commented Sep 8, 2023

... comparison

T1: 已解挂 后方 的 车厢 i (及 随后的 车厢)
C1: Decoupling the rear carriage i (and subsequent cars)// Supplement

T2: 在 i 号 车 解挂了 后方 的 车厢
C2: On car num i decoupling the rear carriages

I hard't explain it.

O: Uncoupling the rear of Car Number i
MT: 断开i号车的后部

@JunmoreHeavyBox
Copy link
Contributor Author

Close the Issue for the topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants