I've isolated a piece of code that is actually crashing Hollywood, here is a snippet to reproduce the problem:
Code: Select all
SetDisplayAttributes({ sizeable = True })
;---------------------------------
; This snippet will cause a crash:
; *** Try to resize the window vertically and it will crash
; *** Seems that resizing horizontally is safe
;---------------------------------
Function render()
; Something to do in the interval function...
Box(Rnd(200), Rnd(200), Rnd(200)+1, Rnd(200)+1, GetRandomColor())
Flip()
EndFunction
Function resizeEvent(msg)
; Resize event received from the event handler
; If there is a vertical resize Hollywood will crash, horizontal resize seems safe
; -------------------------------
; Dump of the event message
ForEach(msg, DebugPrint)
; EndDoubleBuffer() will crash Hollywood...
DebugPrint("Crashing!!!")
EndDoubleBuffer()
; This line is reached only if there is an horizontal resize
DebugPrint("Crashed ?")
; --- In the original code here I'm doing some stuff to manipulate the display attributes
; Restart the double buffer...
BeginDoubleBuffer()
EndFunction
SetInterval(Nil, render, 1000/50)
InstallEventHandler({ SizeWindow = resizeEvent })
BeginDoubleBuffer()
SetFillStyle(#FILLCOLOR)
Repeat
WaitEvent()
Forever