Giter Site home page Giter Site logo

Crash in dialog about singularity HOT 11 OPEN

turalcar avatar turalcar commented on June 15, 2024
Crash in dialog

from singularity.

Comments (11)

turalcar avatar turalcar commented on June 15, 2024 1

Also, are you using a distribution installation of pygame + singularity? If so, which distribution and could you please check if they already have a bug in their bug tracker (for pygame) about this crash?

I didn't find anything to that effect on Gentoo tracker but rebuilt pygame just in case
Edit: didn't help

from singularity.

turalcar avatar turalcar commented on June 15, 2024

It's really not consistent at all. I just got a crash after:

  1. Start on very easy
  2. Spam Server Access on a continent
  3. Close dialog
  4. Crash:
    Singularity 1.00 (commit: 2ebc2f3)
    Running under Python 3.9.6 (default, Aug 7 2021, 20:40:43) [GCC 10.3.0]
    pygame 2.0.1 (SDL 2.0.14, Python 3.9.6)
    Hello from the pygame community. https://www.pygame.org/contribute.html
    The error-log configured as /home/vkuzkokov/.local/share/singularity/log/error.log (lazily created when something is logged)
    Fatal Python error: pygame_parachute: (pygame parachute) Segmentation Fault
    Python runtime state: initialized

Current thread 0x00007f04a3d20640 (most recent call first):

Thread 0x00007f04a6dae740 (most recent call first):
File "/usr/lib/python3.9/site-packages/singularity/code/graphics/dialog.py", line 230 in show
File "/usr/lib/python3.9/site-packages/singularity/code/screens/message.py", line 119 in show
File "/usr/lib/python3.9/site-packages/singularity/code/graphics/dialog.py", line 125 in call_dialog
File "/usr/lib/python3.9/site-packages/singularity/code/screens/message.py", line 44 in show_list
File "/usr/lib/python3.9/site-packages/singularity/code/screens/map.py", line 639 in on_tick
File "/usr/lib/python3.9/site-packages/singularity/code/graphics/dialog.py", line 405 in call_handlers
File "/usr/lib/python3.9/site-packages/singularity/code/graphics/dialog.py", line 390 in handle
File "/usr/lib/python3.9/site-packages/singularity/code/graphics/dialog.py", line 231 in show
File "/usr/lib/python3.9/site-packages/singularity/code/safety.py", line 64 in safe_call
File "/usr/lib/python3.9/site-packages/singularity/code/screens/map.py", line 580 in show
File "/usr/lib/python3.9/site-packages/singularity/code/graphics/dialog.py", line 125 in call_dialog
File "/usr/lib/python3.9/site-packages/singularity/code/screens/main_menu.py", line 104 in new_game
File "/usr/lib/python3.9/site-packages/singularity/code/graphics/button.py", line 247 in activated
File "/usr/lib/python3.9/site-packages/singularity/code/graphics/button.py", line 213 in activate_with_sound
File "/usr/lib/python3.9/site-packages/singularity/code/graphics/button.py", line 199 in handle_event
File "/usr/lib/python3.9/site-packages/singularity/code/graphics/dialog.py", line 405 in call_handlers
File "/usr/lib/python3.9/site-packages/singularity/code/graphics/dialog.py", line 390 in handle
File "/usr/lib/python3.9/site-packages/singularity/code/graphics/dialog.py", line 231 in show
File "/usr/lib/python3.9/site-packages/singularity/init.py", line 382 in main
File "/usr/bin/singularity", line 33 in
Aborted

from singularity.

nthykier avatar nthykier commented on June 15, 2024

Hi,

I am sorry to hear that you get a crash. Unfortunately, the crash happens in C code of pygame, which means there is a pygame bug (or a corrupt pygame build). Possibly there is also a bug in singularity.

from singularity.

nthykier avatar nthykier commented on June 15, 2024

Also, are you using a distribution installation of pygame + singularity? If so, which distribution and could you please check if they already have a bug in their bug tracker (for pygame) about this crash?

from singularity.

EinstokFair avatar EinstokFair commented on June 15, 2024

This too looks like #304
I propose to close this as a duplicate.

distribution maintainers are aware about how to write package metadata, no about specific settings of numpy or other application libraries for specific program. That is what applied developers should provide to maintainers of different distributions in a compilation guide. (Where is it, by the way?)

I have read the readme in this repository. That is not all information on how to package this application. I think that it is a wrong position to push that responsibility from appilcation developers to distribution maintainers.

from singularity.

EinstokFair avatar EinstokFair commented on June 15, 2024

mine dmesg contain lines
[3451059.629531] singularity[2537533]: segfault at 55b0b0e28 ip 00007f60538c645f sp 00007ffcdbb6b688 error 4 in libX11.so.6.4.0[7f6053891000+8c000]
[3451059.629549] Code: 00 00 00 00 31 f6 eb be e8 ce b6 fc ff 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 85 ff 74 13 48 83 7f 08 00 74 0c 48 8b 07 60 08 66 0f 1f 44 00 00 c3 0f 1f 80 00 00 00 00 48 83 7f 08 00

$ cat /proc/sys/kernel/core_pattern
|/lib/systemd/systemd-coredump %P %u %g %s %t %c %h

$ ls -1 /var/lib/systemd/coredump
core.singularity.1000.316097c4c3964844b8d7dc2e925f61ca.2400076.1630349438000000.zst
core.singularity.1000.316097c4c3964844b8d7dc2e925f61ca.2405600.1630351148000000.zst
core.singularity.1000.316097c4c3964844b8d7dc2e925f61ca.2410304.1630353612000000.zst
core.singularity.1000.316097c4c3964844b8d7dc2e925f61ca.2464061.1630370705000000.zst
core.singularity.1000.316097c4c3964844b8d7dc2e925f61ca.2464977.1630371054000000.zst
core.singularity.1000.316097c4c3964844b8d7dc2e925f61ca.2466002.1630371342000000.zst
core.singularity.1000.316097c4c3964844b8d7dc2e925f61ca.2467398.1630371665000000.zst
core.singularity.1000.316097c4c3964844b8d7dc2e925f61ca.2467512.1630373281000000.zst
core.singularity.1000.316097c4c3964844b8d7dc2e925f61ca.2474555.1630374335000000.zst
core.singularity.1000.316097c4c3964844b8d7dc2e925f61ca.2477288.1630378177000000.zst
core.singularity.1000.316097c4c3964844b8d7dc2e925f61ca.2485743.1630380070000000.zst
core.singularity.1000.316097c4c3964844b8d7dc2e925f61ca.2491315.1630380329000000.zst
core.singularity.1000.316097c4c3964844b8d7dc2e925f61ca.2493596.1630381030000000.zst
core.singularity.1000.316097c4c3964844b8d7dc2e925f61ca.2496345.1630381886000000.zst
core.singularity.1000.316097c4c3964844b8d7dc2e925f61ca.2496547.1630382304000000.zst
core.singularity.1000.316097c4c3964844b8d7dc2e925f61ca.2497674.1630382988000000.zst
core.singularity.1000.316097c4c3964844b8d7dc2e925f61ca.2499638.1630383281000000.zst
core.singularity.1000.316097c4c3964844b8d7dc2e925f61ca.2502834.1630384101000000.zst
core.singularity.1000.316097c4c3964844b8d7dc2e925f61ca.2502999.1630384189000000.zst
core.singularity.1000.316097c4c3964844b8d7dc2e925f61ca.2503246.1630384200000000.zst
core.singularity.1000.316097c4c3964844b8d7dc2e925f61ca.2503297.1630386164000000.zst
core.singularity.1000.316097c4c3964844b8d7dc2e925f61ca.2525660.1630394432000000.zst
core.singularity.1000.316097c4c3964844b8d7dc2e925f61ca.2533949.1630395333000000.zst
core.singularity.1000.316097c4c3964844b8d7dc2e925f61ca.2535277.1630395810000000.zst
core.singularity.1000.316097c4c3964844b8d7dc2e925f61ca.2537533.1630396402000000.zst
core.singularity.1000.316097c4c3964844b8d7dc2e925f61ca.2543659.1630399684000000.zst
core.singularity.1000.316097c4c3964844b8d7dc2e925f61ca.2740570.1630448123000000.zst

$ coredumpctl info
PID: 2740570 (singularity)
UID: 1000 (user)
GID: 1000 (user)
Signal: 6 (ABRT)
Timestamp: Wed 2021-09-01 01:15:23 MSK (25min ago)
Command Line: /usr/bin/python3.9 /usr/bin/singularity
Executable: /usr/bin/python3.9
Control Group: /user.slice/user-1000.slice/session-1.scope
Unit: session-1.scope
Slice: user-1000.slice
Session: 1
Owner UID: 1000 (user)
Boot ID: 316097c4c3964844b8d7dc2e925f61ca
Machine ID: 53393efbc533ed79b248f18a5e6ab0e4
Hostname: lacaille9352
Storage: /var/lib/systemd/coredump/core.singularity.1000.316097c4c3964844b8d7dc2e925f61ca.2740570.1630448123000000.zst (present)
Disk Size: 25.5M
Message: Process 2740570 (singularity) of user 1000 dumped core.

.zst is archive created with
https://github.com/facebook/zstd

unzstd /var/lib/systemd/coredump/core.singularity.1000.316097c4c3964844b8d7dc2e925f61ca.2740570.1630448123000000.zst

$ gdb -c core.singularity.1000.316097c4c3964844b8d7dc2e925f61ca.2740570.1630448123000000
GNU gdb (Gentoo 10.1 vanilla) 10.1
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
https://bugs.gentoo.org/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.

For help, type "help".
Type "apropos word" to search for commands related to "word".
[New LWP 2740571]
[New LWP 2740570]
Core was generated by `/usr/bin/python3.9 /usr/bin/singularity'.
Program terminated with signal SIGABRT, Aborted.
#0 0x00007f949541a891 in ?? ()
[Current thread is 1 (LWP 2740571)]
(gdb) backtrace full
#0 0x00007f949541a891 in ?? ()
No symbol table info available.
#1 0x000000000e017407 in ?? ()
No symbol table info available.
#2 0x0000000000000004 in ?? ()
No symbol table info available.
#3 0x0000000000000000 in ?? ()
No symbol table info available.

from singularity.

EinstokFair avatar EinstokFair commented on June 15, 2024

I also rebuilt pygame with -O0 -ggdb3 as was advised for debugging.
Moreover, I done full system rebuild (emerge -e singularity).
Didn't helped me either.

from singularity.

turalcar avatar turalcar commented on June 15, 2024

Running through GDB gave this trace:

#0 0x00007fce67236fcf in pgEvent_FillUserEvent () from /usr/lib/python3.9/site-packages/pygame/event.cpython-39-x86_64-linux-gnu.so
#1 0x00007fce6709ca0a in timer_callback () from /usr/lib/python3.9/site-packages/pygame/time.cpython-39-x86_64-linux-gnu.so
#2 0x00007fce679f3b52 in SDL_TimerThread () from /usr/lib64/libSDL2-2.0.so.0
#3 0x00007fce679f358f in SDL_RunThread () from /usr/lib64/libSDL2-2.0.so.0
#4 0x00007fce67a67409 in RunThread () from /usr/lib64/libSDL2-2.0.so.0
#5 0x00007fce68a5bd1e in start_thread () from /lib64/libpthread.so.0
#6 0x00007fce68b6b21f in clone () from /lib64/libc.so.6

from singularity.

EinstokFair avatar EinstokFair commented on June 15, 2024

/* This function can fill an SDL event from pygame event */
static int
pgEvent_FillUserEvent(pgEventObject *e, SDL_Event *event)
{
Py_INCREF(e->dict); /* in valgrind log */
...
return 0;
}

The Py_INCREF macros is from cpython project, something like

op->ob_refcnt++;

I don't understand what pgEventObject is used for, why it need dict field, why it is necessary to lock it when copying to SDL_Event, how we can be sure that e and e->dict are not null and have valid values.
I think that we need to find that "timer_callback" function, which makes call to pgEvent_FillUserEvent.

static Uint32
timer_callback(Uint32 interval, void *param)
{
    pgEventTimer *evtimer;
    evtimer = _pg_get_event_on_timer((pgEventObject *)param);

_pg_get_event_on_timer, pgEventTimer, pgEventObject

But where this timer is created in python code of the game? How timers (or events?) are tracked in overall (that list which it scans)? Which words to use to search related bugs in pygame issue tracker? (@illume may i call you here?)

from singularity.

turalcar avatar turalcar commented on June 15, 2024

FWIW, I found a setup that guarantees crash for me:
VERY EASY.zip
1a. Load save (or start on very easy and add 1000 server accesses anywhere)
2. set speed to max (hotkey "4")
3. press "continue" (hotkey "c") until crash (3 times on average).

from singularity.

EinstokFair avatar EinstokFair commented on June 15, 2024

I am asking developers of singularity to write an overview on how the game use timers (for what purposes and in which places).

from singularity.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.