display.save crash on Android device

Anyone have an idea why display.save would cause a crash on an Android device. In the first code below, the app crashes. When I bypass display.save and just use captureBounds with the true parameter (saving to photolibrary), it works. I do have the required WRITE_EXTERNAL_STORAGE permission in the build settings. I would have thought both ways should be okay:

1 (crashes).

capture = display.captureBounds( screenBounds, false ) display.save( capture, { filename="drawpic.png", baseDir=system.TemporaryDirectory } )
  1. (works)

    capture = display.captureBounds( screenBounds, true )