[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pygame] bug (and fix?) in mixer.c
Hi Pete,
I've updated my CVS snapshot and am glad
to report that the problem is fixed!
In a W2K shell :
C:\games\solarwolf-1.0\python.exe solarwolf.py
with the old "mixer.pyd" I get a "crash" on exit,
with the new one it exits cleanly.
> ... i must admit for "struggling" through learning
> everything you managed to do a good job of coming up with
> a problem.
I have been programming professionally in C for well
over ten years, but I'm new to Python, SDL, PyGame,
and Open-Source in general.
I think it was just luck. In my experience, being able to
consistantly reproduce a bug is essential.
Maybe my Win2K system has a quirky combination of hardware/
software :
PIII-667Mhz, 384Mb RAM, Abit-SL6 (i815 chipset).
On-board sound, nVidia TNT2 M64 Pro AGP graphics card.
Seagate ST330630A HD, LG DVD-ROM, Samsung CD-R/RW, a floppy.
KNE120TX 10/100 Network adapter.
QuickShot USB StrikePad 4-axis, 8-button gamepad.
Windows 2000, Service Pack 2
I'm using Python 2.0.1 Final.
I'm compiling SDL, SDL_mixer, etc. from CVS using MSVC6.0
but I'm using "optimize for size" (not speed) and zlib,
libpng-1.0 and jpeg-6b are seperate DLLs. Also I have enabled
inlining for MSVC6.0 (think this is in the latest CVS)
jpeg.dll 108K
libpng1.dll 96K
SDL.dll 184K 216K
SDL_image.dll 28K 136K
SDL_mixer.dll 136K 232K
SDL_ttf.dll 64K 64K
SMPEG.dll 180K 196K
zlib.dll 52K
------------------------------
848K 844K
Don't know why I am doing this exactly!
cheers,
John.
----- Original Message -----
From: "Pete Shinners" <pete@visionart.com>
To: <pygame-users@seul.org>
Sent: 31 July 2001 18:25
Subject: Re: [pygame] bug (and fix?) in mixer.c
> > As I understand it, PyImport_ImportModule(...) returns a new
> > reference, PyModule_AddObject(...) *steals a reference* and
> > Py_DECREF(...) is freeing up memory that is actually in use!
> >
> > Let me know if this is correct as I would like
> > to get on with using PyGame for something fun,
>
> hello john, i must admit for "struggling" through learning
> everything you managed to do a good job of coming up with
> a problem.
>
> i doublechecked the AddObject code, and you are correct,
> it does "borrow/steal" the object reference, so there is
> no need to DECREF it.
>
> i've got it checked into CVS, so you should just need to
> update and see if that fixed it. i've not encountered your
> crashing problem, so it will be up to you to see if this
> fixes the problem or not. :-/
>
> actually, i'm hoping many people can try this out, even
> if it wasn't crashing for you before, i'd like to know it
> is correct for everyone. it all tests out ok for me on NT.
>
>
> ____________________________________
> pygame mailing list
> pygame-users@seul.org
> http://pygame.seul.org
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org