dusteddk / sdl-ball Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
Smile, you are on flathub/flathub#3143 and of course invited to join.
Update Makefile.win and remember to do static compilation or whaterver so it does not need that dll file..
Have no idea what is going on. Without debugger it instant segfault. In gdb
I have black screen and the only way to get out is separate tty session. At lest tui in gdb works, but I'm lazy to dig right now, on the other hand is it obvious that an error comes from "/usr/lib64/dri/nouveau_dri.so" (yeah, not very helpful).
user $ make
c++ -c -Wall `sdl-config --cflags` -DDATADIR="\"themes/\"" -ggdb main.cpp -o main.o
c++ main.o -lGL -lGLU `sdl-config --libs` -lSDL_image -lSDL_ttf -lSDL_mixer -ggdb -o sdl-ball
#strip sdl-ball
user $ ./sdl-ball
SDL-Ball v 1.03
No config file found, using default settings.
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
Segmentation fault (core dumped)
user $ gdb ./sdl-ball
GNU gdb (Gentoo 10.2 vanilla) 10.2
Copyright (C) 2021 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"...
Reading symbols from ./sdl-ball...
(gdb) continue
The program is not being run.
(gdb) run
Starting program: /tmp/SDL-Ball_src/sdl-ball
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
SDL-Ball v 1.03
No config file found, using default settings.
[New Thread 0x7ffff68bf640 (LWP 2760296)]
[New Thread 0x7ffff182b640 (LWP 2760297)]
[Thread 0x7ffff182b640 (LWP 2760297) exited]
[New Thread 0x7ffff182b640 (LWP 2760302)]
[New Thread 0x7ffff26d8640 (LWP 2760303)]
[New Thread 0x7ffff102a640 (LWP 2760304)]
[New Thread 0x7ffff0829640 (LWP 2760305)]
[New Thread 0x7fffe7edf640 (LWP 2760306)]
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
Thread 1 "sdl-ball" received signal SIGSEGV, Segmentation fault.
0x00007ffff4b1f6e5 in ?? () from /usr/lib64/dri/nouveau_dri.so
Exception ignored in: <gdb._GdbOutputFile object at 0x7ff79be75ee0>
Traceback (most recent call last):
File "/usr/share/gdb/python/gdb/__init__.py", line 43, in flush
def flush(self):
KeyboardInterrupt:
It seems unintuitive to me that a positive powerup like grow paddle would cancel the Gun, one of the best powerups in the game.
Why was it made that way? Is it just to follow the original game's way, or was it a different decision?
This is obviously not a bug since it was deliberately added in main.cpp line 2322:
2319 case PO_GROWPADDLE:
2320 player.coins += 100;
2321 if(p.width < 0.4) p.grow(p.width+0.03);
2322 player.powerup[PO_GUN] = 0;
...
Since Ubuntu 20.04 sdl-ball crashes, I've tried compiling it directly from source, it still crashes in the same way.
I've run gdb on the core dump to check what was going on and this is the backtrace:
(gdb) backtrace
#0 0x00007f77fbc57885 in compile_vertex_list (ctx=ctx@entry=0x55a47f555940) at ../src/mesa/vbo/vbo_save_api.c:746
#1 0x00007f77fbc57e2b in wrap_buffers (ctx=0x55a47f555940) at ../src/mesa/vbo/vbo_save_api.c:868
#2 0x00007f77fbc5842c in upgrade_vertex (ctx=ctx@entry=0x55a47f555940, attr=attr@entry=7, newsz=newsz@entry=2) at ../src/mesa/vbo/vbo_save_api.c:975
#3 0x00007f77fbc586b9 in fixup_vertex (newType=5126, sz=2, attr=7, ctx=0x55a47f555940) at ../src/mesa/vbo/vbo_save_api.c:1079
#4 _save_TexCoord2f (x=0, y=0) at ../src/mesa/vbo/vbo_attrib_tmp.h:268
#5 0x000055a47f2a7d5a in mkDLscene (dl=0x7ffcc50eba9c, tex=...) at main.cpp:2939
#6 0x000055a47f29de3a in main (argc=<optimized out>, argv=<optimized out>) at main.cpp:4056
I've also filed a bug here: https://bugs.launchpad.net/ubuntu/+source/sdl-ball/+bug/1956251
I'm not sure if #9 is the same issue (could be) but this one is on intel.
Ubuntu version is still 1.02 but it crashes on 1.04 as well
It looks to me the issue could be common to both of them (mesa code).
there's already 1.03 on sf.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.