Program Quits when going offline...

Discuss any general programming issues here
evil
Posts: 185
Joined: Mon Jun 14, 2010 1:38 pm

Program Quits when going offline...

Post by evil »

Hello!
I just tried the following code:

bool=IsOnline()
If bool=TRUE THEN Print ("Online") Else Print ("Offline")
waitevent

When starting, the program works correct.
But:
When I am online, before starting the code and go offline, while the program is running, then the program simply quits without any message.
I also noticed this with other Programs. For example Flipclock.
Why does this happen, and how can this be solved??

Greets

Jörg
User avatar
Allanon
Posts: 746
Joined: Sun Feb 14, 2010 7:53 pm
Location: Italy
Contact:

Re: Program Quits when going offline...

Post by Allanon »

Hi evil,
you have to put your code in a loop to check what effectively happen:

Code: Select all

Local bool = IsOnline()
If bool
   DebugPrint("You are connected!")
   DebugPrint("Now try to disconnect from Internet...")
   While bool
      bool = IsOnline()
      Wait(10)
   Wend
EndIf

DebugPrint("You are offline!")
----------------------------
[Allanon] Fabio Falcucci | GitHub (leaving) | Gitea (my new house) | My Patreon page | All my links
evil
Posts: 185
Joined: Mon Jun 14, 2010 1:38 pm

Re: Program Quits when going offline...

Post by evil »

I know, but that is not the problem.
Even if I put it into a loop. The Program quits, when I cut the internet-connection. Why??
Other Programs (for example Flip-Clock) have this problem, too.
Is there a chance to solve this??

Greeets


Jörg
User avatar
airsoftsoftwair
Posts: 5933
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Program Quits when going offline...

Post by airsoftsoftwair »

That's strange. What platform is this? Can you test it on some other platforms and see if the problem happens on all platforms or only on one?
evil
Posts: 185
Joined: Mon Jun 14, 2010 1:38 pm

Re: Program Quits when going offline...

Post by evil »

Hello!

I am using Hollywood 5.2 On Os4.1.5
On WinUAE and under Windows, it works correctly. After a latency of 2 -3 seconds (while going offline) it displays the correct boolean Value.

Other derivates cannot be testet here!

Greets

Jörg
User avatar
airsoftsoftwair
Posts: 5933
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Program Quits when going offline...

Post by airsoftsoftwair »

Looks like a problem with OS4's TCP/IP stack then. Maybe it sends all processes a CTRL-C signal when going offline. Otherwise I can't think of anything that could cause Hollywood to quit when the TCP/IP stack goes offline...
evil
Posts: 185
Joined: Mon Jun 14, 2010 1:38 pm

Re: Program Quits when going offline...

Post by evil »

Hi!
@Andreas:
You are right! It seems to be a problem with roadahow.
Even OWB and Jabberwocky quit, when I shutdown the internet-connection.
YAM AND IBrowsw dont...

GREETS

Jörg
User avatar
airsoftsoftwair
Posts: 5933
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Program Quits when going offline...

Post by airsoftsoftwair »

Please report this to Hyperion :)
User avatar
fingus
Posts: 273
Joined: Fri Sep 16, 2011 9:53 am

Re: Program Quits when going offline...

Post by fingus »

evil wrote:I know, but that is not the problem.
Even if I put it into a loop. The Program quits, when I cut the internet-connection. Why??
Other Programs (for example Flip-Clock) have this problem, too.
Is there a chance to solve this??

Greeets


Jörg
Do you mean actual Flipclock 53.1 Beta 3 on Os4depot.net?
If you mean Flipclock 1.1 forget it, it was using wget.
evil
Posts: 185
Joined: Mon Jun 14, 2010 1:38 pm

Re: Program Quits when going offline...

Post by evil »

hello!
@fingus
I tried flipclock V53.1 Beta3 and got this problem...

I also tried wget 1.9.1, and it got a Break-signal. So the old flipclock-version will have problems under os4, too.

Isn't there any workaround in hollywood for that?
Why can It get and reckon these break-signals? Is it, because hollywood-execs are commodities? In this case, it may be possible to change the codes to not be commodities??

I'll send a bug-reort to hyperion!

Greets!!

Jörg
Post Reply