hi.
my app crashes only on mac and ios, i managed to find out where it was crashing and i reproduced the crash with this simple code:
local requestId local function networkListener( event ) if ( event.isError ) then print( "Network error: ", event.response ) else print( "Request complete" ) network.cancel( requestId ) requestId=nil end end local paramsImg = {} paramsImg.bodyType = "binary" paramsImg.response = { filename = "bug.png", baseDirectory = system.TemporaryDirectory, } requestId = network.request( "https://coronalabs.com/wp-content/uploads/2016/02/corona-labs-logo.png", "GET", networkListener, paramsImg )
if i execute the code on windows or android device it will work fine… it will download the image and put ir in temporary directory.
if i try the same on Mac or IOS device will crash when i try to remove the requestId. the image will be created but the removing part will crash the app.
if you comment the lines “network.cancel (requestId) requestId=nil” it will work fine in both devices.
can someone help me try this code in your machine if it will crash? or i’m doing something wrong removing the request. if so why it works on android/windows machines.
regards,
Carlos.
P.S.: tested with build 2016.2886 on Mac OS X El Capitan and Windows 7. devices tested: nexus 7 (android 6.01) and ipad (ios 9.3.2)
thanks again, rob.