News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

pak.ttd and pak48.Excentrique frequently crashes

Started by Donald C., June 12, 2021, 09:56:32 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Donald C.

Recently when I load these paksets, they crashes more frequently than the others for no obvious reason. What happened there?

ceeac

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.


==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

Yona-TYT

Quote from: ceeac on June 12, 2021, 12:12:56 PMbut 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.

prissi

The shores still use blending as well as some climate transitions. Also transparent trees, airplanes use blending, as well as some tools.

Roboron

A new version of pak48.Excentrique has been released precisely to address the crashes:

=> https://forum.simutrans.com/index.php/topic,21312.0.html

So far I've not experienced any more crashes, but I have also not tested it extensively. That's the reason a Release Candidate was made, to gather feedback about any bug still left.

Yona-TYT


Out of topic

I'm still glad when I see "pak.ttd" on the forum. I always wanted to see some continuation of work on the beautiful pak.ttd, too bad it was forgotten. :'(

prissi

The problem is that TTD had too few buildings, and cities looked very boring. Also only four trains. Also this was started before the originals graphics were redrawn ... So those new ones need to go in as well.

But apart from bridges and tunnels, and changes to the new landscape, it can be compiled. I see, there is no dat file for signals, only graphics. And no choose signal yet.

Andarix

Quote from: prissi on January 09, 2022, 12:20:17 PMThe problem is that TTD had too few buildings, and cities looked very boring. Also only four trains. Also this was started before the originals graphics were redrawn ... So those new ones need to go in as well.

...

city buildings
Industrial Buildings

The question is to what extent graphics for OpenTTD can be used for a Simutrans package set.

Since OpenTTD uses full graphics and Simutrans uses partial graphics, editing is unavoidable.


Yona-TYT

Are you thinking about recovering this project (pal.ttd)? That would be great!.

I really don't understand how people prefer to create a new graphics package instead of concentrating efforts on an existing project.

Andarix

#9
Quote from: Yona-TYT on January 13, 2024, 04:27:12 PMAre you thinking about recovering this project (pal.ttd)? That would be great!.
...

No, it's just about a screenshot and whether it even runs with current Simutrans versions. This also applies to other old pack sets. If you are able to run again with current versions, then maybe someone will do something for it again.

Most of the pack sets were also started before 2012. Those were different times back then.

Quote...
I really don't understand how people prefer to create a new graphics package instead of concentrating efforts on an existing project.

Well, it's the urge to have something of your own instead of joining others somewhere else.
In some cases, Paksets are also continued locally (country, region, community) but are not announced internationally.

The same thing has been observed on the Wiki for many years.

Instead of collecting knowledge/work in just a few places and making it easier for others to obtain and update information, much of it is distributed more eagerly. And then there's the fact that it can't be updated because no one has access to it anymore.

Over time there were probably around 20 subdomains of simutrans.com. Very few of them still work. And since the real links are not known, no one knows whether the content still exists.

prissi

#10
OpenTTD graphic could be easily converted to pak.TTD, we had even program converting the player colors. (That worked not with 32 bit images, but well with the standard 256 image in 64 bit size) No need to unpack the graphics as the came now with the sources of the new set.

Updated quick and dirty to new menu structure. Not much tested though.