Some brush library functions crash with palette brushes
Posted: Thu Mar 13, 2025 6:17 pm
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.
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