Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in love::graphics::opengl::Canvas::setupGrab #15

Closed
slime73 opened this issue Jan 12, 2014 · 8 comments
Closed

Crash in love::graphics::opengl::Canvas::setupGrab #15

slime73 opened this issue Jan 12, 2014 · 8 comments
Labels
bug Something isn't working

Comments

@slime73
Copy link
Member

slime73 commented Jan 12, 2014

Original report by Pavol Rusnak (Bitbucket: prusnak, GitHub: prusnak).


I was experimenting with pixel shaders feature and encountered a crash in love::graphics::opengl::Canvas::setupGrab.

Attaching main.lua and output from adb logcat.

@slime73
Copy link
Member Author

slime73 commented Jan 12, 2014

Original comment by Pavol Rusnak (Bitbucket: prusnak, GitHub: prusnak).


Crash happens also when used canvases have the same size as the main window, i.e. when one uses

width, height = love.window.getWidth(), love.window.getHeight()
c = love.graphics.newCanvas(width,height)

instead of

c = love.graphics.newCanvas(800,600)

@slime73
Copy link
Member Author

slime73 commented Jan 12, 2014

Original comment by Alex Szpakowski (Bitbucket: slime73, GitHub: slime73).


The android fork might need to get the latest changes from the GLES branch in love-experiments, I've fixed some things.

@slime73
Copy link
Member Author

slime73 commented Jan 12, 2014

Original comment by Martin Felis (Bitbucket: MartinFelis, GitHub: MartinFelis).


Unfortunately I cannot reproduce your crash. Actually I cannot even get it to run on the desktop.

I guess the problem is not related to newCanvas, instead it has something to do with the shaders. The attached main.lua (the simple newCanvas example from the Löve wiki) works on my phone and on Desktop. Can you check with this file?

Also I have updated the Löve code to the newest GLES branch in case it is related.

edit: Just re-read that the problems are not related to newCanvas. Nevertheless I cannot get your main.lua to work on Desktop.

@slime73
Copy link
Member Author

slime73 commented Jan 12, 2014

Original comment by Pavol Rusnak (Bitbucket: prusnak, GitHub: prusnak).


I encounter the same crash with your example. I furthered reduced the testcase to:

function love.load()
    canvas = love.graphics.newCanvas(100, 100)
    love.graphics.setCanvas(canvas)
end

which crashes. This code is OK:

function love.load()
    canvas = love.graphics.newCanvas(100, 100)
end

So it seems, the issue is in setCanvas not newCanvas.

The problem is the same when I use 128x128 canvas, so this is not a power-of-two issue.

@slime73
Copy link
Member Author

slime73 commented Jan 12, 2014

Original comment by Martin Felis (Bitbucket: MartinFelis, GitHub: MartinFelis).


In alpha6 (http://fysx.org/~martin/shared/love_android_sdl2_alpha6.apk) it does not crash, however I do get a OpenGL error:

#!python


W/Adreno-ES20( 7386): <core_glDiscardFramebufferEXT:3592>: GL_INVALID_ENUM

P.S.: maybe you can join the Löve irc chat?

@slime73
Copy link
Member Author

slime73 commented Jan 12, 2014

Original comment by Alex Szpakowski (Bitbucket: slime73, GitHub: slime73).


That'd be my bad.

@slime73
Copy link
Member Author

slime73 commented Jan 12, 2014

Original comment by Pavol Rusnak (Bitbucket: prusnak, GitHub: prusnak).


Commit ab51b4c fixes the issue. Thanks!

1 similar comment
@slime73
Copy link
Member Author

slime73 commented Jan 12, 2014

Original comment by Pavol Rusnak (Bitbucket: prusnak, GitHub: prusnak).


Commit ab51b4c fixes the issue. Thanks!

@slime73 slime73 closed this as completed Jan 12, 2014
@slime73 slime73 added major bug Something isn't working labels Feb 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant