chrisboyle / sgtpuzzles

Android port of Simon Tatham's Puzzles
https://chris.boyle.name/puzzles
Other
603 stars 168 forks source link

[gtk] Segmentation Fault with assertion 'GTK_IS_WIDGET(widget)' failed #458

Closed scottfurry closed 5 years ago

scottfurry commented 5 years ago

I clean the repository and build from latest commit(git latest currently: d9e03f50daffc37027a5c57c88c7fd4241a58782). I run through the steps to generate the necessary makefiles (mkfiles.pl), export CFLAGS="-std=c11", and then make -F Makefile.gtk. No errors are encountered during these steps.

When I execute any game, I'm confronted with error message: (tracks:734): Gtk-CRITICAL **: 05:06:29.025: IA__gtk_widget_get_style: assertion 'GTK_IS_WIDGET (widget)' failed Segmentation fault

gcc version 8.2.1 20180831 (GCC)

gdb backtrace on any game points back at the same line, gtk.c:254. Backtrace (executing rect): `$ gdb rect GNU gdb (GDB) 8.2 ...gdb preamble - removed for clarity... (gdb) run Starting program: /home/user/STPPC-src/rect [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1".

(rect:409): Gtk-CRITICAL **: 04:55:05.269: IA__gtk_widget_get_style: assertion 'GTK_IS_WIDGET (widget)' failed

Program received signal SIGSEGV, Segmentation fault. 0x000055555555eecd in frontend_default_colour (fe=fe@entry=0x555555678800, output=output@entry=0x555555689450) at gtk.c:254 254 GdkColor col = gtk_widget_get_style(fe->window)->bg[GTK_STATE_NORMAL]; (gdb) bt

0 0x000055555555eecd in frontend_default_colour (fe=fe@entry=0x555555678800, output=output@entry=0x555555689450) at gtk.c:254

1 0x0000555555568852 in game_colours (fe=0x555555678800, ncolours=0x555555678874) at rect.c:2641

2 0x0000555555561c8e in midend_colours (me=0x555555672400, ncolours=0x555555678874) at midend.c:1196

3 0x000055555555a94a in snaffle_colours (fe=0x555555678800) at gtk.c:2578

4 0x000055555555a94a in new_window

(headless=<optimized out>, error=<synthetic pointer>, argtype=<optimized out>, arg=<optimized out>) at gtk.c:2578

5 0x000055555555a94a in main (argc=, argv=) at gtk.c:3356

(gdb) q $`

Error is consistent and had not occurred previously.

scottfurry commented 5 years ago

Something about backtrace text is not letting a code box be properly formatted.

scottfurry commented 5 years ago

I'm made a mistake. This is the android port not the project itself. Closing - not applicable here.