_fill_gradient_linear crashes Airmanager

Discuss suspected bugs with other users and Sim Innovations Staff

Moderators: russ, Ralph

Message
Author
Detlef
Posts: 304
Joined: Mon Nov 16, 2020 9:43 am
Location: Bavaria

_fill_gradient_linear crashes Airmanager

#1 Post by Detlef »

Hello,

I just saw I am not the only one, who encountered this problem. But I am on a Windows 10 PC here. Still it took me almost a day to shrink my instrument down to just these lines, to find the problem. This code works if started as an instrument only, but it crashes AM without any error message, if started as part of a panel:

Code: Select all

  local h  
  h = canvas_add(255, 29, 100, 120, function()
    _rect(0, 0, 30, 46, 15)
    -- _fill("green")
    _fill_gradient_linear(0, 10, 30, 40, "#ffffffff", "#606060ff")
  end)
If the _fill_gradient_linear() call is removed and _fill("green") is used, everything works.

I think this is an AM fault.

Thank you
Detlef

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: _fill_gradient_linear crashes Airmanager

#2 Post by Sling »

What version of AM? I have an instrument that uses this in a panel and haven’t noticed anything. Perhaps I need to specifically check on this.

User avatar
Keith Baxter
Posts: 4674
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: _fill_gradient_linear crashes Airmanager

#3 Post by Keith Baxter »

Hi,

I can confirm both the OP's code and this code crashes in AM4.1.5 Cannot test in the AM4.2 (beta 6)

Code: Select all

  h = canvas_add(255, 29, 100, 120, function()
    _rect(0, 0, 30, 46, 15)
    -- _fill("green")
    _fill_gradient_linear(0, 10, 30, 40, "#ffffffff", "#606060ff")
  end)
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

Detlef
Posts: 304
Joined: Mon Nov 16, 2020 9:43 am
Location: Bavaria

Re: _fill_gradient_linear crashes Airmanager

#4 Post by Detlef »

Hi,

I use AM for PC Homeuse, version 4.1.5. By the way, _fill_gradient_radial() also has problems. This also causes a crash:

_ellipse(15, 12, 14, 12)
_fill_gradient_radial(5+dx, 6+dy, 3, 40, "#f0f0f0ff", "#a0a0a0ff")

Detlef

User avatar
Keith Baxter
Posts: 4674
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: _fill_gradient_linear crashes Airmanager

#5 Post by Keith Baxter »

Deleted post, sorry
I was not cool. Will take up the issue via PM
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: _fill_gradient_linear crashes Airmanager

#6 Post by Sling »

As I suspected I have no issue with my instrument. Only difference I can see is the use of RGB v RGBA. Perhaps try that to see if that narrows it down.

User avatar
Keith Baxter
Posts: 4674
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: _fill_gradient_linear crashes Airmanager

#7 Post by Keith Baxter »

Sling wrote: Mon Nov 28, 2022 8:01 am As I suspected I have no issue with my instrument. Only difference I can see is the use of RGB v RGBA. Perhaps try that to see if that narrows it down.
Tony RGB or RGBA makes no difference. I still get CTD even if I use "red" and "blue"



Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
Corjan
Posts: 2936
Joined: Thu Nov 19, 2015 9:04 am

Re: _fill_gradient_linear crashes Airmanager

#8 Post by Corjan »

Hi,


If I remember, it was a bug in the DirectX and Metal backends.
DirectX only when using click through.

OpenGL should work fine.


Corjan

User avatar
Keith Baxter
Posts: 4674
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: _fill_gradient_linear crashes Airmanager

#9 Post by Keith Baxter »

Corjan wrote: Mon Nov 28, 2022 9:05 am Hi,


If I remember, it was a bug in the DirectX and Metal backends.
DirectX only when using click through.

OpenGL should work fine.


Corjan
Corjan,

The above is standard windows 10. using OpenGL. No click through. Only CTD when added to a panel. Works 100% in create/edit

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
Corjan
Posts: 2936
Joined: Thu Nov 19, 2015 9:04 am

Re: _fill_gradient_linear crashes Airmanager

#10 Post by Corjan »

Hi,


Just tested it here, and it only crashes for me in DirectX without click through.

But anyways, the bug has been fixed, and it will be deployed both as hotfix for 4.1 and will be part of 4.2.


Corjan

Post Reply