News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

assertion failure in simfab.cc

Started by THLeaderH, December 05, 2020, 06:18:22 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

THLeaderH

In a network game I am playing, the game crashes when I clicked some factories. The game uses stable 122.0 r9281 and pak.nippon (64 sized japanese pakset) + addons. I took a backtrace and got the following logs.


Assertion failed: (lieferziele.is_contained(k)), function is_active_lieferziel, file simfab.cc, line 1773.
Process 19478 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = hit program assert
    frame #4: 0x00000001003acbf3 sim`fabrik_t::is_active_lieferziel(koord) const (.cold.1) at simfab.cc:1773:2 [opt]
   1770
   1771 bool fabrik_t::is_active_lieferziel( koord k ) const
   1772 {
-> 1773 assert( lieferziele.is_contained(k) );
   1774 return 0 < ( ( 1 << lieferziele.index_of(k) ) & lieferziele_active_last_month );
   1775 }
   1776
Target 0: (sim) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
  * frame #0: 0x00000001002aa7dc sim`fabrik_t::is_active_lieferziel(this=0x00000001412b6c00, k=<unavailable>) const at simfab.cc:1773:2 [opt]
    frame #1: 0x00000001000f10ce sim`virtual thunk to gui_factory_connection_t::draw(scr_coord) at fabrik_info.cc:41:17 [opt]
    frame #2: 0x00000001000f10a1 sim`virtual thunk to gui_factory_connection_t::draw(scr_coord) [inlined] gui_factory_connection_t::draw(this=0x000000014db229f0, offset=<unavailable>) at fabrik_info.cc:69 [opt]
    frame #3: 0x00000001000f109c sim`virtual thunk to gui_factory_connection_t::draw(scr_coord) at fabrik_info.cc:0 [opt]
    frame #4: 0x00000001000b527f sim`gui_container_t::draw(this=<unavailable>, offset=<unavailable>) at gui_container.cc:281:7 [opt]
    frame #5: 0x00000001000b527f sim`gui_container_t::draw(this=<unavailable>, offset=<unavailable>) at gui_container.cc:281:7 [opt]
    frame #6: 0x00000001000bff55 sim`gui_scrollpane_t::draw(this=0x0000000147a13828, pos=<unavailable>) at gui_scrollpane.cc:265:9 [opt]
    frame #7: 0x00000001000c15a5 sim`gui_tab_panel_t::draw(this=0x0000000147a132f8, parent_pos=<unavailable>) at gui_tab_panel.cc:183:20 [opt]
    frame #8: 0x00000001000b527f sim`gui_container_t::draw(this=<unavailable>, offset=<unavailable>) at gui_container.cc:281:7 [opt]
    frame #9: 0x00000001000fb7f5 sim`gui_frame_t::draw(this=<unavailable>, pos=<unavailable>, size=<unavailable>) at gui_frame.cc:182:27 [opt]
    frame #10: 0x00000001000f00eb sim`fabrik_info_t::draw(this=0x0000000147a12c00, pos=(x = 646, y = 32), size=(w = 420, h = 457)) at fabrik_info.cc:239:15 [opt]
    frame #11: 0x000000010017fa96 sim`display_all_win() [inlined] display_win(win=<unavailable>) at simwin.cc:1020:9 [opt]


Please note that this crash happens with only a few factories. Informations of most factories can be seen with a clicking. The crash always happens with the specific factories.

Dwachs

I can reproduce it the following way: roll up factory window, then edit change factory connections, remove one consumer, add new consumer, then roll down window. But I suspect that is not the case in your report.

Edit: removed the assertion in r9476. This cures the symptom but I am not so sure about the cause.
Parsley, sage, rosemary, and maggikraut.

THLeaderH

I think the assertion should be replaced with dbg->error() rather than just being ignored.

Dwachs

This function is only used for gui purposes.

Can you upload a savegame, where this bug can be reproduced?
Parsley, sage, rosemary, and maggikraut.

THLeaderH

Sorry, the submission of the save data is not allowed by the game manager.

QuoteThis function is only used for gui purposes.
OK, I understand.

Dwachs

Still it would be interesting to know how this assertion was triggered at all.
Parsley, sage, rosemary, and maggikraut.