News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

Assertion failure when running test in debug mode

Started by ceeac, Yesterday at 05:01:20 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

ceeac

Crashes when executing test test_way_planner_terraform_matches_executor

#7 grund_t::neuen_weg_bauen() at /home/ceeac/code/simu/simusvn/src/simutrans/ground/grund.cc:1,974
#8 way_builder_t::build_road() at /home/ceeac/code/simu/simusvn/src/simutrans/builder/wegbauer.cc:2,827
#9 way_builder_t::build() at /home/ceeac/code/simu/simusvn/src/simutrans/builder/wegbauer.cc:3,250
#10 tool_build_way_t::do_work() at /home/ceeac/code/simu/simusvn/src/simutrans/tool/simtool.cc:2,927
#11 two_click_tool_t::work() at /home/ceeac/code/simu/simusvn/src/simutrans/tool/simmenu.cc:1,419
#12 karte_t::call_work_api() at /home/ceeac/code/simu/simusvn/src/simutrans/world/simworld.cc:5,838
#13 script_api::param<script_api::call_tool_work>::push() at /home/ceeac/code/simu/simusvn/src/simutrans/script/api/api_command.cc:291
#14 script_api::call_std_function_t<script_api::call_tool_work(player_t*, koord3d, koord3d, way_desc_t const*, bool, bool)>::call_function_helper<0ul, 1ul, 2ul, 3ul, 4ul>() at /home/ceeac/code/simu/simusvn/src/simutrans/script/api_function.h:393
#15 script_api::call_std_function_t<script_api::call_tool_work(player_t*, koord3d, koord3d, way_desc_t const*, bool, bool)>::call_function() at /home/ceeac/code/simu/simusvn/src/simutrans/script/api_function.h:401
#16 script_api::embed_call_t<script_api::call_tool_work (*)(player_t*, koord3d, koord3d, way_desc_t const*, bool, bool)>::call_function() at /home/ceeac/code/simu/simusvn/src/simutrans/script/api_function.h:463
#17 command_build_way() at /home/ceeac/code/simu/simusvn/src/simutrans/script/api/api_command.cc:368
#18 SQVM::CallNative() at /home/ceeac/code/simu/simusvn/src/squirrel/squirrel/sqvm.cc:1,226
#19 SQVM::Execute() at /home/ceeac/code/simu/simusvn/src/squirrel/squirrel/sqvm.cc:788
#20 sq_wakeupvm() at /home/ceeac/code/simu/simusvn/src/squirrel/squirrel/sqapi.cc:1,242

victor_18993

This issue has now been fixed and integrated into the official trunk as r12169.
The problem was in the way-building terraforming validation: the validator could reason from the original position while the execution path had already mutated the tile height. There was also a retry path in
calc_route() that could return a route containing terraforming decisions before running the final slope validation.
Both cases are now covered by the same invariant: every route state returned by
calc_route() is validated against the position/state described by the caller before it can be built.
The final fix was validated from a fresh checkout of trunk:
  • Debug: 284/284
  • RelWithDebInfo: 284/284
  • Release: 284/284
  • targeted regression tests: 12/12
  • assertions: 0
  • FATAL: 0
  • no new Squirrel or engine errors attributable to the fix
Thanks to ceeac for reporting the original issue.
En la vida todo son vivencias y cada una de ellas nos hace mas grandes,¿Como de grande eres tu? :)