LINUX.ORG.RU

История изменений

Исправление Bad_ptr, (текущая версия) :

Сразу после запуска:


Program received signal SIGSEGV, Segmentation fault.
0x00007ffff793f095 in TTF_SizeUNICODE () from /usr/lib/libSDL_ttf-2.0.so.0
(gdb) bt full
#0 0x00007ffff793f095 in TTF_SizeUNICODE () from /usr/lib/libSDL_ttf-2.0.so.0
No symbol table info available.
#1 0x00007ffff793f48a in TTF_RenderUNICODE_Solid () from /usr/lib/libSDL_ttf-2.0.so.0
No symbol table info available.
#2 0x00007ffff793f902 in TTF_RenderText_Solid () from /usr/lib/libSDL_ttf-2.0.so.0
No symbol table info available.
#3 0x0000000000403ad5 in main () at main.cc:581
it2 = <error reading variable it2 (Cannot access memory at address 0x10)>
ns = 1
StatusString = «Count: 0 Ammo: 0 Objects: 1 Angry: 0», '\000' <repeats 955 times>
it =
screen = 0x641fc0
enemy_timer_id = 0x6a6310
event = {type = 0 '\000', active = {type = 0 '\000', gain = 96 '`', state = 96 '`'}, key = {type = 0 '\000',
which = 96 '`', state = 96 '`', keysym = {scancode = 0 '\000', sym = 4210142, mod = KMOD_NONE,
unicode = 31600}}, motion = {type = 0 '\000', which = 96 '`', state = 96 '`', x = 0, y = 0, xrel = 15838,
yrel = 64}, button = {type = 0 '\000', which = 96 '`', button = 96 '`', state = 0 '\000', x = 0, y = 0},
jaxis = {type = 0 '\000', which = 96 '`', axis = 96 '`', value = 0}, jball = {type = 0 '\000', which = 96 '`',
ball = 96 '`', xrel = 0, yrel = 0}, jhat = {type = 0 '\000', which = 96 '`', hat = 96 '`',
value = 0 '\000'}, jbutton = {type = 0 '\000', which = 96 '`', button = 96 '`', state = 0 '\000'}, resize = {
type = 0 '\000', w = 0, h = 4210142}, expose = {type = 0 '\000'}, quit = {type = 0 '\000'}, user = {
type = 0 '\000', code = 0, data1 = 0x403dde <__static_initialization_and_destruction_0(int, int)+59>,
data2 = 0x7ffff72c7b70}, syswm = {type = 0 '\000',
msg = 0x403dde <__static_initialization_and_destruction_0(int, int)+59>}}
font = 0x0
imgTxt = 0x2
txtRect = {x = 10, y = 405, w = 0, h = 0}
fColor = {r = 245 '\365', g = 245 '\365', b = 245 '\365', unused = 0 '\000'}
my_timer_id = 0x6a6340
Ага. font.ttf в папке нету

Исходная версия Bad_ptr, :

Сразу после запуска:


Program received signal SIGSEGV, Segmentation fault.
0x00007ffff793f095 in TTF_SizeUNICODE () from /usr/lib/libSDL_ttf-2.0.so.0
(gdb) bt full
#0 0x00007ffff793f095 in TTF_SizeUNICODE () from /usr/lib/libSDL_ttf-2.0.so.0
No symbol table info available.
#1 0x00007ffff793f48a in TTF_RenderUNICODE_Solid () from /usr/lib/libSDL_ttf-2.0.so.0
No symbol table info available.
#2 0x00007ffff793f902 in TTF_RenderText_Solid () from /usr/lib/libSDL_ttf-2.0.so.0
No symbol table info available.
#3 0x0000000000403ad5 in main () at main.cc:581
it2 = <error reading variable it2 (Cannot access memory at address 0x10)>
ns = 1
StatusString = «Count: 0 Ammo: 0 Objects: 1 Angry: 0», '\000' <repeats 955 times>
it =
screen = 0x641fc0
enemy_timer_id = 0x6a6310
event = {type = 0 '\000', active = {type = 0 '\000', gain = 96 '`', state = 96 '`'}, key = {type = 0 '\000',
which = 96 '`', state = 96 '`', keysym = {scancode = 0 '\000', sym = 4210142, mod = KMOD_NONE,
unicode = 31600}}, motion = {type = 0 '\000', which = 96 '`', state = 96 '`', x = 0, y = 0, xrel = 15838,
yrel = 64}, button = {type = 0 '\000', which = 96 '`', button = 96 '`', state = 0 '\000', x = 0, y = 0},
jaxis = {type = 0 '\000', which = 96 '`', axis = 96 '`', value = 0}, jball = {type = 0 '\000', which = 96 '`',
ball = 96 '`', xrel = 0, yrel = 0}, jhat = {type = 0 '\000', which = 96 '`', hat = 96 '`',
value = 0 '\000'}, jbutton = {type = 0 '\000', which = 96 '`', button = 96 '`', state = 0 '\000'}, resize = {
type = 0 '\000', w = 0, h = 4210142}, expose = {type = 0 '\000'}, quit = {type = 0 '\000'}, user = {
type = 0 '\000', code = 0, data1 = 0x403dde <__static_initialization_and_destruction_0(int, int)+59>,
data2 = 0x7ffff72c7b70}, syswm = {type = 0 '\000',
msg = 0x403dde <__static_initialization_and_destruction_0(int, int)+59>}}
font = 0x0
imgTxt = 0x2
txtRect = {x = 10, y = 405, w = 0, h = 0}
fColor = {r = 245 '\365', g = 245 '\365', b = 245 '\365', unused = 0 '\000'}
my_timer_id = 0x6a6340