News:

Congratulations!
 You've won the News Item Lottery! Your prize? Reading this news item! :)

Graphics glitch with 2x1 buildings

Started by Oldie, March 19, 2025, 04:36:34 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Oldie

Not sure if this is a pak issue or a game issue.

oldie

prissi

Extended or standard? Multitile buildings in extended are more broken.

Otherwise it looks like a multitile building built over another multitile building. It seems the code checks in that area are lacking, and one suspicious assert is wrong too. Investigating.

Oldie


prissi

I did a complete overhaul of the logic and now it goes to multitile buildings and back again without glitches, it seems. Check r11670.

Flemmbrav


makie

#5
4-tile houses are now four times more likely to be demolished than 1-tile houses, and are usually replaced with single-tile houses.
Compared to the past, when 4-tile houses were never replaced with single-tile houses.

This has the effect of making 4-tile houses very rare.
-------------------------------------------------
Up until now I have had to underweight the 4 tiled houses so that they don't get too overwhelming.
In the future I had to overweight the four tiled houses so that they would stay standing.

This makes a new release of pak128.german necessary, for next release of Simutrans.

makie

#6
Apparently there are new bugs.
The program occasionally randomly crash.

and

The bridges on new generated maps sometimes has extrem high pillars.



-------------------------------------------------------------------------------------------------------------------
FATAL ERROR: crossing_t::crossing_t() - requested for waytypes 1 and 3 but nothing defined!
Aborting program execution ...


prissi

#7
QuoteFATAL ERROR: crossing_t::crossing_t() - requested for waytypes 1 and 3 but nothing defined!
Aborting program execution ...
When does this occur? Usually it should occur on load.

But I found an error when a check returned accidentally ok.

makie

Quote from: prissi on March 22, 2025, 03:30:52 AMWhen does this occur? Usually it should occur on load.
I generate a new map, and then run fast forward with a patch that let the citys grow.
Quote--- trunk/src/simutrans/world/simcity.cc   (Revision 11661)
+++ trunk/src/simutrans/world/simcity.cc   (Arbeitskopie)
@@ -1564,11 +1564,17 @@
       total += weight;
 
       // Compute the differentials.
-      sint64 const had = growthfactors.demand   - city_growth_factor_previous.demand;
-      sint64 const got = growthfactors.supplied - city_growth_factor_previous.supplied;
+//      sint64 const had = growthfactors.demand   - city_growth_factor_previous.demand;
+//      sint64 const got = growthfactors.supplied - city_growth_factor_previous.supplied;
       city_growth_factor_previous.demand   = growthfactors.demand;
       city_growth_factor_previous.supplied = growthfactors.supplied;
 
+      // für test immer voll versorgt
+      sint64 const had = 1;
+      sint64 const got = 1;
For testing citygrow of pak128.german

prissi

Even with r 11661? That should fix it.

makie

Quote from: prissi on March 22, 2025, 01:05:33 PMEven with r 11661? That should fix it.
no,

i have no time now for test 11661

makie

#11
In 11661 the bug with the bridges with extreme high pillars exists also.

QuoteFATAL ERROR: crossing_t::crossing_t() - requested for waytypes 1 and 3 but nothing defined!
Aborting program execution ...
That wasn't quite it.

prissi

THe crossing message is generated at a totally different position than the bridges. Well I have to dig further, with pk28, I could to reproduce the error. Now moving to pak128.german.

makie

#13
After 6 crashes i try to obtain more information
but after compilations with debug = 3
it doesn't happen again
so i have only:
QuoteProgram terminated with signal SIGSEGV, Segmentation fault.
#0  0x000000000082b6bd in stadt_t::step_passagiere() ()
[Current thread is 1 (Thread 0x7ff20a9cfd40 (LWP 9420))]
Function(s) ^std::(move|forward|as_const|(__)?addressof) will be skipped when stepping.
Function(s) ^std::(shared|unique)_ptr<.*>::(get|operator) will be skipped when stepping.
Function(s) ^std::(basic_string|vector|array|deque|(forward_)?list|(unordered_|flat_)?(multi)?(map|set)|span)<.*>::(c?r?(begin|end)|front|back|data|size|empty) will be skipped when stepping.
Function(s) ^std::(basic_string|vector|array|deque|span)<.*>::operator.] will be skipped when stepping.
(gdb) bt
#0  0x000000000082b6bd in stadt_t::step_passagiere() ()
#1  0x000000000082ccc8 in stadt_t::step(unsigned int) ()
#2  0x000000000084e384 in karte_t::step() ()
#3  0x000000000084f877 in karte_t::interactive(unsigned int) ()
#4  0x00000000007ad8dd in simu_main(int, char**) ()
#5  0x00000000007b65db in sysmain(int, char**) ()

----------------------------------------------------------
It seems that it make a difference if load a saved game or create a new map.

Had create a new map an then:
QuoteProgram terminated with signal SIGSEGV, Segmentation fault.
#0  stadt_t::recalc_city_size (this=0x45c98440) at src/simutrans/world/../descriptor/building_desc.h:252
#1  0x0000000000830520 in stadt_t::remove_gebaeude_from_stadt (this=<optimized out>, gb=<optimized out>) at src/simutrans/world/simcity.cc:616
#2  0x0000000000662ed4 in gebaeude_t::~gebaeude_t (this=0x4a07f610, __in_chrg=<optimized out>) at src/simutrans/obj/gebaeude.cc:127
#3  0x0000000000663029 in gebaeude_t::~gebaeude_t (this=0x4a07f610, __in_chrg=<optimized out>) at src/simutrans/obj/gebaeude.cc:143
#4  0x0000000000449029 in hausbauer_t::remove (player=0x0, gb=<optimized out>) at src/simutrans/builder/hausbauer.cc:392
#5  0x000000000083bfa9 in stadt_t::check_bau_townhall (this=this@entry=0x45c98440, new_town=new_town@entry=false, desc=<optimized out>, desc@entry=0x0, rotation=rotation@entry=-1)
    at src/simutrans/world/simcity.cc:2534
#6  0x0000000000841fbb in stadt_t::step_grow_city (new_town=false, this=0x45c98440) at src/simutrans/world/simcity.cc:1808
#7  stadt_t::step (this=this@entry=0x45c98440, delta_t=delta_t@entry=100) at src/simutrans/world/simcity.cc:1465
#8  0x00000000008638c4 in karte_t::step (this=0x42d4bf10) at src/simutrans/world/simworld.cc:3265
#9  0x0000000000864dd7 in karte_t::interactive (this=this@entry=0x42d4bf10, quit_month=quit_month@entry=2147483647) at src/simutrans/world/simworld.cc:6233

prissi

What I noticed is that the 3x2 townhall is in 50% of the time positioned on the road. Other, similar larger townhalls do not have this problem. I have somewhat fixed this, but there is still a high likelihood of a access of a building in the town list which had been deleted. I have hunted that bug the entire day without success.

makie

yes i have seen townhals build over the streets
--------------------------------------------------------------------------
another crash other, i think it is a combination of gebaeude show_info an debug
Quote#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007faeeec9b453 in __pthread_kill_internal (threadid=<optimized out>, signo=6) at pthread_kill.c:89
#2  0x00007faeeec41cb6 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007faeeec2938b in __GI_abort () at abort.c:73
#4  0x00007faeeec292d5 in __assert_fail_base (fmt=<optimized out>, assertion=<optimized out>, file=<optimized out>, line=103, function=<optimized out>) at assert.c:118
#5  0x000000000042ae45 in simrand (max=max@entry=4) at src/simutrans/utils/simrandom.cc:103
#6  0x0000000000835bdd in stadt_t::orient_city_building (k=..., h=h@entry=0x407dfec0, maxarea=maxarea@entry=...) at src/simutrans/world/simcity.cc:3015
#7  0x000000000066613b in gebaeude_t::info (this=0x59129000, buf=...) at src/simutrans/obj/gebaeude.cc:843
#8  0x00000000005f000a in obj_infowin_t::fill_buffer (this=0x7fae38016f60) at src/simutrans/gui/obj_info.cc:27
#9  obj_infowin_t::obj_infowin_t (this=this@entry=0x7fae38016f60, obj=obj@entry=0x59129000, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at src/simutrans/gui/obj_info.cc:18
#10 0x0000000000671011 in obj_t::show_info (this=0x59129000) at src/simutrans/obj/simobj.cc:152
#11 0x0000000000665d12 in gebaeude_t::show_info (this=0x59139170) at src/simutrans/obj/gebaeude.cc:675
#12 0x00000000007e89d2 in tool_query_t::work (this=<optimized out>, pos=...) at src/simutrans/tool/simtool.cc:422
#13 0x000000000085d23b in karte_t::call_work_api (this=0x544052a0, tool=tool@entry=0x38ca21e0, player=player@entry=0x53865fc0, pos=..., suspended=@0x7ffd6f2e1e67: false)
    at src/simutrans/world/simworld.cc:5788
#14 0x00000000007b6f88 in interaction_t::interactive_event (this=this@entry=0x53a9b380, ev=...) at src/simutrans/network/../world/simworld.h:1280
#15 0x00000000007b75ab in interaction_t::process_event (this=<optimized out>, ev=...) at src/simutrans/siminteraction.cc:360
#16 interaction_t::check_events (this=0x53a9b380) at src/simutrans/siminteraction.cc:400
#17 0x00000000008540be in karte_t::sync_step (this=0x544052a0, delta_t=delta_t@entry=18) at src/simutrans/world/simworld.cc:2676
#18 0x00000000007b799b in interrupt_check (caller_info=caller_info@entry=0x8ddca8 "src/simutrans/world/simworld.cc:6184") at src/simutrans/simintr.cc:114
#19 0x0000000000864c44 in karte_t::interactive (this=this@entry=0x544052a0, quit_month=quit_month@entry=2147483647) at src/simutrans/world/simworld.cc:6184
#20 0x00000000007c039f in simu_main (argc=argc@entry=2, argv=argv@entry=0x36a17cd0) at src/simutrans/simmain.cc:1695
#21 0x00000000007c92bb in sysmain (argc=2, argv=<optimized out>) at src/simutrans/sys/simsys.cc:1473
#22 0x00007faeeec2b12e in __libc_start_call_main (main=main@entry=0x433e30 <main(int, char**)>, argc=argc@entry=2, argv=argv@entry=0x7ffd6f2e4568) at ../sysdeps/nptl/libc_start_call_main.h:58
#23 0x00007faeeec2b1f9 in __libc_start_main_impl
    (main=0x433e30 <main(int, char**)>, argc=2, argv=0x7ffd6f2e4568, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd6f2e4558) at ../csu/libc-start.c:360
#24 0x0000000000433e65 in _start () at ../sysdeps/x86_64/start.S:115

ceeac

I got this when growing a city using the grow city tool:

/home/ceeac/code/simu/simusvn/src/simutrans/world/simcity.cc:673:18: runtime error: member call on address 0x619bb6d16f30 which does not point to an object of type 'gebaeude_t'
0x619bb6d16f30: note: object has invalid vptr
 00 00 00 00  16 6d bb 19 06 00 00 00  8c 53 15 26 69 5a 3a 1b  40 f7 e8 a6 9b 61 00 00  00 00 02 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              invalid vptr

However, I could not reproduce this a second time.

prissi

This is the problem, somehow a stale building remains in the list of all buildings of a city when the townhall is larger and moved (and is asymmetric) and not all of the time. But I did not find any place where the removal from that list could fail.

I t can be reproduced in more than 50% of the cases.

Create a map in pak128.german from 1980 and with a population of 30000. If not yet a 3x2 townhall, grow the city (I have edited menuconf.tab to grow in 1000 steps). Despite the easy reproduction, the actual error eluded me. I found several other errors though, like building on roads ...

prissi

I think I found that issue too (was an error when converting multitile buildings back to single tile). Now I have grown countless towns with and without rivers and all seems fine.

makie

Thank you, it works, it seems so.

I am now working on a new version of pak128.german suitable to this program-version.