corona
corona copied to clipboard
MacOS Simulator: GPU Hang
Describe the bug The following code produces the message 'GPU hang occurred, CoreAnalytics returned false' before causing the simulator to crash on my machine (produced in an attempt to reproduce an issue which is causing the simulator to hard crash my MacBook)
To Reproduce Steps to reproduce the behavior:
- Run the following code:
local group = display.newGroup()
local c = display.newCircle(group,0,0,400)
c:setFillColor(1,0,0)
local topClear=display.newRect(0, 0, display.contentWidth, display.contentHeight/2)
topClear:setFillColor(0,1,1)
local dot = display.newImage("dot.png")
dot:setFillColor(0,1,1)
dot.blendMode = "multiply"
dot.alpha = 0.4
dot:scale(4,3)
local topTexture, bottomTexture, sharedTexture
function create()
sharedTexture = graphics.newTexture( { type="canvas", width=display.contentWidth, height=display.contentHeight/2 } )
topTexture = graphics.newTexture( { type="canvas", width=display.contentWidth, height=display.contentHeight/2 } )
bottomTexture = graphics.newTexture( { type="canvas", width=display.contentWidth, height=display.contentHeight/2 } )
local topImg = display.newImageRect(
sharedTexture.filename,
sharedTexture.baseDir,
display.contentWidth,
display.contentHeight/2
)
topImg.x = display.contentCenterX
topImg.y = display.contentHeight/4
topImg.xScale=-1
topImg.yScale=-1
local bottomImg = display.newImageRect(
sharedTexture.filename,
sharedTexture.baseDir,
display.contentWidth,
display.contentHeight/2
)
bottomImg.x = display.contentCenterX
bottomImg.y = display.contentHeight*3/4
local topImg = display.newImageRect(
topTexture.filename,
topTexture.baseDir,
display.contentWidth,
display.contentHeight/2
)
topImg.x = display.contentCenterX
topImg.y = display.contentHeight/4
local bottomImg = display.newImageRect(
bottomTexture.filename,
bottomTexture.baseDir,
display.contentWidth,
display.contentHeight/2
)
bottomImg.x = display.contentCenterX
bottomImg.y = display.contentHeight*3/4
end
create()
Runtime:addEventListener("enterFrame", function()
sharedTexture:setBackground( 0, 0, 1 )
sharedTexture:draw(topClear)
sharedTexture:draw(c)
sharedTexture:invalidate()
bottomTexture:draw(topClear)
bottomTexture:draw(c)
bottomTexture:draw(dot)
bottomTexture:invalidate()
topTexture:draw(c)
topTexture:draw(dot)
topTexture:invalidate()
end)
- Wait for crash Target platform and where build was made:
- Device: MacOS Simulator 2022.3674
- OS: MacOS 12.4
Here's what the above code looks like for me in the simulator
The image asset used
Adding the line
topClear.alpha = 0.2
after the setBackground
call cause the above code to crash my 2018 MacBook Pro
The code above does not crash on my M1 Mac Mini Machine, Does this occur for people on the newest MacOS and Corona Sim?
I've tested the code on M1 Mac, with MacOS Ventura 13.3 and Corona Sim v.2023.3688 and it doesn't crash.
Crashes for me on MBP 2020, Intel device. macOS Ventura 13.3.1. This seems to be an Intel-related issue.
GPU hang occurred, CoreAnalytics returned false
GPU hang occurred, CoreAnalytics returned false
[Finished in 10.5s with exit code -6]