[Ohrrpgce] [Bug 701] New: Cloned plot-sprites will crash game.exe if passed new frame values.

Ralph Versteegen teeemcee at gmail.com
Tue Jan 6 05:23:40 PST 2009


2009/1/6 James Paige <Bob at hamsterrepublic.com>:
> On Tue, Jan 06, 2009 at 12:53:48PM +1300, Ralph Versteegen wrote:
>> 2009/1/1 James Paige <Bob at hamsterrepublic.com>:
>> > On Wed, Dec 31, 2008 at 03:41:37AM +1300, Ralph Versteegen wrote:
>> >> 2008/12/29 <bugzilla-daemon at karnov.dreamhost.com>
>> >> >
>> >> > http://rpg.hamsterrepublic.com/bugzilla/show_bug.cgi?id=701
>> >> >
>> >> >           Summary: Cloned plot-sprites will crash game.exe if passed new
>> >> >                    frame values.
>> >> >           Product: OHRRPGCE
>> >> >           Version: Nigtly WIP Builds (Ypsiliform)
>> >> >          Platform: PC
>> >> >        OS/Version: All
>> >> >            Status: NEW
>> >> >          Severity: normal
>> >> >          Priority: P3
>> >> >         Component: GAME.EXE (General)
>> >> >        AssignedTo: ohrrpgce at lists.motherhamster.org
>> >> >        ReportedBy: onemrvar at gmail.com
>> >> >
>> >> >
>> >> > A clone sprite spawned from a plot sprite will cause errors if passed or
>> >> > inheriting a frame argument greater than zero, regardless of the sprite type
>> >> > (heroes, walkabouts, borders, you name it).
>> >> >
>> >> > Best case scenario, the clone fails to appear. Worst case scenario, game.exe
>> >> > will abruptly close... no error, no warning. The original and/or the clone
>> >> > plot-sprite must be visible to trigger the crash, sdl-debug.exe being the only
>> >> > version that suppresses this behavior.
>> >> >
>> >> > Load Sprite and Replace Sprite commands do not suffer this problem, unless the
>> >> > passed frame argument is out of bounds (eg. pass an enemy sprite a frame
>> >> > argument of 1, and game.exe will surely crash... even sdl-debug.exe).
>> >> >
>> >> > Here's a nice little code snippet for testing:
>> >> >
>> >> >    variable (mysprite)
>> >> >
>> >> >    mysprite:= loadbordersprite (0)
>> >> >    set sprite frame (mysprite, 1)
>> >> >
>> >> >    mysprite:= clone sprite (mysprite)
>> >> >    set sprite visible (mysprite, on)
>> >> >    place sprite (mysprite, 50, 50)
>> >>
>> >> Dear Mike,
>> >>
>> >> Told you so. A few times.
>> >
>> > This will be fixed when I re-do the plotsprite system to use slices.
>> > Everything is ready (except for me having programming time ;)
>> >
>> >
>> > ---
>> > James
>>
>> Great!! I'm looking forward to it.
>>
>> Of course, this bug doesn't need any rewriting to fix.
>
> If you know a quick fix for this, I would go ahead and check it in,
> since my OHR programming time has been woefully in short supply lately
> :(

Maybe I should concentrate on bugs for a while (since I'm not focused
on any new features at the moment anyway), there are a number of
easily fixed ones piling up. But I'm gone for the next few days
again...

>
> By the way, does anybody have some test code using plotsprites that I
> could use for regression-testing when I rewrite plotsprites as slices?

Not here.
>
> ---
> James Paige



More information about the Ohrrpgce mailing list