dashdan / freerct

Automatically exported from code.google.com/p/freerct
0 stars 0 forks source link

Removing a path created by "Long" path feature crashes game #41

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create any path using Paths -> Long
2. Remove any segment of that path using Paths -> Remove

What is the expected output? What do you see instead?
Expected: Path removed
Output: Segmentation fault - Crashes Program

What version of the product are you using? On what operating system?
SVN revision 1097
OpenSUSE 13.1

Please provide any additional information below.
Netbeans debugger points to map.h line 74 as the problem.

Complete call stack:
------------------------
Voxel::GetInstance (this=0x0)
RemovePath (xpos=8, ypos=5, zpos=8 '\\b', test_only=false)
PathBuildManager::SelectBuyRemove (this=0x80f84a0 <_path_builder>, buying=false)
PathBuildGui::OnClick (this=0x8573848, number=11)
GuiWindow::OnMouseButtonEvent (this=0x8573848, state=1 '\\001')
WindowManager::MouseButtonEvent (this=0x8217490 <_manager>, button=MB_LEFT, 
pressed=true)
HandleEvent ()
main (argc=1, argv=0xbffff3a4)

Original issue reported on code.google.com by Crof2...@yahoo.com on 31 Mar 2014 at 8:03

GoogleCodeExporter commented 9 years ago
Another observation is that paths created with "long" do not have clearance 
restriction. Also, Long paths on an otherwise bare tile have a voxel height of 
only 1 whereas a regular path on bare tile has a voxel height of 2. If "long" 
paths are built above ground, it seems that the supports have voxels but the 
total number of voxels is still 1 less that it should be. The problem may lie 
in the code that makes the virtual voxels during construction or the code that 
copies them into the real world. I don't understand the code well enough to 
determine what is going wrong.

Original comment by jjh...@aol.com on 25 Apr 2014 at 6:09

GoogleCodeExporter commented 9 years ago

Original comment by CharlesP...@googlemail.com on 27 May 2014 at 1:14

GoogleCodeExporter commented 9 years ago
Fixed both in r1240, thanks for the report

Original comment by Alberth2...@gmail.com on 26 Jul 2014 at 8:35