News:

Use the "Forum Search"
It may help you to find anything in the forum ;).

bug when trying to load a scenario in server mode

Started by Yona-TYT, Yesterday at 03:21:22 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yona-TYT

Pesqué un bicho!.

Edit. 
Correction: It fails with any save game.

r12289

There's a bug when trying to load a scenario and checking the box to start as a server.

gdb:

[New Thread 0x7fff6affd6c0 (LWP 91651)]
connect: Connection timed out
connect: Connection timed out
free(): invalid pointer

Thread 1 "simutrans" received signal SIGABRT, Aborted.
Downloading 4.48 K source file /usr/src/debug/glibc-2.43-8.fc44.x86_64/nptl/pthread_kill.c
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44                            
44          return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;
(gdb) where
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007ffff764ed93 in __pthread_kill_internal (threadid=<optimized out>, signo=6) at pthread_kill.c:89
#2  0x00007ffff75f3e8e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007ffff75db7b3 in __GI_abort () at abort.c:77
#4  0x00007ffff75dc804 in __libc_message_impl (vma_name=vma_name@entry=0x7ffff778deb1 "glibc: fatal", fmt=fmt@entry=0x7ffff77914bf "%s\n")
    at ../sysdeps/posix/libc_fatal.c:138
#5  0x00007ffff765908c in __libc_message_wrapper (vmaname=0x7ffff778deb1 "glibc: fatal", fmt=0x7ffff77914bf "%s\n") at ../include/stdio.h:203
#6  malloc_printerr (str=<optimized out>) at malloc.c:5341
#7  0x00007ffff76590a4 in malloc_printerr_tail (str=<optimized out>) at malloc.c:5358
#8  0x00007ffff7ece25d in FreeUPNPUrls () from /home/yonatan/Games/simutrans-nigth/lib/libminiupnpc.so.17
#9  0x00005555558634f6 in prepare_for_server(char*, char*, int) ()
#10 0x0000555555aa748f in karte_t::switch_server(bool, bool) ()
#11 0x0000555555a23292 in tool_load_scenario_t::init(player_t*) ()
#12 0x00005555558655d3 in nwc_tool_t::do_command(karte_t*) ()
#13 0x0000555555aaf0e4 in karte_t::interactive(unsigned int) ()
#14 0x00005555559fe076 in simu_main(int, char**) ()
#15 0x0000555555a080a0 in sysmain(int, char**) ()
#16 0x00007ffff75dd681 in __libc_start_call_main (main=main@entry=0x55555564c8f0 <main>, argc=argc@entry=1, argv=argv@entry=0x7fffffffdda8)
    at ../sysdeps/nptl/libc_start_call_main.h:59
#17 0x00007ffff75dd798 in __libc_start_main_impl (main=0x55555564c8f0 <main>, argc=1, argv=0x7fffffffdda8, init=<optimized out>,
    fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdd98) at ../csu/libc-start.c:360
#18 0x000055555564c9f5 in _start ()
(gdb)


makie

Loading any old save file from server games involving a scenario fails. The save format appears to have changed.

For example all server games provided from here:
https://pak128-german.de/inc/savegames.html

victor_18993

I'll take a look and let you know as soon as I have it.
En la vida todo son vivencias y cada una de ellas nos hace mas grandes,¿Como de grande eres tu? :)

prissi

r12992 should fix this. (Rules were for all, not for each player since 124.3)

makie

It's great that loading old server save files is working again.

Yona-TYT

Linux Fedora

In r12296, the problem keeps appearing.
[Thread 0x7fff4b7ff6c0 (LWP 98355) exited]
connect: Connection timed out
connect: Connection timed out
free(): invalid pointer

Thread 1 "simutrans" received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
44       return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;
(gdb) where
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007ffff764ed93 in __pthread_kill_internal (threadid=<optimized out>, signo=6) at pthread_kill.c:89
#2  0x00007ffff75f3e8e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007ffff75db7b3 in __GI_abort () at abort.c:77
#4  0x00007ffff75dc804 in __libc_message_impl (vma_name=vma_name@entry=0x7ffff778deb1 "glibc: fatal", fmt=fmt@entry=0x7ffff77914bf "%s\n")
    at ../sysdeps/posix/libc_fatal.c:138
#5  0x00007ffff765908c in __libc_message_wrapper (vmaname=0x7ffff778deb1 "glibc: fatal", fmt=0x7ffff77914bf "%s\n") at ../include/stdio.h:203
#6  malloc_printerr (str=<optimized out>) at malloc.c:5341
#7  0x00007ffff76590a4 in malloc_printerr_tail (str=<optimized out>) at malloc.c:5358
#8  0x00007ffff7ece25d in FreeUPNPUrls () from /home/yonatan/Games/simutrans-nigth/lib/libminiupnpc.so.17
#9  0x0000555555863a06 in prepare_for_server(char*, char*, int) ()
#10 0x0000555555aa79ff in karte_t::switch_server(bool, bool) ()
#11 0x0000555555a22afd in tool_work_world_t::init(player_t*) ()
#12 0x0000555555865ae3 in nwc_tool_t::do_command(karte_t*) ()
#13 0x0000555555aaf654 in karte_t::interactive(unsigned int) ()
#14 0x00005555559fe586 in simu_main(int, char**) ()
#15 0x0000555555a085b0 in sysmain(int, char**) ()
#16 0x00007ffff75dd681 in __libc_start_call_main (main=main@entry=0x55555564c890 <main>, argc=argc@entry=1, argv=argv@entry=0x7fffffffddc8)
    at ../sysdeps/nptl/libc_start_call_main.h:59
#17 0x00007ffff75dd798 in __libc_start_main_impl (main=0x55555564c890 <main>, argc=1, argv=0x7fffffffddc8, init=<optimized out>,
    fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffddb8) at ../csu/libc-start.c:360
#18 0x000055555564c995 in _start ()
(gdb)

makie

I can load maps as server (checking the box to start as a server)
and i can start scenaro as server.

Only tutorial as server crash. That doesn't make any sense either.

Yona´s Crash seems to me is in libminiupnpc.so.17

libminiupnpc i don't like because it make often trouble.
Maybe it works for me because i compile myself and disable upnp (USE_UPNP := 0)

prissi

Yes, it is the culprit. Nice to change the API every version or how to make legal calls (up to recently) suddenly illegal if there are empty lists. Really lazy programmers there.

Fixed in r12998