Menu

#258 Label feature tends to crash

v0.9.29
closed
nobody
None
5
2022-09-28
2022-07-03
No

The label feature tends to crash. To reproduce, try creating a few labels and click on the ‘select label’ button. After a few clicks on the label or the canvas, Tux Paint usually crashes.

Discussion

  • William Kendrick

    • Group: v0.9.28 --> v0.9.29
     
  • Karl Ove Hufthammer

    The errror message on the console says:

    Segmentation fault (core dumped)

    and dmesg show lines like these:

    [Mon Jul 4 21:03:09 2022] tuxpaint[29871]: segfault at 2300000056 ip 00007f2ffc32cf86 sp 00007ffff14b6f70 error 4 in libSDL2-2.0.so.0.22.0[7f2ffc289000+10e000]
    [Mon Jul 4 21:03:09 2022] Code: 53 48 83 ec 48 64 48 8b 04 25 28 00 00 00 48 89 44 24 38 31 c0 48 85 ff 0f 84 56 01 00 00 48 89 d3 48 85 d2 0f 84 4a 01 00 00 <8b> 47 30 85 c0 0f 85 0f 01 00 00 49 89 cc 8b 4a 30 85 c9 0f 85 01
    [Mon Jul 4 21:06:19 2022] traps: tuxpaint[30088] general protection fault ip:7f2e9ba0bf86 sp:7ffc29233cb0 error:0 in libSDL2-2.0.so.0.22.0[7f2e9b968000+10e000]

     
  • William Kendrick

    Karl, can you by any chance reproduce the issue like so:
    1. launch tux paint
    2. create labels
    3. save
    4. click around until segfault
    5. re-launch tux paint
    6. open image
    7. click around, and get segfault again

    If so, can you share the saved file (from ~/.tuxpaint/saved/) so others can test & see if we can replicate the issue & track down the cause?

    You can also try building wit "DEBUG_FLAGS:=-g in Makefile, and DEBUG (and also VERBOSE) enabled in src/debug.h. (Do make clean && make.)

    Between Tux Paint's debug output while you interact, and/or running Tux Paint under a debugger (gdb tuxpaint, then run), you may be able to help pinpoint it yourself.

    A LOT has changed in the Label area recently. I assumed, based on your other recent bug reports, that you were using the in-development version from the Git repo, so tagged this as a v0.9.29 bug. If you're seeing the behavior in the last official release (0.9.28 from June 2022), please edit this ticket.

    Thanks!!!

     
  • Pere Pujal i Carabantes

    I could not reproduce with SDL1.2 nor SDL2, instead I could reproduce with libsdl1.2-compat:
    In Debian Sid install libsdl1.2-compat-dev, which will uninstall SDL1.2,then recompile current git.

    gdb tuxpaint
    run --startblank --nosound --nosysfonts
    select Labels, click on the screen , type a new label and hit [Enter]
    Click on the "edit label" button ->crash

    bt shows the following:

    ~~~Thread 1 "tuxpaint" received signal SIGSEGV, Segmentation fault.
    0x00007ffff5797716 in ?? () from /lib/x86_64-linux-gnu/libSDL2-2.0.so.0
    (gdb) bt
    Thread 1 "tuxpaint" received signal SIGSEGV, Segmentation fault.
    0x00007ffff5797716 in ?? () from /lib/x86_64-linux-gnu/libSDL2-2.0.so.0
    (gdb) bt
    #0 0x00007ffff5797716 in () at /lib/x86_64-linux-gnu/libSDL2-2.0.so.0
    #1 0x00007ffff7f6f137 in SDL_UpperBlit () at /lib/x86_64-linux-gnu/libSDL-1.2.so.0
    #2 0x000055555556290f in highlight_label_nodes () at /mnt/nvme0n1p1/pere/tuxpaint/gitautenticat/tuxpaint/tuxpaint.c:25017
    #3 0x000055555559c2fc in mainloop () at /mnt/nvme0n1p1/pere/tuxpaint/gitautenticat/tuxpaint/tuxpaint.c:4308
    #4 0x0000555555560a32 in main (argc=<optimized out="">, argv=<optimized out="">) at /mnt/nvme0n1p1/pere/tuxpaint/gitautenticat/tuxpaint/tuxpaint.c:28042
    #0 0x00007ffff5797716 in () at /lib/x86_64-linux-gnu/libSDL2-2.0.so.0
    #1 0x00007ffff7f6f137 in SDL_UpperBlit () at /lib/x86_64-linux-gnu/libSDL-1.2.so.0
    #2 0x000055555556290f in highlight_label_nodes () at /mnt/nvme0n1p1/pere/tuxpaint/gitautenticat/tuxpaint/tuxpaint.c:25017
    #3 0x000055555559c2fc in mainloop () at /mnt/nvme0n1p1/pere/tuxpaint/gitautenticat/tuxpaint/tuxpaint.c:4308
    #4 0x0000555555560a32 in main (argc=<optimized out="">, argv=<optimized out="">) at /mnt/nvme0n1p1/pere/tuxpaint/gitautenticat/tuxpaint/tuxpaint.c:28042
    ~~~</optimized></optimized></optimized></optimized>

    Valgrind output from the point where I click on the "edit labels" button is attached as it is too big

    HTH
    Pere

     
  • William Kendrick

    I cannot reproduce this because my system has both SDL1.2 and SDL2.0, and no "compat" library. When I build master, my Tux Paint looks like this:

    kendrick@gambit:~/tuxpaint/tuxpaint$ ldd ./tuxpaint|grep -i sdl
            libSDL-1.2.so.0 => /lib/x86_64-linux-gnu/libSDL-1.2.so.0 (0x00007fed56809000)
            libSDL_image-1.2.so.0 => /lib/x86_64-linux-gnu/libSDL_image-1.2.so.0 (0x00007fed567e8000)
            libSDL_ttf-2.0.so.0 => /lib/x86_64-linux-gnu/libSDL_ttf-2.0.so.0 (0x00007fed567df000)
            libSDL_gfx.so.15 => /lib/x86_64-linux-gnu/libSDL_gfx.so.15 (0x00007fed567c8000)
            libSDL_mixer-1.2.so.0 => /lib/x86_64-linux-gnu/libSDL_mixer-1.2.so.0 (0x00007fed5671d000)
            libSDL_Pango.so.1 => /lib/x86_64-linux-gnu/libSDL_Pango.so.1 (0x00007fed56716000)
            libSDL2-2.0.so.0 => /lib/x86_64-linux-gnu/libSDL2-2.0.so.0 (0x00007fed53e5e000)
    kendrick@gambit:~/tuxpaint/tuxpaint$ ./tuxpaint --verbose-version | grep -i SDL
      SDL version 1.2.15
    

    Since we're focusing on the SDL2.0 version of Tux Paint any more, do we feel it's worth keeping this ticket open, or close it as a "wontfix", since I feel like we're done maintaining the SDL1.2 version. (The 2.0 version already has new feature development happening in it, for the first time ever!)

     
  • William Kendrick

    • Priority: 1 --> 5
     
  • William Kendrick

    • status: open --> closed
     
  • William Kendrick

    Closing.

     

Log in to post a comment.