The International Simutrans Forum

 

Author Topic: pak.ttd and pak48.Excentrique frequently crashes  (Read 263 times)

0 Members and 1 Guest are viewing this topic.

Offline Sandbox Player

  • *
  • Posts: 27
  • Languages: EN
pak.ttd and pak48.Excentrique frequently crashes
« on: June 12, 2021, 09:56:32 AM »
Recently when I load these paksets, they crashes more frequently than the others for no obvious reason. What happened there?

Offline ceeac

  • Devotee
  • *
  • Posts: 258
Re: pak.ttd and pak48.Excentrique frequently crashes
« Reply #1 on: June 12, 2021, 12:12:56 PM »
I can confirm the bug with pak48.Excentrique. This seems to be related to drawing rezoomed transparent images, but I think the latest release of pak48.Excentrique predates alpha transparency support (?). I can also reproduce the bug with r8630, so the bug is not caused by any recent changes.

Code: [Select]
==27459==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x617000041d1e at pc 0x00000072d424 bp 0x7ffedf4622b0 sp 0x7ffedf4622a8
READ of size 2 at 0x617000041d1e thread T0
    #0 0x72d423 in pix_alpha_16(unsigned short*, unsigned short const*, unsigned short const*, unsigned int, unsigned short, unsigned short) /home/ceeac/Projects/code/simutrans/display/simgraph16.cc:3611:26
    #1 0x721cf5 in display_img_alpha_wc(int, int, int, unsigned short const*, unsigned short const*, unsigned char, int, void (*)(unsigned short*, unsigned short const*, unsigned short const*, unsigned int, unsigned short, unsigned short)) /home/ceeac/Projects/code/simutrans/display/simgraph16.cc:3745:6
    #2 0x721a28 in display_rezoomed_img_alpha(unsigned int, unsigned int, unsigned int, int, int, signed char, unsigned int, bool, bool) /home/ceeac/Projects/code/simutrans/display/simgraph16.cc:3919:5
    #3 0x5c9bf1 in grund_t::display_boden(short, short, short) const /home/ceeac/Projects/code/simutrans/boden/grund.cc:1117:8
    #4 0x5cbb49 in grund_t::display_if_visible(short, short, short) /home/ceeac/Projects/code/simutrans/boden/grund.cc:1274:3
    #5 0x73cf33 in main_view_t::display_region(koord, koord, short, short, bool) /home/ceeac/Projects/code/simutrans/display/simview.cc:428:12
    #6 0x739c26 in main_view_t::display(bool) /home/ceeac/Projects/code/simutrans/display/simview.cc:267:2
    #7 0xfbbe5e in intr_refresh_display(bool) /home/ceeac/Projects/code/simutrans/simintr.cc:81:16
    #8 0x10e9f61 in karte_t::sync_step(unsigned int, bool, bool) /home/ceeac/Projects/code/simutrans/simworld.cc:3690:3
    #9 0xfbc031 in interrupt_check(char const*) /home/ceeac/Projects/code/simutrans/simintr.cc:114:17
    #10 0x111997a in karte_t::interactive(unsigned int) /home/ceeac/Projects/code/simutrans/simworld.cc:7305:5
    #11 0xfd9262 in simu_main(int, char**) /home/ceeac/Projects/code/simutrans/simmain.cc:1603:9
    #12 0x11f01b0 in sysmain(int, char**) /home/ceeac/Projects/code/simutrans/sys/simsys.cc:1125:9
    #13 0x1278971 in main /home/ceeac/Projects/code/simutrans/sys/simsys_s2.cc:824:9
    #14 0x7f66f14940b2 in __libc_start_main /build/glibc-YbNSs7/glibc-2.31/csu/../csu/libc-start.c:308:16
    #15 0x42847d in _start (/media/ceeac/Projects/code/simutrans/build/client/sim+0x42847d)

0x617000041d1e is located 4 bytes to the right of 666-byte region [0x617000041a80,0x617000041d1a)
allocated by thread T0 here:
    #0 0x4a36dd in malloc (/media/ceeac/Projects/code/simutrans/build/client/sim+0x4a36dd)
    #1 0xfdc9d4 in xmalloc(unsigned long) /home/ceeac/Projects/code/simutrans/simmem.cc:15:18
    #2 0x70e150 in rezoom_img(unsigned int) /home/ceeac/Projects/code/simutrans/display/simgraph16.cc:1878:27
    #3 0x721480 in display_rezoomed_img_alpha(unsigned int, unsigned int, unsigned int, int, int, signed char, unsigned int, bool, bool) /home/ceeac/Projects/code/simutrans/display/simgraph16.cc:3856:4
    #4 0x5c9bf1 in grund_t::display_boden(short, short, short) const /home/ceeac/Projects/code/simutrans/boden/grund.cc:1117:8
    #5 0x5cbb49 in grund_t::display_if_visible(short, short, short) /home/ceeac/Projects/code/simutrans/boden/grund.cc:1274:3
    #6 0x73cf33 in main_view_t::display_region(koord, koord, short, short, bool) /home/ceeac/Projects/code/simutrans/display/simview.cc:428:12
    #7 0x739c26 in main_view_t::display(bool) /home/ceeac/Projects/code/simutrans/display/simview.cc:267:2
    #8 0xfbbe5e in intr_refresh_display(bool) /home/ceeac/Projects/code/simutrans/simintr.cc:81:16
    #9 0x10e9f61 in karte_t::sync_step(unsigned int, bool, bool) /home/ceeac/Projects/code/simutrans/simworld.cc:3690:3
    #10 0xfbc031 in interrupt_check(char const*) /home/ceeac/Projects/code/simutrans/simintr.cc:114:17
    #11 0x111997a in karte_t::interactive(unsigned int) /home/ceeac/Projects/code/simutrans/simworld.cc:7305:5
    #12 0xfd9262 in simu_main(int, char**) /home/ceeac/Projects/code/simutrans/simmain.cc:1603:9
    #13 0x11f01b0 in sysmain(int, char**) /home/ceeac/Projects/code/simutrans/sys/simsys.cc:1125:9
    #14 0x1278971 in main /home/ceeac/Projects/code/simutrans/sys/simsys_s2.cc:824:9
    #15 0x7f66f14940b2 in __libc_start_main /build/glibc-YbNSs7/glibc-2.31/csu/../csu/libc-start.c:308:16

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1622
    • Simutrans-BLOG
  • Languages: ES
Re: pak.ttd and pak48.Excentrique frequently crashes
« Reply #2 on: June 12, 2021, 12:58:15 PM »
but I think the latest release of pak48.Excentrique predates alpha transparency support (?)
Right, the last time @hajo released a version of this alpha transparency was not supported.