It is currently Sat Mar 25, 2017 10:28 am



Welcome
Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!


Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: "Html Not Opened" error
Unread postPosted: Wed Jul 17, 2013 1:48 am 
Offline

Joined: Wed Feb 20, 2013 3:25 pm
Posts: 421
Location: Italy
Hello,

I found a very nasty bug in the interaction between the HTML engine and BASIC!.

If during the execution of a BASIC! program which uses HTML one puts the device to sleep or goes to the Android Home screen, then when coming back to the BASIC! program the error "Html Not Opened" is generated whenever the next HTML.LOAD.STRING takes place. Executing one single new HTML.OPEN is not a solution, since from this moment on any new HTML.LOAD.STRING will need a further HTML.OPEN. Furthermore, by so doing one is creating a series of nested HTML sessions and control of the HTML engine is lost, in fact it becomes impossible to exit the engine through HTML.CLOSE.

The only (very cumbersome) workaround is to catch the "Html Not Opened" error with ONERROR: and then re-RUN the program automatically, with all the overhead of passing the application state between the two runs. This seems the only way to reset the engine programmatically.

An ideal solution would have BASIC! consider HTML still open after coming back from Home or from Sleep. The second best solution would be to have a command (maybe an improved HTML.CLOSE?) which forces a shutdown of the HTML engine (including any hanging HTML sessions).

BASIC!: 1.74
Android: 4.1.2

/ Luca


Top
 Profile  
 
 Post subject: Re: "Html Not Opened" error
Unread postPosted: Wed Jul 17, 2013 11:15 pm 
Offline

Joined: Wed Oct 03, 2012 9:53 am
Posts: 2777
Location: Colorado, U.S.
Hi Luca. That's three HTML errors you have reported in rapid succession, yes? I hope they are all related!

You certainly have my attention, but I can't do anything quickly to help you. It will take some time for me to learn this part of BASIC! and Android. Maybe somebody will come to our rescue while I am studying, eh?

- Marc


Top
 Profile  
 
 Post subject: Re: "Html Not Opened" error
Unread postPosted: Thu Jul 18, 2013 5:20 am 
Offline

Joined: Wed Feb 20, 2013 3:25 pm
Posts: 421
Location: Italy
Hi Marc,

You're right, I was a little hasty in submitting bug reports. At first it seemed as if there were different bugs, then I made further experiments and I've now narrowed things down to what appears to be a single bug. That's why I deleted my initial (too hasty) bug reports and "consolidated" them into a single report (i.e. the current thread).

Sorry if I appeared to be a little pushing, but that was not my intention (I was just anxious to "publish" my findings :) ).

/ Luca


Top
 Profile  
 
 Post subject: Re: "Html Not Opened" error
Unread postPosted: Thu Jul 18, 2013 9:07 pm 
Offline

Joined: Wed Oct 03, 2012 9:53 am
Posts: 2777
Location: Colorado, U.S.
No worries, Luca. I am not complaining. Sometimes I feel a little overwhelmed, and I wish I could do more, and do it faster. Please, keep the information and ideas coming! The many members of this forum learn from it, and one of them may be able to help. Silence does not help anyone.

- Marc


Top
 Profile  
 
 Post subject: Re: "Html Not Opened" error
Unread postPosted: Wed Aug 03, 2016 5:23 pm 
Offline

Joined: Wed May 04, 2016 6:09 pm
Posts: 71
Marc-- This is still somewhat of a problem for me too but it only seems to happen right after I install a fresh apk.. It's kind of bizarre and
I am not sure if it is an Android OS issue but when I get HTML previously opened and not closed errors when I put my app into HOME mode and come out of it... The weird thing is that it only seems to do it for a couple minutes after I install the new apk and then it goes away!

BACKGROUND() still appears to act flakey too when the apk is first installed so maybe that is the real problem since I check BACKGROUND() to resume the app. I will try to see if !BACKGROUND() persists for maybe 200msec before I resume my app and see if that might solve my intermittent problem.


Top
 Profile  
 
 Post subject: Re: "Html Not Opened" error
Unread postPosted: Sat Aug 06, 2016 7:05 am 
Offline

Joined: Wed Oct 03, 2012 9:53 am
Posts: 2777
Location: Colorado, U.S.
Wow! Totally forgot this. It's on "the list" of course, for all the good that does. I've spent time on the Graphics screen transactions (and they seem to have changed in Android 6), but very little time on HTML transitions.

Thanks for the additional information, Chris, and for reminding me the problem is still out there.

Marc


Top
 Profile  
 
 Post subject: Re: "Html Not Opened" error
Unread postPosted: Mon Aug 08, 2016 4:06 pm 
Offline

Joined: Wed May 04, 2016 6:09 pm
Posts: 71
Thanks Marc! I appreciate a fix to this very much....

I think it may only be a problem with QuickAPK because I don't remember replicating it while running inside the BASIC! app.

I am not entirely sure too that I don't have some glitches in my HTML that might cause problems.

I did notice that this code seems to improve the stability quite a bit while coming out of background in html mode:

Code:
HOME
W=0:cl=clock()
DO
  PAUSE 100
If !background() then w=clock()-cl
If background() then cl=clock()
UNTIL w>500
! resume program


Top
 Profile  
 
 Post subject: Re: "Html Not Opened" error
Unread postPosted: Wed Aug 10, 2016 3:34 am 
Offline

Joined: Wed May 04, 2016 6:09 pm
Posts: 71
I am not sure why, but it seems much better now... no HTML.OPEN errors when I first install the apk...


Top
 Profile  
 
 Post subject: Re: "Html Not Opened" error
Unread postPosted: Sat Aug 13, 2016 6:13 pm 
Offline

Joined: Wed May 04, 2016 6:09 pm
Posts: 71
No... i guess it still is a problem.... seems to happen more frequently though if I turn of the Animation scales on my phone under the developer options... Also I put a bigger gap between the HTML.CLOSE and HTML.OPEN commands but unfortunately the problem still happens intermittently.

I think I am ok though with cold starting my app each time... doesn't take terribly long to launch.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
suspicion-preferred