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

Create issue
Issue #14 resolved
Pavol Rusnak created an issue

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.

Comments (8)

  1. Pavol Rusnak reporter

    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 =,height)

    instead of

    c =,600)
  2. Alex Szpakowski

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

  3. Martin Felis repo owner

    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.

  4. Pavol Rusnak reporter

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

    function love.load()
        canvas =, 100)

    which crashes. This code is OK:

    function love.load()
        canvas =, 100)

    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.

  5. Log in to comment