News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

[One-way Two-lane road Fun Patch related] crash after road modification

Started by sheldon_cooper, March 29, 2017, 02:25:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sheldon_cooper

My Simutrans is 120.2.2 (r8128), I am using the latest version of the OTRP 9.0 patch.
Using pak way-object.override_0
I've been playing with these updates for a long time, no problem, but after I change a road (it's a highway, and I'm trying to elevate it), this problem appears, what should it be?


THLeaderH

Thank you for your bug report. :D
I couldn't reproduce your problem in my test code. Could you make a video to describe this problem if it's not a heavy work for you?

I should note that there was a commit which fixed "crash with elevated way tool and shift" problem in r8152.

sheldon_cooper

Here is the video:
[vimeo]https://vimeo.com/210702968[/vimeo]

If I do not change anything, the error does not happen, and the game usually occurs. What should it be?

prissi

Maybe the code make the look ahead could not assume that there might be no longer a valid ground tile anymore. You should wait for the patch being integrated into imutrans, because I highly doubt those flagged roads will make it into the final version.

THLeaderH

QuoteMaybe the code make the look ahead could not assume that there might be no longer a valid ground tile anymore.
I saw sheldon_cooper's video and succeeded in reproducing the bug. This is a typical null pointer access. I didn't write null pointer checks in many points. However, just enclosing by "if" may bring unexpected problems. I think route reculculation should be called when the return value of welt->lookup(r.at(test_index));


I should leave these bugs to be solved by the great simutrans dev team, I think...?

Dwachs

@THLeadierH Where does it crash? How can this be reproduced?
Parsley, sage, rosemary, and maggikraut.

THLeaderH

Quote@THLeadierH Where does it crash? How can this be reproduced?
Just follow the sheldon's video and it'll crash.
Overtaking convoys always check 4 tiles ahead to avoid head on crash. If the height of ground in route is changed using slope tools, the checking method get invalid ground. The instance of grund_t is null and this causes null pointer access.

Dwachs

This affects unpatched version as well, I guess?  The null-pointer dereferencing happens at which position in the code?
Parsley, sage, rosemary, and maggikraut.

THLeaderH

#8
No. I tested on r7720 stable and it worked fine.
I found the null-pointer dereferencing happens at

  • vehicle/simvehicle.cc:2238
  • vehicle/simvehicle.cc:2591
but I don't know there are others.

sheldon_cooper

Hello, recently I went to make a change on the highway, (the same way the video added here) and the same problem occurred, the strange thing is that this mistake had already been solved, and was not happening in my game anymore. I am currently using Sim.exe 120.2.2 (Nightly r8128) pak128 2.5.2
Thank you very much in advance!
:)

THLeaderH

Thank you for your report.
In what version of OTRP did the phenomenon occur? Is that bug reproducible? Or impossible?

sheldon_cooper

is the same error that occurs in the video, which I added here, see:
Quote from: sheldon_cooper on March 30, 2017, 02:11:03 AM
Here is the video:
[vimeo]https://vimeo.com/210702968[/vimeo]

If I do not change anything, the error does not happen, and the game usually occurs. What should it be?

OTRP Version 9.0.

I remember that the problem had been solved, after I downloaded an update on Nightly builds. I may have updated a file that corrected this problem, but I do not know which one, and I do not remember the version of Nightly builds.

THLeaderH

I tested this case with OTRP v12_3 but couldn't reproduce the error. Could you test this with OTRP v12_3?

sheldon_cooper

probably, this error does not occur in the OTRP v12_3 version as it is already fixed.
The last time I tested the latest version, it was giving compatibility problems with my saved game, now, I'm using version 9.0, because this version is not making an error with my saved game. But I will try to recreate this error with the newest version, as you indicated.