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

Assertion when demolishing a lock built on a river with rocks #6264

Closed
DorpsGek opened this issue Mar 25, 2015 · 4 comments
Closed

Assertion when demolishing a lock built on a river with rocks #6264

DorpsGek opened this issue Mar 25, 2015 · 4 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

Samu opened the ticket and wrote:

This NewGRF was used: OpenGFX+ Landscape 1.1.2 to place rocks on the river.
http://dev.openttdcoop.org/projects/ogfx-landscape

Steps:
1 - Use the NewGRF
2 - Start a new game
3 - Find a river and place rocks on the upper tile of where a lock would be built
4 - Build the lock
5 - Demolish the lock

Assertion error!

Reported version: 1.5.0-RC1
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/6264
@DorpsGek
Copy link
Member Author

Samu wrote:

Files submitted by ChillCore, used trunk 27204

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/6264#comment13838

@DorpsGek
Copy link
Member Author

Alberth wrote:

openttd: /home/alberth/openttd/play/src/water_map.h:414: void MakeCanal(TileIndex, Owner, uint8): Assertion `o != OWNER_WATER' failed.

# 7 0x00007f4135685532 in __assert_fail () from /lib64/libc.so.6
# 8 0x0000000000af83a2 in MakeCanal (t=146113, o=OWNER_WATER, random_bits=35 '# ') at /home/alberth/openttd/play/src/water_map.h:414
# 9 0x0000000000af935d in MakeWaterKeepingClass (tile=146113, o=OWNER_WATER) at /home/alberth/openttd/play/src/water_cmd.cpp:202
# 10 0x0000000000af9e31 in RemoveLock (tile=146625, flags=DC_EXEC) at /home/alberth/openttd/play/src/water_cmd.cpp:353
# 11 0x0000000000afa89b in ClearTile_Water (tile=146625, flags=DC_EXEC) at /home/alberth/openttd/play/src/water_cmd.cpp:530
# 12 0x000000000083babc in CmdLandscapeClear (tile=146625, flags=DC_EXEC, p1=0, p2=0, text=0x0) at /home/alberth/openttd/play/src/landscape.cpp:641
# 13 0x000000000075f724 in DoCommand (tile=146625, p1=0, p2=0, flags=DC_EXEC, cmd=4, text=0x0) at /home/alberth/openttd/play/src/command.cpp:492
# 14 0x000000000083be96 in CmdClearArea (tile=146625, flags=DC_EXEC, p1=146625, p2=0, text=0x0) at /home/alberth/openttd/play/src/landscape.cpp:693
# 15 0x00000000007602fd in DoCommandPInternal (tile=146625, p1=146625, p2=0, cmd=221773896, callback=
0x860275 <CcPlaySound10(CommandCost const&, unsigned int, unsigned int, unsigned int)>, text=0x0, my_cmd=true, estimate_only=false)
at /home/alberth/openttd/play/src/command.cpp:718
# 16 0x000000000075faa9 in DoCommandP (tile=146625, p1=146625, p2=0, cmd=221773896,
callback=0x860275 <CcPlaySound10(CommandCost const&, unsigned int, unsigned int, unsigned int)>, text=0x0, my_cmd=true) at /home/alberth/openttd/play/src/command.cpp:577
# 17 0x0000000000a7aa9b in GUIPlaceProcDragXY (proc=DDSP_DEMOLISH_AREA, start_tile=146625, end_tile=146625) at /home/alberth/openttd/play/src/terraform_gui.cpp:117
# 18 0x00000000007895a8 in BuildDocksToolbarWindow::OnPlaceMouseUp (this=0x2ed4fe0, select_method=VPM_X_AND_Y, select_proc=DDSP_DEMOLISH_AREA, pt=..., start_tile=146625,
end_tile=146625) at /home/alberth/openttd/play/src/dock_gui.cpp:235
# 19 0x0000000000af20d0 in VpHandlePlaceSizingDrag () at /home/alberth/openttd/play/src/viewport.cpp:3135
# 20 0x0000000000b14df5 in MouseLoop (click=MC_NONE, mousewheel=0) at /home/alberth/openttd/play/src/window.cpp:2792
# 21 0x0000000000b154c4 in HandleMouseEvents () at /home/alberth/openttd/play/src/window.cpp:2943
# 22 0x0000000000ae92b2 in VideoDriver_SDL::PollEvent (this=0x1b76bb0) at /home/alberth/openttd/play/src/video/sdl_v.cpp:588

I can see five ways to fix this problem, where only the final three would seem adequate.
- don't allow rocks to be owned (don't know how feasible that is)
- don't allow rocks to be placed in water (but one may be able to pull this same trick with rocks on land)
- don't allow building a lock here
- fix ownership when building the lock
- be less paranoid about ownership when demolishing


This comment was imported from FlySpray: https://bugs.openttd.org/task/6264#comment13845

@DorpsGek
Copy link
Member Author

Alberth wrote:

Perhaps there is a relation with #6232, which also discusses water/canal ownership issues?


This comment was imported from FlySpray: https://bugs.openttd.org/task/6264#comment13847

@DorpsGek
Copy link
Member Author

frosch closed the ticket.

Reason for closing: Fixed

in r27254


This comment was imported from FlySpray: https://bugs.openttd.org/task/6264

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) bug labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant