LC8 (DP14) Browser crashes on IOS 9.2.1

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
mimu
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 76
Joined: Tue Mar 05, 2013 7:00 pm
Contact:

LC8 (DP14) Browser crashes on IOS 9.2.1

Post by mimu »

XCODE 7.2

When i build a simpel stack, it crashes immediately when navigating to the card with the browser widget included.

If i check " Build 32 bit slice only" inside the standalone Application settings
the problem disappears.

What could be the problem?
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: LC8 (DP14) Browser crashes on IOS 9.2.1

Post by Klaus »

Hi mimuBUSkYgY,
mimuBUSkYgY wrote:What could be the problem?
probably the fact that LC 8 is still an early developer preview! 8)
Maybe the 64bit implemenation is not yet ready for primetime?
Please consider to bug report this here: http://quality.runrev.com


Best

Klaus
mimu
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 76
Joined: Tue Mar 05, 2013 7:00 pm
Contact:

Re: LC8 (DP14) Browser crashes on IOS 9.2.1

Post by mimu »

Thanks Klaus for your answer,

can you or somebody else confirm this error ?

If so, we should add this to the bugtracker
quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm

Re: LC8 (DP14) Browser crashes on IOS 9.2.1

Post by quailcreek »

Hi mimuBUSkYgY,
What code do you have on the card that has the browser?
Tom
MacBook Pro OS Mojave 10.14
mimu
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 76
Joined: Tue Mar 05, 2013 7:00 pm
Contact:

Re: LC8 (DP14) Browser crashes on IOS 9.2.1

Post by mimu »

I tried it with this minimum code

card script:
on openCard
set the URL of widget "myBrowser" to "http://www.google.com"
end openCard

or

on openCard
launch url "http://www.google.com" in widget " myBrowser"
end openCard

stackscript
on preOpenStack
set the fullscreenmode of this stack to "exactfit"
end preOpenStack
quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm

Re: LC8 (DP14) Browser crashes on IOS 9.2.1

Post by quailcreek »

Maybe try browserFrameDocumentLoadFailed to see what the error is.

Also, put this in your stack script to see if you can catch the error.

Code: Select all

on errorDialog pError
   if environment() is "mobile" then answer pError
   --   put pError
   pass errorDialog
end errorDialog
Tom
MacBook Pro OS Mojave 10.14
mimu
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 76
Joined: Tue Mar 05, 2013 7:00 pm
Contact:

Re: LC8 (DP14) Browser crashes on IOS 9.2.1

Post by mimu »

Thank you Tom,

but no error is catched.

Has anybody the same error, or i am the only one?
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: LC8 (DP14) Browser crashes on IOS 9.2.1

Post by Klaus »

Hi mimuBUSkYgY,

Code: Select all

on openCard
  set the URL of widget "myBrowser" to "http://www.google.com"
end openCard
correct syntax!

Code: Select all

on openCard
 launch url "http://www.google.com" in widget " myBrowser"
end openCard
Completely WRONG syntax!
Pleays ALWAYS refer to the dictionary when in doubt! 8)

OK, let's see:
1. Did you select the browswer widget in the standalone builder settings?
Unfortunately widgets are currently not automatically added to a standalone!

2. If yes, can you try this with a button?
I mean:

Code: Select all

on mouseup
  set the URL of widget "myBrowser" to "http://www.google.com"
end mouseup
Maybe widgets are loaded the same way as externals and are not available immediately "on pre-/openstack/card"?


Best

Klaus
mimu
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 76
Joined: Tue Mar 05, 2013 7:00 pm
Contact:

Re: LC8 (DP14) Browser crashes on IOS 9.2.1

Post by mimu »

Hello Klaus,

from the docs:
userAgent

// Set custom User-Agent header. The remote web server may be configured to deliver custom content for browsers using this User-Agent.
set the userAgent of widget "myBrowser" to "myAppEmbeddedBrowser"
launch url "http://myexampleserver.com/content.html" in widget "myBrowser"

(i tried different User Agentsettings)

but my first attempt was using the
set the URL of widget "myBrowser" to "http://www.google.com"
syntax

i even already tried set url inside a button.

i 've included the browser widget.

Everything works till i uncheck the the checkbox " Build 32 bit slice only" inside the build settings.
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: LC8 (DP14) Browser crashes on IOS 9.2.1

Post by Klaus »

OK, then this might be the culprit, as I wrote in my first answer.
Please consider to report it here: http://quality.livecode.com
mimu
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 76
Joined: Tue Mar 05, 2013 7:00 pm
Contact:

Re: LC8 (DP14) Browser crashes on IOS 9.2.1

Post by mimu »

Hi everybody,
did anybody try a simple stack with a browser widget
build on OS X 10.11 with Xcode 7.2.1 or 7.2 for iOS ?

Does the browser widget work on iOS 9.2.1 without checking "Build 32 bit slice only"?

On simulator everything is fine.
or is perhaps my system environment screwed up?
quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm

Re: LC8 (DP14) Browser crashes on IOS 9.2.1

Post by quailcreek »

Hi mimuBUSkYgY,
Crashes for me on the device too. Immediate and hard...

Code: Select all

set the URL of widget "theBrowser" to "https://www.google.com"
Put this in the script of the card where your browser is. See if you get the same error I do in the sim. Both browserDocumentLoadFailed and browserNavigateFailed throw an error.

Code: Select all

on browserDocumentLoadFailed pUrl, pError
   answer "browserDocumentLoadFailed" && pError
end browserDocumentLoadFailed

on browserFrameDocumentLoadFailed pUrl, pError
   answer "browserFrameDocumentLoadFailed" && pError
end browserFrameDocumentLoadFailed

on browserNavigateFailed pUrl, pError
   answer "browserNavigateFailed" && pError
end browserNavigateFailed
Have you reported it yet?
Tom
MacBook Pro OS Mojave 10.14
mimu
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 76
Joined: Tue Mar 05, 2013 7:00 pm
Contact:

Re: LC8 (DP14) Browser crashes on IOS 9.2.1

Post by mimu »

Hello quail creek,

excuse me for the late answer, i was a couple of days out of office.

After inserting the error detection code i get this in simulator:

browser document load failed NSURLErrorDomain error -999
but the page loads fine

But the real problem is, i don't get any error on the iphone when i navigate to the card with the browser,
the app dies immediately.

I' am still not sure if the error has something to to with a misconfiguration or if there are more people which get this error
using the browser widget on a real device.
quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm

Re: LC8 (DP14) Browser crashes on IOS 9.2.1

Post by quailcreek »

It's been reported as a bug already.

http://quality.livecode.com/show_bug.cgi?id=16357
Tom
MacBook Pro OS Mojave 10.14
Post Reply