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

2009-07-01 Thread René Dudfield
On Thu, Jul 2, 2009 at 6:51 AM, Lorenz Quack wrote:
> Hey,
>
> your patch seems to work as advertised. This is also far less intrusive than
> the last patch which
> IMHO is a good thing since this is just some patch work to fix somebody
> else's bug.
>
> //Lorenz
>
>

Cool...

Committed revision 2454.

So this will be in 1.9.


cu,


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

2009-07-01 Thread Lorenz Quack

Hey,

your patch seems to work as advertised. This is also far less intrusive than 
the last patch which
IMHO is a good thing since this is just some patch work to fix somebody else's 
bug.

//Lorenz


Lenard Lindstrom wrote:

Hi Lorenz,

I see. I think for now I will add a macro declaration to the transform 
line in Setup.in. When present Pygame will build with MMX disabled for 
64 bit intels (the default). To enable MMX/SSE remove the declaration.


I have included a patch that makes the proposed changes to Pygame Rev 
2452. config.py must be run first to reconfigure the build, and 
transform.c touched to get it to recompile. After rebuilding, 
pgyame.transform.get_smoothscale_backend() should return "GENERIC" (no 
MMX/SSE). Deleting "-D_NO_MMX_FOR_X86_64" from the "Setup" file and 
rebuilding transform.c should enable MMX again.


Lenard



Lorenz Quack wrote:

Hi,

I believe __x86_64__ is correct, but it is not only SDL_HasSSE but 
also SDL_HasMMX that is causing trouble
because both (amongst others) internally call the SDL function 
CPU_getCPUIDFeatures which is the culprit.


//Lorenz


Lenard Lindstrom wrote:
Didn't work? Then what C macro should be check to determine a 64 bit 
build. I used __x86_64__ elsewhere, but it is apparently wrong.


Lenard

Lorenz Quack wrote:

Hi,

unfortunately Lenards patch didn't help. pygame would still crash.
But on the upside the RedHat patch did the trick. With the patched 
libsdl the unpatched pygame trunk

it installs and imports without problems! Open source for the win :)

I also reported this bug to the gentoo bugtracker:
http://bugs.gentoo.org/show_bug.cgi?id=276092

Thanks again for the help guys.
//Lorenz



René Dudfield wrote:

Hi,

Looks like SDL_HasSSE is indeed buggy on SDL 64bit systems.

Seems redhat has a patch for it:
https://bugzilla.redhat.com/show_bug.cgi?id=487720

A patch is here:
http://cvs.fedoraproject.org/viewvc/rpms/SDL/devel/SDL-1.2.13-rh487720.patch?revision=1.1&view=markup 



Also there is a patch in SDL 1.3 svn... which is no use to us since
we're still on SDL 1.2.x.  Sam isn't doing another SDL 1.2.x release
for at least another few months.

I've added a bug with link to patch at the SDL bugzilla:
http://bugzilla.libsdl.org/show_bug.cgi?id=760


I think disabling it for now on 64bit systems, with a comment about
this problem is a good idea.  Or perhaps putting an ifdef SDL version

1.2.13 would be ok too.













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

2009-07-01 Thread Lenard Lindstrom

Hi Lorenz,

I see. I think for now I will add a macro declaration to the transform 
line in Setup.in. When present Pygame will build with MMX disabled for 
64 bit intels (the default). To enable MMX/SSE remove the declaration.


I have included a patch that makes the proposed changes to Pygame Rev 
2452. config.py must be run first to reconfigure the build, and 
transform.c touched to get it to recompile. After rebuilding, 
pgyame.transform.get_smoothscale_backend() should return "GENERIC" (no 
MMX/SSE). Deleting "-D_NO_MMX_FOR_X86_64" from the "Setup" file and 
rebuilding transform.c should enable MMX again.


Lenard



Lorenz Quack wrote:

Hi,

I believe __x86_64__ is correct, but it is not only SDL_HasSSE but 
also SDL_HasMMX that is causing trouble
because both (amongst others) internally call the SDL function 
CPU_getCPUIDFeatures which is the culprit.


//Lorenz


Lenard Lindstrom wrote:
Didn't work? Then what C macro should be check to determine a 64 bit 
build. I used __x86_64__ elsewhere, but it is apparently wrong.


Lenard

Lorenz Quack wrote:

Hi,

unfortunately Lenards patch didn't help. pygame would still crash.
But on the upside the RedHat patch did the trick. With the patched 
libsdl the unpatched pygame trunk

it installs and imports without problems! Open source for the win :)

I also reported this bug to the gentoo bugtracker:
http://bugs.gentoo.org/show_bug.cgi?id=276092

Thanks again for the help guys.
//Lorenz



René Dudfield wrote:

Hi,

Looks like SDL_HasSSE is indeed buggy on SDL 64bit systems.

Seems redhat has a patch for it:
https://bugzilla.redhat.com/show_bug.cgi?id=487720

A patch is here:
http://cvs.fedoraproject.org/viewvc/rpms/SDL/devel/SDL-1.2.13-rh487720.patch?revision=1.1&view=markup 



Also there is a patch in SDL 1.3 svn... which is no use to us since
we're still on SDL 1.2.x.  Sam isn't doing another SDL 1.2.x release
for at least another few months.

I've added a bug with link to patch at the SDL bugzilla:
http://bugzilla.libsdl.org/show_bug.cgi?id=760


I think disabling it for now on 64bit systems, with a comment about
this problem is a good idea.  Or perhaps putting an ifdef SDL version

1.2.13 would be ok too.









Index: src/scale.h
===
--- src/scale.h	(revision 2452)
+++ src/scale.h	(working copy)
@@ -29,7 +29,7 @@
 #if !defined(SCALE_HEADER)
 #define SCALE_HEADER
 
-#if (defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))) || defined(MS_WIN32)
+#if (defined(__GNUC__) && ((defined(__x86_64__) && !defined(_NO_MMX_FOR_X86_64)) || defined(__i386__))) || defined(MS_WIN32)
 #define SCALE_MMX_SUPPORT
 
 /* These functions implement an area-averaging shrinking filter in the X-dimension.
Index: Setup.in
===
--- Setup.in	(revision 2452)
+++ Setup.in	(working copy)
@@ -64,7 +64,7 @@
 draw src/draw.c $(SDL) $(DEBUG)
 image src/image.c $(SDL) $(DEBUG)
 overlay src/overlay.c $(SDL) $(DEBUG)
-transform src/transform.c src/rotozoom.c src/scale2x.c src/scale_mmx.c $(SDL) $(DEBUG)
+transform src/transform.c src/rotozoom.c src/scale2x.c src/scale_mmx.c $(SDL) $(DEBUG) -D_NO_MMX_FOR_X86_64
 mask src/mask.c src/bitmask.c $(SDL) $(DEBUG)
 bufferproxy src/bufferproxy.c $(SDL) $(DEBUG)
 pixelarray src/pixelarray.c $(SDL) $(DEBUG)


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

2009-07-01 Thread Lorenz Quack

Hi,

I believe __x86_64__ is correct, but it is not only SDL_HasSSE but also 
SDL_HasMMX that is causing trouble
because both (amongst others) internally call the SDL function 
CPU_getCPUIDFeatures which is the culprit.

//Lorenz


Lenard Lindstrom wrote:
Didn't work? Then what C macro should be check to determine a 64 bit 
build. I used __x86_64__ elsewhere, but it is apparently wrong.


Lenard

Lorenz Quack wrote:

Hi,

unfortunately Lenards patch didn't help. pygame would still crash.
But on the upside the RedHat patch did the trick. With the patched 
libsdl the unpatched pygame trunk

it installs and imports without problems! Open source for the win :)

I also reported this bug to the gentoo bugtracker:
http://bugs.gentoo.org/show_bug.cgi?id=276092

Thanks again for the help guys.
//Lorenz



René Dudfield wrote:

Hi,

Looks like SDL_HasSSE is indeed buggy on SDL 64bit systems.

Seems redhat has a patch for it:
https://bugzilla.redhat.com/show_bug.cgi?id=487720

A patch is here:
http://cvs.fedoraproject.org/viewvc/rpms/SDL/devel/SDL-1.2.13-rh487720.patch?revision=1.1&view=markup 



Also there is a patch in SDL 1.3 svn... which is no use to us since
we're still on SDL 1.2.x.  Sam isn't doing another SDL 1.2.x release
for at least another few months.

I've added a bug with link to patch at the SDL bugzilla:
http://bugzilla.libsdl.org/show_bug.cgi?id=760


I think disabling it for now on 64bit systems, with a comment about
this problem is a good idea.  Or perhaps putting an ifdef SDL version

1.2.13 would be ok too.









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

2009-07-01 Thread Lenard Lindstrom
Didn't work? Then what C macro should be check to determine a 64 bit 
build. I used __x86_64__ elsewhere, but it is apparently wrong.


Lenard

Lorenz Quack wrote:

Hi,

unfortunately Lenards patch didn't help. pygame would still crash.
But on the upside the RedHat patch did the trick. With the patched 
libsdl the unpatched pygame trunk

it installs and imports without problems! Open source for the win :)

I also reported this bug to the gentoo bugtracker:
http://bugs.gentoo.org/show_bug.cgi?id=276092

Thanks again for the help guys.
//Lorenz



René Dudfield wrote:

Hi,

Looks like SDL_HasSSE is indeed buggy on SDL 64bit systems.

Seems redhat has a patch for it:
https://bugzilla.redhat.com/show_bug.cgi?id=487720

A patch is here:
http://cvs.fedoraproject.org/viewvc/rpms/SDL/devel/SDL-1.2.13-rh487720.patch?revision=1.1&view=markup 



Also there is a patch in SDL 1.3 svn... which is no use to us since
we're still on SDL 1.2.x.  Sam isn't doing another SDL 1.2.x release
for at least another few months.

I've added a bug with link to patch at the SDL bugzilla:
http://bugzilla.libsdl.org/show_bug.cgi?id=760


I think disabling it for now on 64bit systems, with a comment about
this problem is a good idea.  Or perhaps putting an ifdef SDL version

1.2.13 would be ok too.







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

2009-07-01 Thread Lorenz Quack

Hi,

unfortunately Lenards patch didn't help. pygame would still crash.
But on the upside the RedHat patch did the trick. With the patched libsdl the 
unpatched pygame trunk
it installs and imports without problems! Open source for the win :)

I also reported this bug to the gentoo bugtracker:
http://bugs.gentoo.org/show_bug.cgi?id=276092

Thanks again for the help guys.
//Lorenz



René Dudfield wrote:

Hi,

Looks like SDL_HasSSE is indeed buggy on SDL 64bit systems.

Seems redhat has a patch for it:
https://bugzilla.redhat.com/show_bug.cgi?id=487720

A patch is here:
http://cvs.fedoraproject.org/viewvc/rpms/SDL/devel/SDL-1.2.13-rh487720.patch?revision=1.1&view=markup

Also there is a patch in SDL 1.3 svn... which is no use to us since
we're still on SDL 1.2.x.  Sam isn't doing another SDL 1.2.x release
for at least another few months.

I've added a bug with link to patch at the SDL bugzilla:
http://bugzilla.libsdl.org/show_bug.cgi?id=760


I think disabling it for now on 64bit systems, with a comment about
this problem is a good idea.  Or perhaps putting an ifdef SDL version

1.2.13 would be ok too.



cheers,





On Wed, Jul 1, 2009 at 3:53 AM, Lenard Lindstrom  wrote:

Oops, forgot to attach the patch.

Lenard

Lenard Lindstrom wrote:

Hi Lorenz,

Yes, it is supposed to be summer where I am too, and actually was hot for 
awhile, but not now. Anyway, to make sure I am clear on this, Rev. 1658 crashes 
when the transform module is imported, but earlier revisions work. I assume 
this means pygame.transform.smoothscale also works. So I am guessing it is the 
call to the SDL function SDL_HasSSE that is causing the problem. The attached 
patch to transform.c, Rev 2447 (release candidate 2) removes the SDL_HasSSE 
call for 64bit intels. Would you give it a try? If it works I will commit it to 
SVN. It is not ideal, but at least smoothscale will still use MMX.

Lenard

Lorenz Quack wrote:

Hey Lenard,

sorry for the long delays but I'm quite busy these days plus the good 
weather... not many PC hours left.

Lenard Lindstrom wrote:

Hi Lorenz,

Could you try dropping in SVN rev 1912 of transform.c instead. This predates 
the Python 3 updates. This is kind of reaching, but it will narrow down the 
search.

I tried this out and poked some more at it and it doesn't seem to be py3k 
related but rather MMX/SSE.
The transform.c rev 1657 works and 1658 breaks.
Also if I comment out "#define SCALE_MMX_SUPPORT" in any version it works.

I don't get this. I keep thinking that something must be wrong with _my_ system 
otherwise someone else
must have encountered this as well.
The only thing I could possibly think of is that I installed the sdl-gfx package without 
the "mmx" USE-flag
(I'm running Gentoo) because it is not available on amd64 architecture.

By the way. I also tried commenting out all the asm stuff in scale_mmx64.c but 
it would still crash.
So maybe it is something that is going on in transform.c but related to MMX/SSE

If you have any other ideas let me know.

yours
//Lorenz



Thanks,

Lenard

Lorenz Quack wrote:

Hi again,


you figured this out yet?


not 100% but at least now I get it to compile by following your advice:

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


[...]

Perhaps try commenting out the sse/mmx parts?


that seems to be the problem. If I comment out

#   include "scale_mmx64.c"

in "scale_mmx.c" it compiles. if I import pygame the interpreter naturally
complains about undefined symbols but as long as I don't use the transform
module it seems to work this way as well. of course this is not a solution.

For debugging purposes I tried to remove all SSE/MMX code and simply implement
empty dummy functions like this:

void filter_shrink_X_MMX(Uint8 *srcpix, Uint8 *dstpix, int height, int srcpitch,
int dstpitch, int srcwidth, int dstwidth) {}

that also crashed. I find this very confusing and frustrating. So I settle with
the work around for now.


thanks again for the help and if I can help with some debug information or if 
you
have any ideas let me know.

yours
//Lorenz




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

2009-06-30 Thread René Dudfield
Hi,

Looks like SDL_HasSSE is indeed buggy on SDL 64bit systems.

Seems redhat has a patch for it:
https://bugzilla.redhat.com/show_bug.cgi?id=487720

A patch is here:
http://cvs.fedoraproject.org/viewvc/rpms/SDL/devel/SDL-1.2.13-rh487720.patch?revision=1.1&view=markup

Also there is a patch in SDL 1.3 svn... which is no use to us since
we're still on SDL 1.2.x.  Sam isn't doing another SDL 1.2.x release
for at least another few months.

I've added a bug with link to patch at the SDL bugzilla:
http://bugzilla.libsdl.org/show_bug.cgi?id=760


I think disabling it for now on 64bit systems, with a comment about
this problem is a good idea.  Or perhaps putting an ifdef SDL version
> 1.2.13 would be ok too.


cheers,





On Wed, Jul 1, 2009 at 3:53 AM, Lenard Lindstrom  wrote:
>
> Oops, forgot to attach the patch.
>
> Lenard
>
> Lenard Lindstrom wrote:
>>
>> Hi Lorenz,
>>
>> Yes, it is supposed to be summer where I am too, and actually was hot for 
>> awhile, but not now. Anyway, to make sure I am clear on this, Rev. 1658 
>> crashes when the transform module is imported, but earlier revisions work. I 
>> assume this means pygame.transform.smoothscale also works. So I am guessing 
>> it is the call to the SDL function SDL_HasSSE that is causing the problem. 
>> The attached patch to transform.c, Rev 2447 (release candidate 2) removes 
>> the SDL_HasSSE call for 64bit intels. Would you give it a try? If it works I 
>> will commit it to SVN. It is not ideal, but at least smoothscale will still 
>> use MMX.
>>
>> Lenard
>>
>> Lorenz Quack wrote:
>>>
>>> Hey Lenard,
>>>
>>> sorry for the long delays but I'm quite busy these days plus the good 
>>> weather... not many PC hours left.
>>>
>>> Lenard Lindstrom wrote:

 Hi Lorenz,

 Could you try dropping in SVN rev 1912 of transform.c instead. This 
 predates the Python 3 updates. This is kind of reaching, but it will 
 narrow down the search.
>>>
>>> I tried this out and poked some more at it and it doesn't seem to be py3k 
>>> related but rather MMX/SSE.
>>> The transform.c rev 1657 works and 1658 breaks.
>>> Also if I comment out "#define SCALE_MMX_SUPPORT" in any version it works.
>>>
>>> I don't get this. I keep thinking that something must be wrong with _my_ 
>>> system otherwise someone else
>>> must have encountered this as well.
>>> The only thing I could possibly think of is that I installed the sdl-gfx 
>>> package without the "mmx" USE-flag
>>> (I'm running Gentoo) because it is not available on amd64 architecture.
>>>
>>> By the way. I also tried commenting out all the asm stuff in scale_mmx64.c 
>>> but it would still crash.
>>> So maybe it is something that is going on in transform.c but related to 
>>> MMX/SSE
>>>
>>> If you have any other ideas let me know.
>>>
>>> yours
>>> //Lorenz
>>>
>>>

 Thanks,

 Lenard

 Lorenz Quack wrote:
>
> Hi again,
>
>>
>> you figured this out yet?
>>
>
> not 100% but at least now I get it to compile by following your advice:
>>
>> Easiest way to work around it...
>>  Comment out import transform lines in the file:
>>      site-packages/pygame/__init__.py
>>
> [...]
>>
>> Perhaps try commenting out the sse/mmx parts?
>>
>
> that seems to be the problem. If I comment out
>
> #       include "scale_mmx64.c"
>
> in "scale_mmx.c" it compiles. if I import pygame the interpreter naturally
> complains about undefined symbols but as long as I don't use the transform
> module it seems to work this way as well. of course this is not a 
> solution.
>
> For debugging purposes I tried to remove all SSE/MMX code and simply 
> implement
> empty dummy functions like this:
>
> void filter_shrink_X_MMX(Uint8 *srcpix, Uint8 *dstpix, int height, int 
> srcpitch,
>                         int dstpitch, int srcwidth, int dstwidth) {}
>
> that also crashed. I find this very confusing and frustrating. So I 
> settle with
> the work around for now.
>
>
> thanks again for the help and if I can help with some debug information 
> or if you
> have any ideas let me know.
>
> yours
> //Lorenz

>>>
>>
>


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

2009-06-30 Thread Lenard Lindstrom

Oops, forgot to attach the patch.

Lenard

Lenard Lindstrom wrote:


Hi Lorenz,

Yes, it is supposed to be summer where I am too, and actually was hot 
for awhile, but not now. Anyway, to make sure I am clear on this, Rev. 
1658 crashes when the transform module is imported, but earlier 
revisions work. I assume this means pygame.transform.smoothscale also 
works. So I am guessing it is the call to the SDL function SDL_HasSSE 
that is causing the problem. The attached patch to transform.c, Rev 
2447 (release candidate 2) removes the SDL_HasSSE call for 64bit 
intels. Would you give it a try? If it works I will commit it to SVN. 
It is not ideal, but at least smoothscale will still use MMX.


Lenard

Lorenz Quack wrote:

Hey Lenard,

sorry for the long delays but I'm quite busy these days plus the good 
weather... not many PC hours left.


Lenard Lindstrom wrote:

Hi Lorenz,

Could you try dropping in SVN rev 1912 of transform.c instead. This 
predates the Python 3 updates. This is kind of reaching, but it will 
narrow down the search.


I tried this out and poked some more at it and it doesn't seem to be 
py3k related but rather MMX/SSE.

The transform.c rev 1657 works and 1658 breaks.
Also if I comment out "#define SCALE_MMX_SUPPORT" in any version it 
works.


I don't get this. I keep thinking that something must be wrong with 
_my_ system otherwise someone else

must have encountered this as well.
The only thing I could possibly think of is that I installed the 
sdl-gfx package without the "mmx" USE-flag

(I'm running Gentoo) because it is not available on amd64 architecture.

By the way. I also tried commenting out all the asm stuff in 
scale_mmx64.c but it would still crash.
So maybe it is something that is going on in transform.c but related 
to MMX/SSE


If you have any other ideas let me know.

yours
//Lorenz




Thanks,

Lenard

Lorenz Quack wrote:


Hi again,



you figured this out yet?



not 100% but at least now I get it to compile by following your 
advice:

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


[...]


Perhaps try commenting out the sse/mmx parts?



that seems to be the problem. If I comment out

#   include "scale_mmx64.c"

in "scale_mmx.c" it compiles. if I import pygame the interpreter 
naturally
complains about undefined symbols but as long as I don't use the 
transform
module it seems to work this way as well. of course this is not a 
solution.


For debugging purposes I tried to remove all SSE/MMX code and 
simply implement

empty dummy functions like this:

void filter_shrink_X_MMX(Uint8 *srcpix, Uint8 *dstpix, int height, 
int srcpitch,

 int dstpitch, int srcwidth, int dstwidth) {}

that also crashed. I find this very confusing and frustrating. So I 
settle with

the work around for now.


thanks again for the help and if I can help with some debug 
information or if you

have any ideas let me know.

yours
//Lorenz








Index: src/transform.c
===
--- src/transform.c	(revision 2447)
+++ src/transform.c	(working copy)
@@ -35,6 +35,8 @@
 typedef void (* SMOOTHSCALE_FILTER_P)(Uint8 *, Uint8 *, int, int, int, int, int);
 struct _module_state {
 const char *filter_type;
+int has_sse;
+int has_mmx;
 SMOOTHSCALE_FILTER_P filter_shrink_X;
 SMOOTHSCALE_FILTER_P filter_shrink_Y;
 SMOOTHSCALE_FILTER_P filter_expand_X;
@@ -60,7 +62,9 @@
 static void filter_expand_Y_ONLYC(Uint8 *, Uint8 *, int, int, int, int, int);
 
 static struct _module_state _state = {
-"GENERIC", 
+"GENERIC",
+0,
+0,
 filter_shrink_X_ONLYC,
 filter_shrink_Y_ONLYC,
 filter_expand_X_ONLYC,
@@ -1186,6 +1190,12 @@
 static void
 smoothscale_init (struct _module_state *st)
 {
+st->has_mmx = SDL_HasMMX ();
+#if !defined(__x86_64__)
+st->has_sse = SDL_HasSSE ();
+#else
+st->has_sse = 0;
+#endif
 if (st->filter_shrink_X == 0)
 {
 	if (SDL_HasSSE ())
@@ -1452,60 +1462,60 @@
 if (!PyArg_ParseTupleAndKeywords (args, kwds, "s:set_smoothscale_backend",
   keywords, &type))
 {
-	return NULL;
+return NULL;
 }
 
 #if defined(SCALE_MMX_SUPPORT)
 if (strcmp (type, "GENERIC") == 0)
 {
-	st->filter_type = "GENERIC";
-	st->filter_shrink_X = filter_shrink_X_ONLYC;
-	st->filter_shrink_Y = filter_shrink_Y_ONLYC;
-	st->filter_expand_X = filter_expand_X_ONLYC;
-	st->filter_expand_Y = filter_expand_Y_ONLYC;
+st->filter_type = "GENERIC";
+st->filter_shrink_X = filter_shrink_X_ONLYC;
+st->filter_shrink_Y = filter_shrink_Y_ONLYC;
+st->filter_expand_X = filter_expand_X_ONLYC;
+st->filter_expand_Y = filter_expand_Y_ONLYC;
 }
 else if (strcmp (type, "MMX") == 0)
 {
-	if (!SDL_HasMMX ())
-	{
-	return RAISE (PyExc_ValueError,
+if (!st->has_mmx)
+{
+return RAISE (P

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

2009-06-30 Thread Lenard Lindstrom

Hi Lorenz,

Yes, it is supposed to be summer where I am too, and actually was hot 
for awhile, but not now. Anyway, to make sure I am clear on this, Rev. 
1658 crashes when the transform module is imported, but earlier 
revisions work. I assume this means pygame.transform.smoothscale also 
works. So I am guessing it is the call to the SDL function SDL_HasSSE 
that is causing the problem. The attached patch to transform.c, Rev 2447 
(release candidate 2) removes the SDL_HasSSE call for 64bit intels. 
Would you give it a try? If it works I will commit it to SVN. It is not 
ideal, but at least smoothscale will still use MMX.


Lenard

Lorenz Quack wrote:

Hey Lenard,

sorry for the long delays but I'm quite busy these days plus the good 
weather... not many PC hours left.


Lenard Lindstrom wrote:

Hi Lorenz,

Could you try dropping in SVN rev 1912 of transform.c instead. This 
predates the Python 3 updates. This is kind of reaching, but it will 
narrow down the search.


I tried this out and poked some more at it and it doesn't seem to be 
py3k related but rather MMX/SSE.

The transform.c rev 1657 works and 1658 breaks.
Also if I comment out "#define SCALE_MMX_SUPPORT" in any version it 
works.


I don't get this. I keep thinking that something must be wrong with 
_my_ system otherwise someone else

must have encountered this as well.
The only thing I could possibly think of is that I installed the 
sdl-gfx package without the "mmx" USE-flag

(I'm running Gentoo) because it is not available on amd64 architecture.

By the way. I also tried commenting out all the asm stuff in 
scale_mmx64.c but it would still crash.
So maybe it is something that is going on in transform.c but related 
to MMX/SSE


If you have any other ideas let me know.

yours
//Lorenz




Thanks,

Lenard

Lorenz Quack wrote:


Hi again,



you figured this out yet?



not 100% but at least now I get it to compile by following your advice:

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


[...]


Perhaps try commenting out the sse/mmx parts?



that seems to be the problem. If I comment out

#   include "scale_mmx64.c"

in "scale_mmx.c" it compiles. if I import pygame the interpreter 
naturally
complains about undefined symbols but as long as I don't use the 
transform
module it seems to work this way as well. of course this is not a 
solution.


For debugging purposes I tried to remove all SSE/MMX code and simply 
implement

empty dummy functions like this:

void filter_shrink_X_MMX(Uint8 *srcpix, Uint8 *dstpix, int height, 
int srcpitch,

 int dstpitch, int srcwidth, int dstwidth) {}

that also crashed. I find this very confusing and frustrating. So I 
settle with

the work around for now.


thanks again for the help and if I can help with some debug 
information or if you

have any ideas let me know.

yours
//Lorenz








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

2009-06-29 Thread Lorenz Quack

Hey Lenard,

sorry for the long delays but I'm quite busy these days plus the good 
weather... not many PC hours left.

Lenard Lindstrom wrote:

Hi Lorenz,

Could you try dropping in SVN rev 1912 of transform.c instead. This 
predates the Python 3 updates. This is kind of reaching, but it will 
narrow down the search.


I tried this out and poked some more at it and it doesn't seem to be py3k 
related but rather MMX/SSE.
The transform.c rev 1657 works and 1658 breaks.
Also if I comment out "#define SCALE_MMX_SUPPORT" in any version it works.

I don't get this. I keep thinking that something must be wrong with _my_ system 
otherwise someone else
must have encountered this as well.
The only thing I could possibly think of is that I installed the sdl-gfx package without 
the "mmx" USE-flag
(I'm running Gentoo) because it is not available on amd64 architecture.

By the way. I also tried commenting out all the asm stuff in scale_mmx64.c but 
it would still crash.
So maybe it is something that is going on in transform.c but related to MMX/SSE

If you have any other ideas let me know.

yours
//Lorenz




Thanks,

Lenard

Lorenz Quack wrote:


Hi again,



you figured this out yet?



not 100% but at least now I get it to compile by following your advice:

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


[...]


Perhaps try commenting out the sse/mmx parts?



that seems to be the problem. If I comment out

#   include "scale_mmx64.c"

in "scale_mmx.c" it compiles. if I import pygame the interpreter 
naturally
complains about undefined symbols but as long as I don't use the 
transform
module it seems to work this way as well. of course this is not a 
solution.


For debugging purposes I tried to remove all SSE/MMX code and simply 
implement

empty dummy functions like this:

void filter_shrink_X_MMX(Uint8 *srcpix, Uint8 *dstpix, int height, int 
srcpitch,

 int dstpitch, int srcwidth, int dstwidth) {}

that also crashed. I find this very confusing and frustrating. So I 
settle with

the work around for now.


thanks again for the help and if I can help with some debug 
information or if you

have any ideas let me know.

yours
//Lorenz






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

2009-06-15 Thread Lenard Lindstrom

Hi Lorenz,

Could you try dropping in SVN rev 1912 of transform.c instead. This 
predates the Python 3 updates. This is kind of reaching, but it will 
narrow down the search.


Thanks,

Lenard

Lorenz Quack wrote:


Hi again,



you figured this out yet?



not 100% but at least now I get it to compile by following your advice:

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


[...]


Perhaps try commenting out the sse/mmx parts?



that seems to be the problem. If I comment out

#   include "scale_mmx64.c"

in "scale_mmx.c" it compiles. if I import pygame the interpreter 
naturally
complains about undefined symbols but as long as I don't use the 
transform
module it seems to work this way as well. of course this is not a 
solution.


For debugging purposes I tried to remove all SSE/MMX code and simply 
implement

empty dummy functions like this:

void filter_shrink_X_MMX(Uint8 *srcpix, Uint8 *dstpix, int height, int 
srcpitch,

 int dstpitch, int srcwidth, int dstwidth) {}

that also crashed. I find this very confusing and frustrating. So I 
settle with

the work around for now.


thanks again for the help and if I can help with some debug 
information or if you

have any ideas let me know.

yours
//Lorenz




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

2009-06-15 Thread Lorenz Quack

Hi again,



you figured this out yet?



not 100% but at least now I get it to compile by following your advice:

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


[...]


Perhaps try commenting out the sse/mmx parts?



that seems to be the problem. If I comment out

#   include "scale_mmx64.c"

in "scale_mmx.c" it compiles. if I import pygame the interpreter naturally
complains about undefined symbols but as long as I don't use the transform
module it seems to work this way as well. of course this is not a solution.

For debugging purposes I tried to remove all SSE/MMX code and simply implement
empty dummy functions like this:

void filter_shrink_X_MMX(Uint8 *srcpix, Uint8 *dstpix, int height, int srcpitch,
 int dstpitch, int srcwidth, int dstwidth) {}

that also crashed. I find this very confusing and frustrating. So I settle with
the work around for now.


thanks again for the help and if I can help with some debug information or if 
you
have any ideas let me know.

yours
//Lorenz


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

2009-06-02 Thread Lorenz Quack

Hi,

René Dudfield wrote:

hrmm,

you figured this out yet?



unfortunately not.


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



I'll do that for now.



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

gcc --version

gcc (Gentoo 4.3.3-r2 p1.1, pie-10.1.5) 4.3.3


cat /proc/cpuinfo

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model   : 15
model name  : Intel(R) Core(TM)2 CPU  6600  @ 2.40GHz
stepping: 6
cpu MHz : 1596.000
cache size  : 4096 KB
physical id : 0
siblings: 2
core id : 0
cpu cores   : 2
apicid  : 0
initial apicid  : 0
fpu : yes
fpu_exception   : yes
cpuid level : 10
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall lm 
constant_tsc arch_perfmon pebs bts rep_good nopl pni monitor ds_cpl vmx est tm2 
ssse3 cx16 xtpr lahf_lm
bogomips: 4799.80
clflush size: 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor   : 1
vendor_id   : GenuineIntel
cpu family  : 6
model   : 15
model name  : Intel(R) Core(TM)2 CPU  6600  @ 2.40GHz
stepping: 6
cpu MHz : 1596.000
cache size  : 4096 KB
physical id : 0
siblings: 2
core id : 1
cpu cores   : 2
apicid  : 1
initial apicid  : 1
fpu : yes
fpu_exception   : yes
cpuid level : 10
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall lm 
constant_tsc arch_perfmon pebs bts rep_good nopl pni monitor ds_cpl vmx est tm2 
ssse3 cx16 xtpr lahf_lm
bogomips: 4799.58
clflush size: 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

That's an Intel Core 2 Duo




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/





$ touch src/transform.c
$ python setup.py build
running build
running build_py
running build_ext
building 'pygame.transform' extension
x86_64-pc-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -fPIC 
-D_REENTRANT -I/usr/X11R6/include -I/usr/include/SDL -I/usr/include/python2.6 
-c src/transform.c -o build/temp.linux-x86_64-2.6/src/transform.o
x86_64-pc-linux-gnu-gcc -pthread -shared 
build/temp.linux-x86_64-2.6/src/transform.o 
build/temp.linux-x86_64-2.6/src/rotozoom.o 
build/temp.linux-x86_64-2.6/src/scale2x.o 
build/temp.linux-x86_64-2.6/src/scale_mmx.o -L/usr/lib64 -lSDL -lpthread 
-lpython2.6 -o build/lib.linux-x86_64-2.6/pygame/transform.so



Perhaps try commenting out the sse/mmx parts?



I'll try that some other time. Right now I'm preparing to leave for a week.
Thanks again for your help.

//Lorenz





On Sun, May 31, 2009 at 1:34 AM, Lorenz Quack  wrote:

René Dudfield wrote:

On Sat, May 30, 2009 at 9:07 AM, Lorenz Quack 
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")

(1)()->None

(Pdb) s [...]

/usr/lib64/python2.6/site-packages/pygame/__init__.py(214)()

-> try: import pygame.time (Pdb) n

/usr/lib64/python2.6/site-packages/pygame/__init__.py(217)()

-> 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 ava

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

2009-06-01 Thread René Dudfield
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  wrote:
> René Dudfield wrote:
>>
>> On Sat, May 30, 2009 at 9:07 AM, Lorenz Quack 
>> 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")

 (1)()->None
>>>
>>> (Pdb) s [...]

 /usr/lib64/python2.6/site-packages/pygame/__init__.py(214)()
>>>
>>> -> try: import pygame.time (Pdb) n

 /usr/lib64/python2.6/site-packages/pygame/__init__.py(217)()
>>>
>>> -> 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 
>> 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")
 (1)()->None
>>> (Pdb) s [...]
 /usr/lib64/python2.6/site-packages/pygame/__init__.py(214)()
>>> -> try: import pygame.time (Pdb) n
 /usr/lib64/python2.6/site-packages/pygame/__init__.py(217)()
>>> -> 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)

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

2009-05-30 Thread Lorenz Quack

René Dudfield wrote:

On Sat, May 30, 2009 at 9:07 AM, Lorenz Quack  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")

(1)()->None

(Pdb) s [...]

/usr/lib64/python2.6/site-packages/pygame/__init__.py(214)()

-> try: import pygame.time (Pdb) n

/usr/lib64/python2.6/site-packages/pygame/__init__.py(217)()
-> 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  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")
>>> (1)()->None
>> (Pdb) s [...]
>>> /usr/lib64/python2.6/site-packages/pygame/__init__.py(214)()
>> -> try: import pygame.time (Pdb) n
>>> /usr/lib64/python2.6/site-packages/pygame/__init__.py(217)()
>> -> 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)]
0x7f6858c3e3be in _PyImport_LoadDynamicModule () from
/usr/lib/libpython2.6.so.1.0
(gdb) where
#0  0x7f6858c3e3be in _PyImport_LoadDynamicModule () from 
/usr/lib/libpython2.6.so.1.0

#1  0x7f6858c3bf8f in ?? () from /usr/lib/libpython2.6.so.1.0
#2  0x7f6858c3c290 in ?? () from /usr/lib/libpython2.6.so.1.0
#3  0x7f6858c3cb06 in ?? () from /usr/lib/libpython2.6.so.1.0
#4  0x7f6858c3d1d5 in PyImport_ImportModuleLevel () from
/usr/lib/libpython2.6.so.1.0
#5  0x7f6858c1b13d in ?? () from /usr/lib/libpython2.6.so.1.0
#6  0x7f6858b64ead in PyObject_Call () from /usr/lib/libpython2.6.so.1.0
#7  0x7f6858c1b4ba in PyEval_CallObjectWithKeywords () from
/usr/lib/libpython2.6.so.1.0
#8  0x7f6858c20b8f in PyEval_EvalFrameEx () from 
/usr/lib/libpython2.6.so.1.0
#9  0x7f6858c27c81 in PyEval_EvalCodeEx () from /usr/lib/libpython2.6.so.1.0
#10 0x7f6858c27e32 in PyEval_EvalCode () from /usr/lib/libpython2.6.so.1.0
#11 0x7f6858c3a217 in PyImport_ExecCodeModuleEx () from
/usr/lib/libpython2.6.so.1.0
#12 0x7f6858c3a52f in ?? () from /usr/lib/libpython2.6.so.1.0
#13 0x7f6858c3b75d in ?? () from /usr/lib/libpython2.6.so.1.0
#14 0x7f6858c3bf8f in ?? () from /usr/lib/libpython2.6.so.1.0
#15 0x7f6858c3c290 in ?? () from /usr/lib/libpython2.6.so.1.0
#16 0x

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

2009-05-29 Thread René Dudfield
On Sat, May 30, 2009 at 9:07 AM, Lorenz Quack  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")
>> (1)()->None
> (Pdb) s
> [...]
>> /usr/lib64/python2.6/site-packages/pygame/__init__.py(214)()
> -> try: import pygame.time
> (Pdb) n
>> /usr/lib64/python2.6/site-packages/pygame/__init__.py(217)()
> -> 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,