Bug/Change in Hollywood9 wrt. LUA & object oriented implementations?

Report any Hollywood bugs here
Post Reply
nexus
Posts: 133
Joined: Sun Mar 07, 2010 11:54 am

Bug/Change in Hollywood9 wrt. LUA & object oriented implementations?

Post by nexus »

I know, I am late with upgrading Hollywood8 to Hollywood9 but as I just planned to update some of my scripts and implement some new features, I finally installed HW9 and tested some older presentation that I crated with Hollywood8.

On Linux x64, I get a "segmentation fault" and on AmigaOS4 a GrimReaper (haven't yet tested it on Windows) -- so regardless what I am doing in HW scripts, that should not happen, I guess.

I just debugged it to a code line that creates a new object. Actually, the first line in the function calls "new" from the base object:

Code: Select all

Function FriendNode:new(x,y,r,nid,feat)
  DebugPrint("In FriendNode:new 1")
  Local this=self:super():new(x,y,r,nid,feat)
  DebugPrint("In FriendNode:new 2") ; <--- is not reached as Segmentation Fault happens first.
  ...
EndFunction
I implemented this ages ago and I can imagine that I did something stupid. However, it seems to have worked since Hollywood3 (I think) and still works with latest HW8. I hope, @Andreas, u have an idea what could have gone wrong. Otherwise, I try to implement a short example program to reproduce the issue. However, that might require some research in object oriented design with lua again -- I seem to have forgotten most of the stuff :D

cheers,
Tom
nexus
Posts: 133
Joined: Sun Mar 07, 2010 11:54 am

Re: Bug/Change in Hollywood9 wrt. LUA & object oriented implementations?

Post by nexus »

I was too fast. It's not related to the inheritance as, in my script, the base node class is already drawing to a layer and, thus, the call to

Code: Select all

SetLayerStyle()
leads finally to the segmentation fault. Tomorrow, I need to dig deeper what's the exact issue and try to provide some sample program.

cheers,
Tom
nexus
Posts: 133
Joined: Sun Mar 07, 2010 11:54 am

Re: Bug/Change in Hollywood9 wrt. LUA & object oriented implementations?

Post by nexus »

airsoftsoftwair wrote: Wed Jan 05, 2022 1:45 pm Could be this issue...
I couldn't easily create a small program that reproduces the issue (at least not with just `Circle()` and `TextOut() commands). My scripts uses those to display nodes of a graph with textual identifiers. However, they are also merged with PNG images on screen.

However, the bug disappeared when I explicitly added `border=False` to the table being passed to `SetLayerStyle()` for the `TextOut()` layer.
I also tested it with `shadow=False` or using `SetFontStyle(#ANTIALIAS)` -- but the segmentation fault remained.

So, not sure if the issue that u quoted is the same?

Cheers,
Tom
nexus
Posts: 133
Joined: Sun Mar 07, 2010 11:54 am

Re: Bug/Change in Hollywood9 wrt. LUA & object oriented implementations?

Post by nexus »

airsoftsoftwair wrote: Wed Jan 05, 2022 1:45 pm Could be this issue...
In the end, it was easy to reproduce the issue:

Code: Select all

VERSION 9,0
@DISPLAY 1,{ Color = #WHITE, Title = "Test", width=800, height=600, hidden=False}

EnableLayers()
SetFont("fonts/_OpenType/cm-unicode-0.6.3a/cmunss.otf",34,{Engine=#FONTENGINE_INBUILT})
SetFontStyle(#ANTIALIAS)

s1$ = [[
{
    "tint": 80,
    "border": 1,
    "hidden": 0
}
]]
table1 = DeserializeTable(s1$)

Circle(150, 150, 50, #RED, {name="circle",hidden=True})
TextOut(160, 160, "text",{name="text", hidden=True})
SetLayerStyle("text",table1,"circle",{hidden=False})

WaitLeftMouse()
End()
So, `SetFontStyle()` must be set to `#ANTIALIAS` and `border=True` and `tint=<somevalue>` must be set to get the segmentation fault.
Means with reference to your comment in the quoted thread:

Code: Select all

 Fix: Crash when using border transparency on a non-antialiased text layer
My reported issue seems to be a different one.

Greetings,
Tom
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Bug/Change in Hollywood9 wrt. LUA & object oriented implementations?

Post by airsoftsoftwair »

Yup, I can reproduce it, will be fixed, thanks for reporting!
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Bug/Change in Hollywood9 wrt. LUA & object oriented implementations?

Post by airsoftsoftwair »

Code: Select all

- Fix: SetLayerStyle() crashed when changing border settings for an antialiased monochrome colored layer
  and applying a color filter at the same time 
Post Reply