Page 1 of 1

Crash mobileControlDelete

Posted: Tue Feb 24, 2015 9:49 am
by ChrisMukrow
When calling iphoneControlDelete the app crashes on the Simulator. This code worked until LC 6.7 and 7.0. Am I doing something wrong or is this a bug?

Code: Select all

local sVideoID

on videoplayer
   
   if "ioscontrol" is among the lines of iphoneControls() then
      controlDelete
   end if
   
   iphoneControlCreate "player", "ioscontrol"
      put the result into sVideoID
   
   // Set the basic properties including visibility, rectangle and video file path
   iphoneControlSet "ioscontrol", "filename", specialFolderPath("engine") & "/Video Namibia app.m4v"
   iphoneControlSet "ioscontrol", "preserveAspect", true
   iphoneControlSet "ioscontrol", "showController", true
   iphoneControlSet "ioscontrol", "visible", true
   iphoneControlSet "ioscontrol", "fullscreen", true
   //iphoneControlSet "ioscontrol", "rect", "000,115,1024,570"
   
   // Start playing the video
   iphoneControlDo "ioscontrol", "play"
end videoplayer

on playerFinished
   controlDelete
end playerFinished

on playerLeaveFullscreen
   controlDelete
end playerLeaveFullscreen

on controlDelete
   // Delete the control
      iphoneControlDelete sVideoID
end controlDelete
And via this way it also crashes:

Code: Select all

iphoneControlDelete "ioscontrol"
Thanks,
Chris

Re: Crash mobileControlDelete

Posted: Tue Feb 24, 2015 10:20 am
by Dixie
How about using the ID given to the control when you created it, as in...

Code: Select all

iphoneControlDelete sVideoID

Re: Crash mobileControlDelete

Posted: Tue Feb 24, 2015 10:29 am
by ChrisMukrow
Thanks for your help Dixie, but the same thing happens :(

Re: Crash mobileControlDelete

Posted: Tue Feb 24, 2015 8:17 pm
by Simon
This is interesting as there is also a crash related to the new Cef browser.
I wonder if they are related.
Chris, If you can make a small stack that shows the problem repeatedly you should post it to http://quality.runrev.com/.

Simon

Re: Crash mobileControlDelete

Posted: Wed Feb 25, 2015 1:41 pm
by ChrisMukrow
Thanks for your reply Simon, you can find the bug report here: http://quality.runrev.com/show_bug.cgi?id=14669

Re: Crash mobileControlDelete

Posted: Wed Feb 25, 2015 3:48 pm
by Simon
Hi Chris,
Good news, it's already "Awaiting Build", means it will be in the next release. But they say there is a release today it might have missed that.

Simon

Re: Crash mobileControlDelete

Posted: Wed Feb 25, 2015 4:07 pm
by Klaus
Hi all,

I always keep an eye on this: http://downloads.livecode.com/livecode/ :D


Best

Klaus