[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] "import pygame" crashes with svn build



hrmm,

you figured this out yet?

Easiest way to work around it...
  Comment out import transform lines in the file:
      site-packages/pygame/__init__.py


What gcc version are you using?  Also what cpu do you have?

gcc --version
cat /proc/cpuinfo


What is the gcc line you are using to compile transform.so?  eg.

touch src/transform.c
python setup.py build

gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp
-mno-fused-madd -fno-common -dynamic -DNDEBUG -g -Os -Wall
-Wstrict-prototypes -DMACOSX -I/usr/include/ffi -DENABLE_DTRACE -arch
i386 -arch ppc -pipe -Ddarwin
-I/Library/Frameworks/SDL.framework/Versions/Current/Headers
-I/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5
-c src/transform.c -o build/temp.macosx-10.5-i386-2.5/src/transform.o
gcc -Wl,-F. -bundle -undefined dynamic_lookup -arch i386 -arch ppc
build/temp.macosx-10.5-i386-2.5/src/transform.o
build/temp.macosx-10.5-i386-2.5/src/rotozoom.o
build/temp.macosx-10.5-i386-2.5/src/scale2x.o
build/temp.macosx-10.5-i386-2.5/src/scale_mmx.o -o
build/lib.macosx-10.5-i386-2.5/pygame/transform.so -framework SDL
-F/Library/Frameworks/



Perhaps try commenting out the sse/mmx parts?


cheers,




On Sun, May 31, 2009 at 1:34 AM, Lorenz Quack <don@xxxxxxxxxxxxxxxxx> wrote:
> René Dudfield wrote:
>>
>> On Sat, May 30, 2009 at 9:07 AM, Lorenz Quack <don@xxxxxxxxxxxxxxxxx>
>> wrote:
>>
>>
>>> Hi,
>>>
>>> I have a problem running pygame from the current svn sources. building
>>> and
>>>  installing works fine but when I import pygame it crashes:
>>>
>>>>>> import pygame
>>>
>>> Fatal Python error: (pygame parachute) Segmentation Fault Aborted
>>>
>>> If I run it through pdb I get the following result:
>>>
>>>>>> pdb.run("import pygame")
>>>>
>>>> <string>(1)<module>()->None
>>>
>>> (Pdb) s [...]
>>>>
>>>> /usr/lib64/python2.6/site-packages/pygame/__init__.py(214)<module>()
>>>
>>> -> try: import pygame.time (Pdb) n
>>>>
>>>> /usr/lib64/python2.6/site-packages/pygame/__init__.py(217)<module>()
>>>
>>> -> try: import pygame.transform (Pdb) s Fatal Python error: (pygame
>>> parachute) Segmentation Fault Aborted
>>>
>>> it seems to crash right after the inittransform function. I have no idea
>>> what's going on. Any help is appreciated.
>>>
>>> some information about my system that may be relevant: $ uname -a Linux
>>> horst 2.6.27-gentoo-r4 #9 SMP Sat Jan 10 19:56:02 CET 2009 x86_64 Intel(R)
>>>  Core(TM)2 CPU 6600 @ 2.40GHz GenuineIntel GNU/Linux
>>>
>>> $ python Python 2.6.2 (r262:71600, May  1 2009, 15:24:32) [GCC 4.3.3] on
>>> linux2
>>>
>>> pygame revision: 2282
>>>
>>>
>>> sincerely yours Lorenz
>>>
>>>
>>> PS: the latest ebuild available in portage is for pygame-1.8.1 and works
>>> fine.
>>>
>>
>>
>> Hi,
>>
>> can get a stack trace with gdb?
>>
>>
>> $ gdb python (gdb) run -c "import pygame"
>>
>> Then type 'where' when it crashes.
>>
>> cheers,
>
>
> Hi René,
>
> here is the stacktrace. Not sure how useful it's going to be because I don't
> know how to convince python to build with debug symbols. the --with-pydebug
> configure option didn't do the trick.
>
> $ gdb python
> (no debugging symbols found)
> (gdb) run -c "import pygame"
> Starting program: /usr/bin/python -c "import pygame"
> (no debugging symbols found)
> [...]
> (no debugging symbols found)
>
> René Dudfield wrote:
>> On Sat, May 30, 2009 at 9:07 AM, Lorenz Quack <don@xxxxxxxxxxxxxxxxx>
>> wrote:
>>
>>> Hi,
>>>
>>> I have a problem running pygame from the current svn sources. building
>>> and
>>> installing works fine but when I import pygame it crashes:
>>>
>>>>>> import pygame
>>> Fatal Python error: (pygame parachute) Segmentation Fault Aborted
>>>
>>> If I run it through pdb I get the following result:
>>>
>>>>>> pdb.run("import pygame")
>>>> <string>(1)<module>()->None
>>> (Pdb) s [...]
>>>> /usr/lib64/python2.6/site-packages/pygame/__init__.py(214)<module>()
>>> -> try: import pygame.time (Pdb) n
>>>> /usr/lib64/python2.6/site-packages/pygame/__init__.py(217)<module>()
>>> -> try: import pygame.transform (Pdb) s Fatal Python error: (pygame
>>> parachute) Segmentation Fault Aborted
>>>
>>> it seems to crash right after the inittransform function. I have no idea
>>> what's going on. Any help is appreciated.
>>>
>>> some information about my system that may be relevant: $ uname -a Linux
>>> horst 2.6.27-gentoo-r4 #9 SMP Sat Jan 10 19:56:02 CET 2009 x86_64
>>> Intel(R)
>>> Core(TM)2 CPU 6600 @ 2.40GHz GenuineIntel GNU/Linux
>>>
>>> $ python Python 2.6.2 (r262:71600, May  1 2009, 15:24:32) [GCC 4.3.3] on
>>> linux2
>>>
>>> pygame revision: 2282
>>>
>>>
>>> sincerely yours Lorenz
>>>
>>>
>>> PS: the latest ebuild available in portage is for pygame-1.8.1 and works
>>> fine.
>>>
>>
>>
>> Hi,
>>
>> can get a stack trace with gdb?
>>
>>
>> $ gdb python (gdb) run -c "import pygame"
>>
>> Then type 'where' when it crashes.
>>
>> cheers,
>
>
> Hi René,
>
> here is the stacktrace. Not sure how useful it's going to be because I don't
> know how to convince python to build with debug symbols. the --with-pydebug
> configure option didn't do the trick.
>
> $ gdb python
> (no debugging symbols found)
> (gdb) run -c "import pygame"
> Starting program: /usr/bin/python -c "import pygame"
> (no debugging symbols found)
> [...]
> (no debugging symbols found)
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x7f68590f36f0 (LWP 9638)]
> 0x00007f6858c3e3be in _PyImport_LoadDynamicModule () from
> /usr/lib/libpython2.6.so.1.0
> (gdb) where
> #0  0x00007f6858c3e3be in _PyImport_LoadDynamicModule () from
> /usr/lib/libpython2.6.so.1.0
> #1  0x00007f6858c3bf8f in ?? () from /usr/lib/libpython2.6.so.1.0
> #2  0x00007f6858c3c290 in ?? () from /usr/lib/libpython2.6.so.1.0
> #3  0x00007f6858c3cb06 in ?? () from /usr/lib/libpython2.6.so.1.0
> #4  0x00007f6858c3d1d5 in PyImport_ImportModuleLevel () from
> /usr/lib/libpython2.6.so.1.0
> #5  0x00007f6858c1b13d in ?? () from /usr/lib/libpython2.6.so.1.0
> #6  0x00007f6858b64ead in PyObject_Call () from /usr/lib/libpython2.6.so.1.0
> #7  0x00007f6858c1b4ba in PyEval_CallObjectWithKeywords () from
> /usr/lib/libpython2.6.so.1.0
> #8  0x00007f6858c20b8f in PyEval_EvalFrameEx () from
> /usr/lib/libpython2.6.so.1.0
> #9  0x00007f6858c27c81 in PyEval_EvalCodeEx () from
> /usr/lib/libpython2.6.so.1.0
> #10 0x00007f6858c27e32 in PyEval_EvalCode () from
> /usr/lib/libpython2.6.so.1.0
> #11 0x00007f6858c3a217 in PyImport_ExecCodeModuleEx () from
> /usr/lib/libpython2.6.so.1.0
> #12 0x00007f6858c3a52f in ?? () from /usr/lib/libpython2.6.so.1.0
> #13 0x00007f6858c3b75d in ?? () from /usr/lib/libpython2.6.so.1.0
> #14 0x00007f6858c3bf8f in ?? () from /usr/lib/libpython2.6.so.1.0
> #15 0x00007f6858c3c290 in ?? () from /usr/lib/libpython2.6.so.1.0
> #16 0x00007f6858c3caac in ?? () from /usr/lib/libpython2.6.so.1.0
> #17 0x00007f6858c3d1d5 in PyImport_ImportModuleLevel () from
> /usr/lib/libpython2.6.so.1.0
> #18 0x00007f6858c1b13d in ?? () from /usr/lib/libpython2.6.so.1.0
> #19 0x00007f6858b64ead in PyObject_Call () from /usr/lib/libpython2.6.so.1.0
> #20 0x00007f6858c1b4ba in PyEval_CallObjectWithKeywords () from
> /usr/lib/libpython2.6.so.1.0
> #21 0x00007f6858c20b8f in PyEval_EvalFrameEx () from
> /usr/lib/libpython2.6.so.1.0
> #22 0x00007f6858c27c81 in PyEval_EvalCodeEx () from
> /usr/lib/libpython2.6.so.1.0
> #23 0x00007f6858c27e32 in PyEval_EvalCode () from
> /usr/lib/libpython2.6.so.1.0
> #24 0x00007f6858c47551 in ?? () from /usr/lib/libpython2.6.so.1.0
> #25 0x00007f6858c4777c in PyRun_StringFlags () from
> /usr/lib/libpython2.6.so.1.0
> #26 0x00007f6858c48d60 in PyRun_SimpleStringFlags () from
> /usr/lib/libpython2.6.so.1.0
> #27 0x00007f6858c56f2a in Py_Main () from /usr/lib/libpython2.6.so.1.0
> #28 0x00007f6857f405c6 in __libc_start_main () from /lib/libc.so.6
> #29 0x0000000000400789 in _start ()
>
>
> I once threw some "printf"s in "inittransfrom" function and it seemed to run
> without problems to the end.
>
> thanks for the help
>
> //Lorenz
>