[GEM-dev] [ pd-gem-Bugs-3007373 ] pix_resize crashes PD if a dimension is set before rendering

SourceForge.net noreply at sourceforge.net
Wed May 26 18:11:58 CEST 2010


Bugs item #3007373, was opened at 2010-05-26 15:59
Message generated for change (Comment added) made by zmoelnig
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=507079&aid=3007373&group_id=64325

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Pixes (pix_ objects)
>Group: None
Status: Pending
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Thomas O Fredericks (mrtof)
Assigned to: Nobody/Anonymous (nobody)
Summary: pix_resize crashes PD if a dimension is set before rendering

Initial Comment:
pix_resize crashes PD once the gemwin is created if a "dimen 25 25" was sent to the object before the gemwin was created.
This also happens if the dimensions are set as arguments.

----------------------------------------------------------------------

>Comment By: IOhannes m zmlnig (zmoelnig)
Date: 2010-05-26 18:11

Message:
ah, i finally managed to reproduce.
the problem seems to happen only with greyscale images.

i suspect that the internally used gluScaleImage() needs a bit more memory
allocated than just the target image.

a simple workaround is, to do the first resize to a bigger image (e.g.
only downsize once the rendering has started); the image will not free the
allocated space if the new size fits into the old memory, thus giving you
enough headroom.

i committed a fix to svn/trunk with revision #3358
i committed a fix to svn/branches/0.92 with revision #3360

this "fix" assumes that 4 bytes per pixel are enough.(which is an
assumption on my side)



----------------------------------------------------------------------

Comment By: IOhannes m zmlnig (zmoelnig)
Date: 2010-05-26 17:00

Message:
unable to reproduce
i tried with both Gem-0.92 (svn/branches/0.92) and svn/trunk an there ar
no crashes.

please provide detailed information about your system (versions!) and a
simple example patch that triggers the problem. 

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=507079&aid=3007373&group_id=64325




More information about the GEM-dev mailing list