Develop

Ticket #1519 (closed defect: fixed)

Opened 19 months ago

Last modified 19 months ago

Segfault when closing font dialog

Reported by: xtophe Owned by:
Priority: normal Milestone: XCSoar 6.3
Component: Configuration Version: 6.3
Keywords: Cc:

Description

To reproduce:
Open the Setup System /Look/ Language, Input/Fonts?
Change Custom fonts from on to off or vice-versa
Press Close

Segfault

(gdb) bt
#0  0xb7ea83c4 in TTF_FontLineSkip () from /usr/lib/libSDL_ttf-2.0.so.0
#1  0x0814dd59 in Font::GetLineSpacing (this=0x839d1bc)
    at ./src/Screen/Font.hpp:153
#2  0x0814d8eb in Canvas::formatted_text (this=0xbfffea48, rc=0xbfffea00, 
    text=0x9348470 "Gauges", format=15) at src/Screen/SDL/Canvas.cpp:260
#3  0x0813e6c1 in WndFrame::on_paint (this=0x9348438, canvas=...)
    at src/Form/Frame.cpp:91
#4  0x0814aee9 in ContainerWindow::on_paint (this=0x9344c14, canvas=...)
    at src/Screen/SDL/ContainerWindow.cpp:326
#5  0x0813b8d4 in WndForm::ClientAreaWindow::on_paint (this=0x9344c14, 
    canvas=...) at src/Form/Form.cpp:78
#6  0x0814aee9 in ContainerWindow::on_paint (this=0x9344b88, canvas=...)
    at src/Screen/SDL/ContainerWindow.cpp:326
#7  0x0813c5b5 in WndForm::on_paint (this=0x9344b88, canvas=...)
    at src/Form/Form.cpp:521
#8  0x0814aee9 in ContainerWindow::on_paint (this=0x8393bc0, canvas=...)
    at src/Screen/SDL/ContainerWindow.cpp:326
#9  0x0814d0bc in TopWindow::expose (this=0x8393bc0)
    at src/Screen/SDL/TopWindow.cpp:114
#10 0x0814d12b in TopWindow::refresh (this=0x8393bc0)
    at src/Screen/SDL/TopWindow.cpp:162
#11 0x0813c1fd in WndForm::ShowModal (this=0xbfffed84) at src/Form/Form.cpp:406
---Type <return> to continue, or q <return> to quit---q
Quit
(gdb) frame 1
#1  0x0814dd59 in Font::GetLineSpacing (this=0x839d1bc)
    at ./src/Screen/Font.hpp:153
153	    return ::TTF_FontLineSkip(font);
(gdb) print font
$3 = (TTF_Font *) 0x0
(gdb) frame 2
#2  0x0814d8eb in Canvas::formatted_text (this=0xbfffea48, rc=0xbfffea00, 
    text=0x9348470 "Gauges", format=15) at src/Screen/SDL/Canvas.cpp:260
260	  UPixelScalar skip = font->GetLineSpacing();
(gdb) print font
$4 = (const Font *) 0x839d1bc

So it looks like font->font is not initialised.

Change History

comment:1 Changed 19 months ago by max

  • Status changed from new to closed
  • Resolution set to fixed

1f6e68c951b8f644690765e1dc1d142b579b07ef

Note: See TracTickets for help on using tickets.