Non Responsive Application after update complete - WeOnlyDo Discussion board

Non Responsive Application after update complete (General questions)

by Rik Arpin, Wednesday, April 02, 2008, 09:22 (6079 days ago)

Due to the architecture of our application, we are using wodAppUpdate in an external application to update the required files in our application. This runs the update process and then starts the application (which is comprised of several applications running side by side).

We are experiencing a weird issue where this update application completes the update but then continues running instead of closing down. It eventually goes to a non-responsive state and closes shortly afterwards. This results in the application lingering around after it has done all its tasks in a state where we canot control it.

We are using blocking to control the flow of the update and as yet we have not managed to get it to restart iteself, irrespective of settings. We have also trying using non-blocking, with the same results. We have also tried forcing a restart, which we have not been able to get working.

The application is coded in VB6 - are there any known issues? We have implemented a simple application as a test to see if we could get around these problems but each one has the same problem. We have implemented using both event and notification interfaces with the same results.

The test application we have literally runs the wodAppUpdate methods so we feel that the application 'hang' at the end can only be attributed to wodAppUpdate.

Any help or advice would be appreciated.


Rik Arpino
Print Control Software

Re: Non Responsive Application after update comple

by woddrazen, Wednesday, April 02, 2008, 10:13 (6079 days ago) @ Rik Arpin

Hi Rik,

Before we go deep in your problem. Did you try to make update with our samples? You can find it in component Samples folder.

What version of wodAppUpdate you are using? You can check version in wodAppUpdate Version Property.

To terminate wodAppUpdate you can use in VB6: Set app1 = Nothing

If all is set properly wodAppUpdate should stop running when update is done. Not sure why you receive such issue.

Let us know how it goes.


Regards,
Drazen

Re: Non Responsive Application after update comple

by Rik Arpino, Wednesday, April 02, 2008, 10:29 (6079 days ago) @ woddrazen

Hi Drazen,

wodAppUp.dll = 1.2.9.77

Using COM interface, testing on Windows XP SP2

Been through examples, cant really see any major differences.

Here is the simple test app we have been using to diagnose:

Calling code:

[code]

Dim updater As New Core
updater.Start http://server/path/updates.txt

[/code]

Core Class:

[code]
Option Explicit

Private WithEvents updater As wodAppUpdateCom

Private Sub Logit(Optional Text As String = )

Dim fh As Long

fh = FreeFile

If Len(Text) = 0 Then
Open App.Path & init.log For Output As #fh
Text = -----------------------Start Init Logging-----------------------
Else
Open App.Path & init.log For Append As #fh
End If

Print #fh, Format(Now, yyyy-MM-dd HH:mm:ss ) & - & Text

Close fh

End Sub

Private Sub Class_Initialize()
Set updater = New wodAppUpdateCom
updater.Blocking = True
updater.LicenseKey = xxxxxxx
End Sub

Public Sub Start(URL As String)

Logit
Logit Check Called...

updater.Check URL, False

Logit End!

End

End Sub

Private Sub updater_CheckDone(ByVal NewFiles As Long, ByVal ErrorCode As Long, ByVal ErrorText As String)

If ErrorCode = 0 Then
Logit Check Done - & NewFiles & New Files Found
Logit Download Called...
updater.Download
Else
Logit Error with Check : & ErrorText
End If

End Sub

Private Sub updater_CloseApp()
Logit Close App
End
End Sub

Private Sub updater_DownloadDone(ByVal ErrorCode As Long, ByVal ErrorText As String)

If ErrorCode = 0 Then
Logit Download Done
Logit Update Started...
updater.Update
Else
Logit Error with Download : & ErrorText
End If

End Sub

Private Sub updater_FileDone(ByVal File As WODAPPUPDATECOMLib.IUpdFile, ByVal ErrorCode As Long, ByVal ErrorText As String)

If ErrorCode = 0 Then
Logit File Downloaded : & File.Name & , & File.NewVersion
Else
Logit Error with File Download : & ErrorText
End If

End Sub

Private Sub updater_FileStart(ByVal File As WODAPPUPDATECOMLib.IUpdFile)

Logit Starting Download of & File.Name & ...

End Sub

Private Sub updater_PrevDetected()

Logit Previous Downloads Detected...
Logit Update Called...
updater.Update

End Sub

Private Sub updater_UpdateDone(ByVal ErrorCode As Long, ByVal ErrorText As String)

If ErrorCode = 0 Then
Logit Update Complete!
Else
Logit Error with Update : & ErrorText
End If

End Sub

[/code]

After we see the End! message in log the application is still running, eventhough this is the last line of code that can be executed.

I would be interested if you could recreate the same problem.

Regards,


Rik

Re: Non Responsive Application after update comple

by Rik Arpino, Wednesday, April 02, 2008, 10:30 (6079 days ago) @ Rik Arpino

Also, we have also tried to set the AppUpdate component to nothing with the same results.

Regards,


Rik

Re: Non Responsive Application after update comple

by woddrazen, Wednesday, April 02, 2008, 12:51 (6079 days ago) @ Rik Arpino

Rik,


Your code works for me without any issue. I have test it with our configuration file from our sample and it works. File is updated as expected.

This is URL I'm using in Check Method in my sample:

http://www.weonlydo.com/AppUpdate/test/update.php

Can we maybe connect to your configuration file? You can send your private information to techsupport@weonlydo.com


Drazen

Re: Non Responsive Application after update comple

by woddrazen, Wednesday, April 02, 2008, 13:19 (6079 days ago) @ woddrazen

Rik,


… if you want to restart your application, you can set ForceRestart Property to True.

More help about ForceRestart Property you can find here:
http://www.weonlydo.com/AppUpdate/Help/wodAppUpdateLib~wodAppUpdate~ForceRestart.html


Drazen

Re: Non Responsive Application after update comple

by Rik Arpino, Wednesday, April 02, 2008, 13:24 (6079 days ago) @ woddrazen

This must be tied with my config file. I will experiment and come back to you - I dont get the same problem using your file which is weird since my config file is very simple and locally hosted!!!

I will let you know the outcome.

Many Thanks,


Rik

Re: Non Responsive Application after update comple

by Rik Arpino, Wednesday, April 02, 2008, 13:50 (6079 days ago) @ Rik Arpino

This problem seems to have something to do with IIS. I moved the config files to our webserver (Apache on Linux) and the problem disappears.

Unfortunately our test rig mimics the way our system uses the downloads - we download an update package from our website to an internal IIS webserver, which then hosts the config file and components for wodAppUpdate (some installations are 20K+ workstations, this saves our customers gigs of bandwidth).

If anybody has any ideas of what could be causing this problem, please let me know.

In the meantime I will keep looking into the problem.

Many Thanks,


Rik

Re: Non Responsive Application after update comple

by woddrazen, Wednesday, April 02, 2008, 14:17 (6079 days ago) @ Rik Arpino

Rik,


It works for me on IIS also. Maybe you are having issue with permissions in IIS.

Can you please check if value in URL line in your configuration file is accessed in your browser?


Drazen

Re: Non Responsive Application after update comple

by Rik Arpino, Thursday, April 03, 2008, 11:54 (6078 days ago) @ woddrazen

Drazen,

The url is accessible using browser. No permission problems as far as I can see.

Very confusing...!

Rik

Re: Non Responsive Application after update comple

by wodDamir, Thursday, April 03, 2008, 12:23 (6078 days ago) @ Rik Arpino

Rik,

Can you send that config file over here?

Also, if you try our sample with your config file, does that work? Can you try?

Regards,
Damba

Re: Non Responsive Application after update comple

by Rik Arpino, Thursday, April 03, 2008, 12:34 (6078 days ago) @ wodDamir

Damir,

Your demo file works fine with the test application I wrote.

The config file I am using is:

[code]
#Update file signature

[File]
Name=readme.txt
Compressed=0
URL=http://talula/testing/readme.txt
[/code]

The readme.txt file is a simple text file with some text in it.

The update does occur but the application keeps running after the last line of code in the application executes during which time the application is in an unresponsive state.

Is there anything else which would help?


Rik

Re: Non Responsive Application after update comple

by wodDamir, Thursday, April 03, 2008, 12:50 (6078 days ago) @ Rik Arpino

Rik,

I've just noticed. You're invoking methods from inside events, although you're using Blocking mode. This isn't allowed, and I'm pretty sure that this is why the issue is occuring.

You shouldn't make calls to blocking methods from inside Events. Blocking mode is made in order to be able to use the component in, usually, scripting environments (such as ASP) where you are unable to use Events.

Can you try using the component in non-blocking mode? You can check out the sample available in the samples folder.

Regards,
Damba

Re: Non Responsive Application after update comple

by Rik Arpino, Thursday, April 03, 2008, 13:08 (6078 days ago) @ wodDamir

Damir,

Made some small modifications to the test app to run in non-blocking mode and still experiencing the same problem with my local configuration file and still working with your demo file.

Even with the app running blocking calls it works perfectly with your example file.

Regards,


Rik

Re: Non Responsive Application after update comple

by Rik Arpino, Thursday, April 03, 2008, 13:14 (6078 days ago) @ Rik Arpino

Damir,

I just took your exact demo files altered only the URL to the upDemo.dll file and hosted them on my local system.

I experience the same problems with the application using your config file on my local system which must mean it is something to do the delivery of the files from my local server.

What version of IIS did you test against?

Regards,


Rik

Re: Non Responsive Application after update comple

by wodDamir, Thursday, April 03, 2008, 13:46 (6078 days ago) @ Rik Arpino

Rik,

I've tested on default ASP configuration that comes with XP installation. Is there any chance that you could try on some other machine?

Regards,
Damba

Re: Non Responsive Application after update comple

by Rik Arpino, Thursday, April 03, 2008, 14:07 (6078 days ago) @ wodDamir

Damir,

I have tested on 2 different systems, but both were XP. I will test on Server 2003 and see what happens.

I will post back when this has been done.

Many Thanks,


Rik

Re: Non Responsive Application after update comple

by Rik Arpino, Friday, April 04, 2008, 10:46 (6077 days ago) @ Rik Arpino

Damir / Drazen,

Sorry for the delay...

I have discovered what is causing the problem. In Internet Explorer, if the 'Automatically Detect Settings' under :

Tools > Internet Options > Connections > Lan Settings

...is checked then I experience the problem I described. If I uncheck the box then the problem disappears.

This only appears to affect servers on the local network, and I am still unclear as to what this option does anyway.

Can you confirm that you can recreate the problem by checking this option? If it is already checked then I will have to keep looking.

Regards,


Rik

Re: Non Responsive Application after update comple

by woddrazen, Friday, April 04, 2008, 12:14 (6077 days ago) @ Rik Arpino

Rik,


It works for me in both cases. In order to deal with it we will need to duplicate it somehow. Is there any chance that you can zip and send us your app (including source), file for update and configuration file? So we can test your issue on our side.

You can send it to: techsupport@weonlydo.com

Please also send us step by step guide how to reproduce your problem.


Drazen

Re: Non Responsive Application after update comple

by Rik Arpino, Friday, April 04, 2008, 12:21 (6077 days ago) @ woddrazen

OK, I will have it packaged up by Monday.

Many Thanks,


Rik