Control icon indicating copy to clipboard operation
Control copied to clipboard

Bug with refresh when host is not found...

Open mjuarez opened this issue 14 years ago • 7 comments

I've discovered a bug where Control is unable to recover from. If an interface I'm working on has an address (let's say http://location1.com) that goes down, when I relaunch the program. Control will display a blank black screen with no ability to popup the toolbar to select a new interface.

An ideal operation would be for Control to throw up an error dialog that says, "Unable to connect to host." Then ignore trying to "reload" the interface from the address when the program is restarted.

So far the only way I can get Control working again, is by deleting the application and reinstalling it from the App Store.

mjuarez avatar Mar 10 '11 11:03 mjuarez

Even force quitting and restarting doesn't work? I've never seen a bug like that...

The steps to reproduce this are (tell me if I'm correct):

  1. Load an interface from a URL
  2. "Quit" Control (put it as a background task)
  3. Take the URL that the interface was loaded from offline
  4. "Restart" Control (make it the foreground app)
  5. Attempt to start interface

Let me know if this is what you're talking about and I'll look into it. Thanks! - Charlie

charlieroberts avatar Mar 10 '11 17:03 charlieroberts

These are the steps I did to recreate the problem.

On a laptop with Web Sharing enabled, I point my iPad to the interface at the address http://192.168.2.10/~mjuarez/controlosc/testlayout.js

If I either turn off web sharing, my IP changes, I switch to a different network, and I press a Refresh button on my interface... Either the screen will go completely black and I'm unable to bring up a toolbar, or... nothing will happen until I relaunch Control in which case it will bring up a black screen also.

Yes, I'm able to force quit the application and restart it. Is there a way Control can throw up an error message or something if it isn't able to resolve an address?

On Thu, Mar 10, 2011 at 9:40 AM, charlieroberts [email protected] wrote:

Even force quitting and restarting doesn't work? I've never seen a bug like that...

The steps to reproduce this are (tell me if I'm correct):

  1. Load an interface from a URL
  2. "Quit" Control (put it as a background task)
  3. Take the URL that the interface was loaded from offline
  4. "Restart" Control (make it the foreground app)
  5. Attempt to start interface

Let me know if this is what you're talking about and I'll look into it. Thanks! - Charlie

https://github.com/charlieroberts/Control/issues/3#comment_856809

Michael Juarez 510.394.4684

mjuarez avatar Mar 11 '11 03:03 mjuarez

OK, great. Yes, there should be a way to handle unreachable IP addresses.

charlieroberts avatar Mar 12 '11 03:03 charlieroberts

I can confirm this issue, it looks like we need an error callback on refreshInterface - This is a good place to put some jquery imo, I've toyed with getScript a little in loading interfaces straight into the DOM w/o having to eval.. I'll check this out once I get some of the 1.4 changes over to android

billieblaze avatar Mar 30 '12 04:03 billieblaze

How do you do it without eval? I guess you could use DOM methods and add a src tag instead, but I don't see what the benefit of that would be...

charlieroberts avatar Mar 30 '12 20:03 charlieroberts

In playing with interfaceManager I was able to $.getScript('interface.js', function(data){ Control.interface=data

Then I was able to use jquerys error callbacks

charlieroberts [email protected] wrote:

How do you do it without eval? I guess you could use DOM methods and add a src tag instead, but I don't see what the benefit of that would be...


Reply to this email directly or view it on GitHub: https://github.com/charlieroberts/Control/issues/3#issuecomment-4850113

billieblaze avatar Mar 31 '12 02:03 billieblaze

OK, thanks, I'll look into that.

charlieroberts avatar Apr 01 '12 09:04 charlieroberts