The International Simutrans Forum

Development => Bug Reports => Topic started by: richardk on July 15, 2013, 11:33:57 AM

Title: r6585 nightly linux 64 -- land sinking into the water / eathquakes?
Post by: richardk on July 15, 2013, 11:33:57 AM
r6585 linux 64.
When I started a saved game I found that some land had sunk into the water. There was a road on that square and therefore vehicles could not find a route. This has happened near water and at the edge of the map, and I think that the sunk squares might have been flat artificial slopes, but I'm not too sure. The edge of the map has lost quite a large area into the sea.

I've had this happen in both pak128.open.r1199 & pak128.Britain.

This has only started recently, sorry but I don't know exactly which version this started at, but it just happen in the latest nightly.
Any ideas what's going wrong?

Richard
Title: Re: r6585 nightly linux 64 -- land sinking into the water / eathquakes?
Post by: kierongreen on July 15, 2013, 01:01:15 PM
Would it be possible to show a screenshot or provide a saved game?
Title: Re: r6585 nightly linux 64 -- land sinking into the water / eathquakes?
Post by: richardk on July 15, 2013, 01:51:08 PM
Sure -- No problem. Shall I post them here? they are a bit big.
Title: Re: r6585 nightly linux 64 -- land sinking into the water / eathquakes?
Post by: richardk on July 15, 2013, 02:13:13 PM
OK -I've copied the relevant bit of the screen shot to a png , which should now be small enough
Title: Re: r6585 nightly linux 64 -- land sinking into the water / eathquakes?
Post by: kierongreen on July 16, 2013, 03:42:48 PM
Very strange....
Title: Re: r6585 nightly linux 64 -- land sinking into the water / eathquakes?
Post by: Ters on July 16, 2013, 05:50:59 PM
Do you have any idea of which revision(s) of Simutrans you used before this? Even a rough estimate?
Title: Re: r6585 nightly linux 64 -- land sinking into the water / eathquakes?
Post by: IgorEliezer on July 16, 2013, 05:52:41 PM
People from PT-Portuguese board would rejoice on seeing these screens. They asked for quakes, accidents and all kind of simcity stuff to be put in Simutrans a ton of times.
Title: Re: r6585 nightly linux 64 -- land sinking into the water / eathquakes?
Post by: kierongreen on July 16, 2013, 06:18:38 PM
Could conceivably be incompatibility between nightly versions to do with double height code.
Title: Re: r6585 nightly linux 64 -- land sinking into the water / eathquakes?
Post by: Ters on July 16, 2013, 07:49:26 PM
But why just those tiles? Were they something else than plain grund_t, like fundament_t? Is it even possible to fill such an area with that?
Title: Re: r6585 nightly linux 64 -- land sinking into the water / eathquakes?
Post by: Dwachs on July 17, 2013, 05:58:03 AM
A savegame before this happened would be very helpful to find to actual cause.
Title: Re: r6585 nightly linux 64 -- land sinking into the water / eathquakes?
Post by: Tazze on July 18, 2013, 10:03:17 AM
I'm sorry not to report that: Although I'm windows user, I had faced this disaster in about a month ago.
I post save data for pak128 Britain.
http://simutrans-germany.com/files/upload/britain_6.17-6.28.sve

my  log
6/17       I had downloaded nightly " simwingdi_2013-06-17_v112.4_r6553 " with pak britain-1208 to make road vehicle list for Pak Britain and made save data.

6/24       I had upload to "r6555" (I upload the latest version frequently..)  but world limits in this save data had be broken a bit.

7/3         I upload to "r5676" but the bug had not fixed.

7/4 or 5  I had used this save data made road vehicle list for Pak Britain. Suddenly, Problem window turned up,the ground was broken down when I looked there.

I made the list from this save data but I stoped using this.

sorry to be late to report because I checked my log and I'm carefully against bug report.
Title: Re: r6585 nightly linux 64 -- land sinking into the water / eathquakes?
Post by: kierongreen on July 18, 2013, 11:18:34 AM
Has anyone encountered this issue when loading a release saved game as opposed to one from a nightly?
Title: Re: r6585 nightly linux 64 -- land sinking into the water / eathquakes?
Post by: captain crunch on August 01, 2013, 02:26:43 PM
Some observations:
* It does not only happen with save games from earlier (nightly) version
* It does not only happen on shore lines: The the lowered tile in the saved game Lengerich sunken land (http://simutrans-germany.com/files/upload/Lengerich_-_sunken_land.sve) was a train tunnel.
* It is possible to gain land by lowering the flat land tiles on the shore, see screen shots from the saved game Lengerich - Landgewinnung (http://simutrans-germany.com/files/upload/Lengerich_-_Landgewinnung.sve)

Versions:
* simutrans 112.4 current trunk from github
* pak64.german 110-0c
Title: Re: r6585 nightly linux 64 -- land sinking into the water / eathquakes?
Post by: kierongreen on August 01, 2013, 02:58:59 PM
QuoteIt is possible to gain land by lowering the flat land tiles on the shore, see screen shots from the saved game Lengerich - Landgewinnung
This is intended.
Title: Re: r6585 nightly linux 64 -- land sinking into the water / eathquakes?
Post by: captain crunch on August 10, 2013, 06:03:33 PM
Probably related, when lowering the marked tile in the attached save game, it digs a very deep shaft, which cannot get undone.
Title: Re: r6585 nightly linux 64 -- land sinking into the water / eathquakes?
Post by: Ters on August 10, 2013, 07:19:12 PM
Quote from: captain crunch on August 10, 2013, 06:03:33 PM
Probably related, when lowering the marked tile in the attached save game, it digs a very deep shaft, which cannot get undone.
This is a relatively new bug. Unfortunately, I'm not sure which revision I built the last time (only enabled WITH_REVISION now), but it did already contain some theme stuff, yet I did not get any deep shafts with that.
Title: Re: r6585 nightly linux 64 -- land sinking into the water / eathquakes?
Post by: z9999+ on August 15, 2013, 07:26:52 AM
I'm not sure this is related or not. Tested with r6646.

Can build way on water.
(http://i.imgur.com/att9CG7.gif)

Cannot dig correctly.
(http://i.imgur.com/lug1Lue.gif)
Title: Re: r6585 nightly linux 64 -- land sinking into the water / eathquakes?
Post by: kierongreen on August 15, 2013, 07:41:23 AM
Both bugs shown by z9999+ confirmed on 6646. Will work on later after work if someone doesn't get there first...
Title: Re: r6585 nightly linux 64 -- land sinking into the water / eathquakes?
Post by: captain crunch on August 15, 2013, 11:28:56 AM
Perhaps introduced with this commit (https://github.com/aburch/simutrans/commit/44704717625e2beb7aa8aef6d5e051a555b62cd6) in simwerkz.cc line 1273?
Title: Re: r6585 nightly linux 64 -- land sinking into the water / eathquakes?
Post by: kierongreen on August 15, 2013, 05:19:27 PM
That bit of the commit you refer to has following changes:

+  const sint8 water_hgt = welt->get_water_hgt( pos.get_2d() );
....
-      if(  !gr1->ist_wasser()  &&  new_slope == 0  &&  new_pos.z == welt->get_water_hgt( pos.get_2d() )  &&  gr1->get_typ() != grund_t::tunnelboden  ) {
+      if(  !gr1->ist_wasser()  &&  new_slope == 0  &&  new_pos.z == water_hgt  &&  gr1->get_typ() != grund_t::tunnelboden  ) {

which should be the same before...
Title: Re: r6585 nightly linux 64 -- land sinking into the water / eathquakes?
Post by: Ters on August 15, 2013, 05:49:18 PM
The maximum height error isn't a bug, in case anyone thinks that. The bug is the overly deep shaft created just before.
Title: Re: r6585 nightly linux 64 -- land sinking into the water / eathquakes?
Post by: captain crunch on August 15, 2013, 07:22:14 PM
Quote from: kierongreen on August 15, 2013, 05:19:27 PM
That bit of the commit you refer to has following changes:

+  const sint8 water_hgt = welt->get_water_hgt( pos.get_2d() );
....
-      if(  !gr1->ist_wasser()  &&  new_slope == 0  &&  new_pos.z == welt->get_water_hgt( pos.get_2d() )  &&  gr1->get_typ() != grund_t::tunnelboden  ) {
+      if(  !gr1->ist_wasser()  &&  new_slope == 0  &&  new_pos.z == water_hgt  &&  gr1->get_typ() != grund_t::tunnelboden  ) {

which should be the same before...
Sadly, I do not know enough about C++ to be able to affirm that, but reverting the changed source line fixes the problem of creation of the erroneous deep shafts.
Quote from: TersThe bug is the overly deep shaft created just before.
Exactly. And also building land on water as z9999+ noted.

Title: Re: r6585 nightly linux 64 -- land sinking into the water / eathquakes?
Post by: kierongreen on August 15, 2013, 07:27:53 PM
I think I've fixed both.... and it was water_hgt not being updated when water height was changed, then code after relying on old value. Committed in 6649.
Title: Re: r6585 nightly linux 64 -- land sinking into the water / eathquakes?
Post by: kierongreen on August 18, 2013, 12:26:59 AM
Incidentally, while the bugs described by z9999+ have been fixed, can anyone confirm whether the original bugs at the top of this thread are still present?
Title: Re: r6585 nightly linux 64 -- land sinking into the water / eathquakes?
Post by: captain crunch on August 18, 2013, 11:01:19 AM
Yes, the original bug is still not fixed:
* OK (http://simutrans-germany.com/files/upload/Wesel.sve)
* Rotated map twice, land sunk (http://simutrans-germany.com/files/upload/Wesel_2.sve)
Title: Re: r6585 nightly linux 64 -- land sinking into the water / eathquakes?
Post by: kierongreen on August 18, 2013, 11:50:29 AM
Ok thanks - bug is linked to http://forum.simutrans.com/index.php?topic=12000.0 I'm trying to find out a solution that works for all tiles. Sometimes I wish that someone hadn't made the decision not to save the height grid with saved games...
Title: Re: r6585 nightly linux 64 -- land sinking into the water / eathquakes?
Post by: Ters on August 18, 2013, 11:56:53 AM
Quote from: captain crunch on August 18, 2013, 11:01:19 AM
Yes, the original bug is still not fixed:

I'm not 100 % sure this is the same as the bug reported in the first post since we have no information about how the landscape looked before. But it is certainly no impossibility. In any case, they are both related to what kierongreen links to.
Title: Re: r6585 nightly linux 64 -- land sinking into the water / eathquakes?
Post by: kierongreen on August 18, 2013, 06:18:26 PM
Ok, I think that should be bug fixed in 6655. Can people please particularly check for any more slope errors. I think I've got them all now but you never know where more will be lurking!