Bug#381456: adonthell segfault on AMD-32

2006-08-09 Thread Julien Danjou
tags 381456 confirmed
thanks

Hello,

It can reproduce it too. Here is a backtrace:

#0  0x0806a4e5 in image::image ()
#1  0x080d7c8d in win_ttf::operator[] ()
#2  0x080d45f5 in label::build_form_auto_size ()
#3  0x080d4d1c in label::build ()
#4  0x080a7aa5 in get_py_obj ()
#5  0xa79fd79d in PyCFunction_Call () from /usr/lib/libpython2.3.so.1.0
#6  0xa79d1b77 in PyObject_Call () from /usr/lib/libpython2.3.so.1.0
#7  0xa7a33183 in PyEval_InitThreads () from
/usr/lib/libpython2.3.so.1.0
#8  0xa7a35518 in PyEval_EvalCodeEx () from /usr/lib/libpython2.3.so.1.0
#9  0xa7a34a90 in PyEval_InitThreads () from
/usr/lib/libpython2.3.so.1.0
#10 0xa7a35518 in PyEval_EvalCodeEx () from /usr/lib/libpython2.3.so.1.0
#11 0xa79eb850 in PyClassMethod_New () from /usr/lib/libpython2.3.so.1.0
#12 0xa79d1b77 in PyObject_Call () from /usr/lib/libpython2.3.so.1.0
#13 0xa79d83e2 in PyClass_IsSubclass () from
/usr/lib/libpython2.3.so.1.0
#14 0xa79d1b77 in PyObject_Call () from /usr/lib/libpython2.3.so.1.0
#15 0xa7a0d90e in _PyType_Lookup () from /usr/lib/libpython2.3.so.1.0
#16 0xa7a0c8a5 in PyType_IsSubtype () from /usr/lib/libpython2.3.so.1.0
#17 0xa79d1b77 in PyObject_Call () from /usr/lib/libpython2.3.so.1.0
#18 0xa7a319e2 in PyEval_InitThreads () from
/usr/lib/libpython2.3.so.1.0
#19 0xa7a34ba1 in PyEval_InitThreads () from
/usr/lib/libpython2.3.so.1.0
#20 0xa7a34ba1 in PyEval_InitThreads () from
/usr/lib/libpython2.3.so.1.0
#21 0xa7a35518 in PyEval_EvalCodeEx () from /usr/lib/libpython2.3.so.1.0
#22 0xa79eb850 in PyClassMethod_New () from /usr/lib/libpython2.3.so.1.0
#23 0xa79d1b77 in PyObject_Call () from /usr/lib/libpython2.3.so.1.0
#24 0xa79d83e2 in PyClass_IsSubclass () from
/usr/lib/libpython2.3.so.1.0
#25 0xa79d1b77 in PyObject_Call () from /usr/lib/libpython2.3.so.1.0
#26 0xa7a2f21f in PyEval_CallObjectWithKeywords () from
/usr/lib/libpython2.3.so.1.0
#27 0xa79d1dba in PyObject_CallObject () from
/usr/lib/libpython2.3.so.1.0
#28 0x0807b576 in py_callback::make_call ()
#29 0x0807b65f in py_callback::callback_func0 ()
#30 0x080bfa12 in win_base::draw ()
#31 0x080c17d4 in win_container::draw ()
#32 0x080c300b in win_manager::draw ()
#33 0x08062665 in adonthell::main_loop ()
#34 0x08062790 in adonthell::main ()
#35 0x080a9851 in get_py_obj ()
#36 0xa79fd79d in PyCFunction_Call () from /usr/lib/libpython2.3.so.1.0
#37 0xa79d1b77 in PyObject_Call () from /usr/lib/libpython2.3.so.1.0
#38 0xa7a33183 in PyEval_InitThreads () from
/usr/lib/libpython2.3.so.1.0
#39 0xa7a35518 in PyEval_EvalCodeEx () from /usr/lib/libpython2.3.so.1.0
#40 0xa7a34a90 in PyEval_InitThreads () from
/usr/lib/libpython2.3.so.1.0
#41 0xa7a35518 in PyEval_EvalCodeEx () from /usr/lib/libpython2.3.so.1.0
#42 0xa79eb850 in PyClassMethod_New () from /usr/lib/libpython2.3.so.1.0
#43 0xa79d1b77 in PyObject_Call () from /usr/lib/libpython2.3.so.1.0
#44 0xa79d83e2 in PyClass_IsSubclass () from
/usr/lib/libpython2.3.so.1.0
#45 0xa79d1b77 in PyObject_Call () from /usr/lib/libpython2.3.so.1.0
#46 0xa7a2f21f in PyEval_CallObjectWithKeywords () from
/usr/lib/libpython2.3.so.1.0
#47 0xa79dbf0d in PyInstance_New () from /usr/lib/libpython2.3.so.1.0
#48 0xa79d1b77 in PyObject_Call () from /usr/lib/libpython2.3.so.1.0
#49 0xa7a319e2 in PyEval_InitThreads () from
/usr/lib/libpython2.3.so.1.0
#50 0xa7a35518 in PyEval_EvalCodeEx () from /usr/lib/libpython2.3.so.1.0
#51 0xa7a355b5 in PyEval_EvalCode () from /usr/lib/libpython2.3.so.1.0
#52 0xa7a4c5eb in PyImport_ExecCodeModuleEx () from
/usr/lib/libpython2.3.so.1.0
#53 0xa7a4c7a1 in PyImport_ExecCodeModuleEx () from
/usr/lib/libpython2.3.so.1.0
#54 0xa7a4ea90 in PyImport_ReloadModule () from
/usr/lib/libpython2.3.so.1.0
#55 0xa7a4ef3f in PyImport_ReloadModule () from
/usr/lib/libpython2.3.so.1.0
#56 0xa7a4f127 in PyImport_ImportModuleEx () from
/usr/lib/libpython2.3.so.1.0
#57 0xa7a2ba7e in _PyBuiltin_Init () from /usr/lib/libpython2.3.so.1.0
#58 0xa79fd79d in PyCFunction_Call () from /usr/lib/libpython2.3.so.1.0
#59 0xa79d1b77 in PyObject_Call () from /usr/lib/libpython2.3.so.1.0
#60 0xa79d3d46 in PyObject_CallFunction () from
/usr/lib/libpython2.3.so.1.0
#61 0xa7a4f57b in PyImport_Import () from /usr/lib/libpython2.3.so.1.0
#62 0xa7a4f765 in PyImport_ImportModule () from
/usr/lib/libpython2.3.so.1.0
#63 0x0807ba54 in python::import_module ()
#64 0x0807bd09 in python::exec_file ()
#65 0x080616bf in main ()



Cheers,
-- 
Julien Danjou
.''`.  Debian Developer
: :' : http://julien.danjou.info
`. `'  http://people.debian.org/~acid
  `-   9A0D 5FD9 EB42 22F6 8974  C95C A462 B51E C2FE E5CD


signature.asc
Description: Digital signature


Bug#381456: adonthell segfault on AMD-32

2006-08-09 Thread Julien Danjou
On Wed, Aug 09, 2006 at 10:42:02AM +0200, Julien Danjou wrote:
 Hello,
 
 It can reproduce it too. Here is a backtrace:

Recompiled with DEB_BUILD_OPTIONS=debug nostrip

Better backtrace:

(gdb) run
Starting program: /usr/games/adonthell wastesedge
[Thread debugging using libthread_db enabled]
[New Thread -1486412096 (LWP 4019)]
[New Thread -1487901776 (LWP 4022)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1486412096 (LWP 4019)]
image (this=0xafe32f14, s=0x0, [EMAIL PROTECTED]) at drawable.h:127
127 length_ = l; 
(gdb) bt full
#0  image (this=0xafe32f14, s=0x0, [EMAIL PROTECTED]) at drawable.h:127
No locals.
#1  0x080d7c8d in win_ttf::operator[] (this=0x81d1e40, glyph=32) at 
win_ttf.cc:140
s = value optimized out
tmp = {surface = {drawable = {_vptr.drawable = 0x80daa58, length_ = 
3, 
  height_ = 13}, vis = 0x82023c8, changed = false, dbl_mode = false, static 
srcrect = {
  x = 0, y = 0, w = 6, h = 26}, static dstrect = {x = 0, y = 0, w = 6, h = 
24}, 
mask_on = false, alpha_ = 255 'ÿ', not_screen = true}, No data fields}
shadow = {surface = {drawable = {_vptr.drawable = 0x80daa58, 
length_ = 0, 
  height_ = 0}, vis = 0x0, changed = false, dbl_mode = false, static 
srcrect = {x = 0, 
  y = 0, w = 6, h = 26}, static dstrect = {x = 0, y = 0, w = 6, h = 24}, 
mask_on = false, alpha_ = 255 'ÿ', not_screen = true}, No data fields}
glph = value optimized out
white = {r = 255 'ÿ', g = 255 'ÿ', b = 255 'ÿ', unused = 0 '\0'}
bg = {r = 0 '\0', g = 0 '\0', b = 0 '\0', unused = 0 '\0'}
unichar = {32, 0}
#2  0x080d45f5 in label::build_form_auto_size (this=0x820236c) at label.cc:371
line_tmp = {idx_beg = 0, idx_end = -22661, pos_x = 6}
i = 2
max_length = 0
#3  0x080d4d1c in label::build (this=0x820236c, erase_all=true) at label.cc:176
No locals.
#4  0x080a7aa5 in _wrap_label_set_text (args=0xa6cae44c) at 
py_adonthell_wrap.cc:23157
ptr = (string *) 0x81fd4e8
res = 136303864
resultobj = (PyObject *) 0x80ed058
arg1 = (class label *) 0x820236c
arg2 = {static npos = 4294967295, 
  _M_dataplus = {std::allocatorchar = {__gnu_cxx::new_allocatorchar = 
{No data fields}, No data fields}, _M_p = 0x81fd504 -- Waste's Edge --}}
obj0 = (PyObject *) 0xa69cd6ec
obj1 = (PyObject *) 0xa6cac9b0
#5  0xa79ab79d in PyCFunction_Call () from /usr/lib/libpython2.3.so.1.0
No symbol table info available.
#6  0xa797fb77 in PyObject_Call () from /usr/lib/libpython2.3.so.1.0
No symbol table info available.
#7  0xa79e1183 in PyEval_InitThreads () from /usr/lib/libpython2.3.so.1.0
No symbol table info available.
#8  0xa79e3518 in PyEval_EvalCodeEx () from /usr/lib/libpython2.3.so.1.0
No symbol table info available.
#9  0xa79e2a90 in PyEval_InitThreads () from /usr/lib/libpython2.3.so.1.0
No symbol table info available.
#10 0xa79e3518 in PyEval_EvalCodeEx () from /usr/lib/libpython2.3.so.1.0
No symbol table info available.
#11 0xa7999850 in PyClassMethod_New () from /usr/lib/libpython2.3.so.1.0
No symbol table info available.
#12 0xa797fb77 in PyObject_Call () from /usr/lib/libpython2.3.so.1.0
No symbol table info available.
#13 0xa79863e2 in PyClass_IsSubclass () from /usr/lib/libpython2.3.so.1.0
No symbol table info available.
#14 0xa797fb77 in PyObject_Call () from /usr/lib/libpython2.3.so.1.0
No symbol table info available.
#15 0xa79bb90e in _PyType_Lookup () from /usr/lib/libpython2.3.so.1.0
No symbol table info available.
#16 0xa79ba8a5 in PyType_IsSubtype () from /usr/lib/libpython2.3.so.1.0
No symbol table info available.
#17 0xa797fb77 in PyObject_Call () from /usr/lib/libpython2.3.so.1.0
No symbol table info available.
#18 0xa79df9e2 in PyEval_InitThreads () from /usr/lib/libpython2.3.so.1.0
No symbol table info available.
#19 0xa79e2ba1 in PyEval_InitThreads () from /usr/lib/libpython2.3.so.1.0
No symbol table info available.
#20 0xa79e2ba1 in PyEval_InitThreads () from /usr/lib/libpython2.3.so.1.0
No symbol table info available.
#21 0xa79e3518 in PyEval_EvalCodeEx () from /usr/lib/libpython2.3.so.1.0
No symbol table info available.
#22 0xa7999850 in PyClassMethod_New () from /usr/lib/libpython2.3.so.1.0
No symbol table info available.
#23 0xa797fb77 in PyObject_Call () from /usr/lib/libpython2.3.so.1.0
No symbol table info available.
#24 0xa79863e2 in PyClass_IsSubclass () from /usr/lib/libpython2.3.so.1.0
No symbol table info available.
#25 0xa797fb77 in PyObject_Call () from /usr/lib/libpython2.3.so.1.0
No symbol table info available.
#26 0xa79dd21f in PyEval_CallObjectWithKeywords () from 
/usr/lib/libpython2.3.so.1.0
No symbol table info available.
#27 0xa797fdba in PyObject_CallObject () from /usr/lib/libpython2.3.so.1.0
No symbol table info available.
#28 0x0807b576 in py_callback::make_call (this=0x81d2ff8, args=0x0) at 
py_callback.cc:153
val = (PyObject *) 0xa6cc602c
#29 0x0807b65f in py_callback::callback_func0 

Bug#381456: adonthell segfault on AMD-32

2006-08-09 Thread Julien Danjou

Hello,

Finally I got it.
This is caused by #374062.

This patch is a workaround for that bug. I'm not sure that using bg as
last argument is the best choice, however it works.

--- adonthell-0.3.4.cvs.20050813/src/win_ttf.cc 2004-12-13 09:56:58.0 
+0100
+++ adonthell-0.3.4.cvs.20050813.jd/src/win_ttf.cc  2006-08-09 
16:41:00.0 +0200
@@ -137,7 +137,7 @@
 if (s == NULL) return *(glyphs[' ']);
 
 image tmp (s, bg);
-image shadow (TTF_RenderUNICODE_Solid (ttf, unichar, bg), white);
+image shadow (TTF_RenderUNICODE_Shaded (ttf, unichar, bg, bg), white);
 image *glph = new image (tmp.length(), height_, false);
 glph-fillrect (0, 0, tmp.length()+1, height_+1, screen::trans_col(), 
NULL);
 shadow.draw (1, 1+height_-shadow.height(), 0, 0, shadow.length(), 
shadow.height(), NULL, glph);



Cheers,
-- 
Julien Danjou
.''`.  Debian Developer
: :' : http://julien.danjou.info
`. `'  http://people.debian.org/~acid
  `-   9A0D 5FD9 EB42 22F6 8974  C95C A462 B51E C2FE E5CD


signature.asc
Description: Digital signature


Bug#381456: adonthell segfault on AMD-32

2006-08-04 Thread Fabrice Lorrain
Package: adonthell
Version: 0.3.4.cvs.20050813-2.1+b1
Severity: grave
Justification: renders package unusable


Hello,

$ /usr/games/adonthell wastesedge
Segmentation fault

Segfault a the end of the sound during the splash screen.

$ strace /usr/games/adonthell wastesedge 

munmap(0xa760a000, 4096)= 0
munmap(0xa7609000, 4096)= 0
shmdt(0xa7474000)   = 0
shmctl(70057989, IPC_64|IPC_STAT, 0xafe7d68c) = 0
shmctl(70057989, IPC_64|IPC_RMID, 0)= 0
shmdt(0xa760b000)   = 0
shmctl(69664771, IPC_64|IPC_STAT, 0xafe7d68c) = 0
semop(327680, 0xafe7d716, 1)= 0
rt_sigaction(SIGINT, {SIG_DFL}, {0xa7eadec0, [INT], SA_RESTART}, 8) = 0
rt_sigaction(SIGTERM, {SIG_DFL}, {0xa7eadec0, [TERM], SA_RESTART}, 8) =
0
write(3, _\0\2\0\v\0 [EMAIL PROTECTED], 12)= 12
read(3, 0xafe7d740, 32) = -1 EAGAIN (Resource
temporarily unavailable)
poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, -1) = 1
read(3, \1\2l\0\0\0\0\0\3\0 \2\4\0\0\0\0\0\0\0\4\0\0\0\\-\34\10...,
32) = 32
write(4, +\3\1\0, 4)  = 4
read(4, 0xafe7d750, 32) = -1 EAGAIN (Resource
temporarily unavailable)
poll([{fd=4, events=POLLIN, revents=POLLIN}], 1, -1) = 1
read(4, \1\2!\2\0\0\0\0\3\0 \2\4\0\0\0(\0\0\0\4\0\0\0\\-\34\10..., 32)
= 32
write(3, \224\2\2\0\17\0 [EMAIL PROTECTED], 12) = 12
read(3, 0xafe7d730, 32) = -1 EAGAIN (Resource
temporarily unavailable)
poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, -1) = 1
read(3, \1\2n\0\0\0\0\0\3\0 \2\4\0\0\0\0\0\0\0\4\0\0\0\\-\34\10...,
32) = 32
shmdt(0xa74a4000)   = 0
write(3, \n\2\2\0\3\0 [EMAIL PROTECTED] \2\0\2\0\16\0 \2Od\2\0\f\0...,
36) = 36
read(3, 0xafe7d700, 32) = -1 EAGAIN (Resource
temporarily unavailable)
poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, -1) = 1
read(3, \22\1o\0\3\0 \2\3\0 \2\0\0 \2\1\0\0\300\1\0\0\0\0\0\0\0...,
32) = 32
read(3, \n\0o\0\3\0 \2\0\0\0\0\30\1\332\257\\-\34\10\10vx\10\22...,
32) = 32
read(3, \10\0o\0n\272\276\331\243\0\0\0\r\0 \2\0\0\0\0w\1\372\0...,
32) = 32
read(3, \1\0s\0\0\0\0\0\0\0X\2\1\1\0\0\4\0\0\0\0\0\0\0\4\0\0\0..., 32)
= 32
write(3, k\2\3\0X\2X\2\1\1\2\0\212\4\1\0_\0\2\0\7\0 \2+d\1\0, 28) = 28
read(3, 0xafe7d730, 32) = -1 EAGAIN (Resource
temporarily unavailable)
poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, -1) = 1
read(3, \34\267s\0\3\0 \2\372\0\0\0u\272\276\331\0\0\0\0\210\232...,
32) = 32
read(3, \25\267s\0\3\0 \2\3\0 \2\243\0\0\0\23\0\25\0\0\2\340\1..., 32)
= 32
read(3, 0xafe7d730, 32) = -1 EAGAIN (Resource
temporarily unavailable)
poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, -1) = 1
read(3, \34\267s\0\3\0 [EMAIL PROTECTED]..., 32)
= 32
read(3, \34\267s\0\3\0 \2\355\0\0\0u\272\276\331\1\272\276\331..., 32)
= 32
read(3, \34\267s\0\3\0 [EMAIL PROTECTED]...,
32) = 32
read(3, 0xafe7d730, 32) = -1 EAGAIN (Resource
temporarily unavailable)
poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, -1) = 1
read(3, \1\2w\0\0\0\0\0\20\0\200\0\4\0\0\0\0\0\0\0\4\0\0\0\\-\34...,
32) = 32
write(4, \3\2\0\0\0\200\2+\0\1\0, 12) = 12
read(4, 0xafe7d740, 32) = -1 EAGAIN (Resource
temporarily unavailable)
poll([{fd=4, events=POLLIN, revents=POLLIN}], 1, -1) = 1
read(4, \1\2#\2\0\0\0\0\20\0\200\0\4\0\0\0\0\0\0\0\4\0\0\0\\-\34...,
32) = 32
shutdown(4, 2 /* send and receive */)   = 0
close(4)= 0
write(3, \2\2\0\0\0 \2+\1\1\0, 12)   = 12
read(3, 0xafe7d740, 32) = -1 EAGAIN (Resource
temporarily unavailable)
poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, -1) = 1
read(3, \1\2y\0\0\0\0\0\20\0\200\0\4\0\0\0\0\0\0\0\4\0\0\0\\-\34...,
32) = 32
shutdown(3, 2 /* send and receive */)   = 0
close(3)= 0
munmap(0xa7631000, 13020)   = 0
munmap(0xa763d000, 57020)   = 0
rt_sigaction(SIGSEGV, NULL, {SIG_DFL}, 8) = 0
rt_sigaction(SIGBUS, NULL, {0xa7ea6c90, [], 0}, 8) = 0
rt_sigaction(SIGBUS, {SIG_DFL}, NULL, 8) = 0
rt_sigaction(SIGFPE, NULL, {0xa7ea6c90, [], 0}, 8) = 0
rt_sigaction(SIGFPE, {SIG_DFL}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {0xa7ea6c90, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL}, NULL, 8) = 0
tgkill(13372, 13372, SIGSEGV)   = 0
sigreturn() = ? (mask now [])
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Process 13372 detached

I don't know if this is related, but gives lots of missing ressources :

$ grep open /tmp/adonthell.strace | grep ENOENT 
cut...
open(/usr/lib/python23.zip/site.so, O_RDONLY|O_LARGEFILE) = -1 ENOENT
(No such file or directory)
open(/usr/lib/python23.zip/sitemodule.so, O_RDONLY|O_LARGEFILE) = -1
ENOENT (No such file or directory)
open(/usr/lib/python23.zip/site.py, O_RDONLY|O_LARGEFILE) = -1 ENOENT
(No such file or directory)
open(/usr/lib/python23.zip/site.pyc, O_RDONLY|O_LARGEFILE) = -1 ENOENT
(No such file or directory)
open(/usr/lib/python2.3/site.so,