Some brush library functions crash with palette brushes

Report any Hollywood bugs here
Post Reply
User avatar
jPV
Posts: 734
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Some brush library functions crash with palette brushes

Post by jPV »

I haven't tried all similar functions, so it might affect to others too, but at least PerspectiveDistortBrush() and PolarDistortBrush() crash the whole Hollywood application if I use the "smooth" option with palette based images. Functions do work fine if that option isn't enabled.

I've tested it on MorphOS and there's a big hit in the debug log and the application window meditates.

Code: Select all

CreateBrush(1, 640, 480, #BLUE, {Palette=#PALETTE_AGA})
NPrint("Perspective no smoothing")
PerspectiveDistortBrush(1, 100, 0, 400, 0, 500, 300, 0, 300, False) ; Doesn't crash
WaitLeftMouse()
CreateBrush(1, 640, 480, #BLUE, {Palette=#PALETTE_AGA})
NPrint("Perspective smoothing")
PerspectiveDistortBrush(1, 100, 0, 400, 0, 500, 300, 0, 300, True)  ; Crashes

CreateBrush(1, 640, 480, #BLUE, {Palette=#PALETTE_AGA})
NPrint("Polar no smoothing")
PolarDistortBrush(1, 320, 0, 320, 240, -180, 180, False) ; Doesn't crash
WaitLeftMouse()
NPrint("Polar smoothing")
PolarDistortBrush(1, 320, 0, 320, 240, -180, 180, True) ; Crashes
User avatar
airsoftsoftwair
Posts: 5856
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Some brush library functions crash with palette brushes

Post by airsoftsoftwair »

Hmm, with Hollywood 10.0 only PolarDistortBrush() crashes here, with the latest Hollywood master I don't get any crashes at all so it might have been fixed already but I'm not sure. I'll check.
User avatar
airsoftsoftwair
Posts: 5856
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Some brush library functions crash with palette brushes

Post by airsoftsoftwair »

Actually, memory got trashed here which is why I couldn't reproduce it first. But it's fixed now.

Code: Select all

- Fix: PerspectiveDistortBrush(), ArcDistortBrush(), PolarDistortBrush() and BarrelDistortBrush() trashed
  memory when used with a palette brush and the "smooth" argument was set to TRUE; the smooth argument is
  ignored now for palette brushes which is the same behaviour that other functions like ScaleBrush() and
  RotateBrush() use because antialias interpolation is only supported for RGB brushes
Post Reply