RBS Interferes with AppLifeUpdate


Author
Message
Larry Caylor
Larry Caylor
StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K

I thought I’d post this just in case someone else runs thesame issue. Our shop uses AppLifeUpdate with a custom login form to update ourWindows applications. We had been doing so for a long time but recently updateson our Windows XP machines began to abort with an unhandled exception.  Debug showed that AppLifeUpdatehad failed to close the host application. After some more trouble shooting Ifound that StrataFrame sessionlock is somehow interfering with AppLifeUpdate’sability to close the host application. I’m not sure if it started with SF1.7.7.1 or some Windows update. In any event stopping session monitoring priorto performing an update fixes the problem and session monitoring can then berestarted after the update. On Windows 7 machines leaving session monitoringactive during an update sometimes results in application terminated abnormally messages,but the update continues after closing the error message windows. Turing offsession monitoring eliminates the error messages. I didn’t do any additionaltrouble shooting to try and find the root cause but the environment was VS2010,VB .Net targeting the 4.0 framework, SF1.7.7.1, and AppLifeUpdate 5.0, Windows XP SP3 32-Bit and Windows 7 SP1 64-Bit.

-Larry


Replies
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Larry,

I tried your solution, but still on some Windows 2012R2 I keep getting issues with the application not shutting down properly.

Where specifically are you putting that code? 

I have 2 places where an AppLifeUpdate can be done in my applications:
  1. In my main form, I have an UpdateController instance and I am stopping the session monitoring in the Updatestarting() event.
  2. In AppMain.vb I have a method that will instantiate a new UpdateController and if an update is found I am stopping the session monitoring.


Code in AppMain.vb:

'-------------------------------------------------------------------------------
'-- Check if there is an update available for the application.
'-------------------------------------------------------------------------------
With UpdateController
Try
frmSplashScreen.SetMessage("Please wait, checking for updates...")
      If .CheckForUpdate() Then
         '-- 5/6/2014: There is an issue reported by Larry Caylor at the SF forum in which he discovered that AppLifeUpdate could not closed
         '   the application properly before applying an update.
         '   http://forum.strataframe.net/FindPost32536.aspx
         SessionLock.StopSessionMonitoring()
         frmSplashScreen.HideSplash()
         UpdateController.UpdateInteractive()
    Else
        Basics.DisplayMessage("Application Version Error""Sorry no update was found, please contact Progytech at www.progytech.com")
    End If
    Catch DownloadEx As Kjs.AppLife.Update.Controller.DownloadException
        SendErrorMessageViaEmail(DownloadEx)
    Catch ex As Exception
        SendErrorMessageViaEmail(ex)
    End Try
End With




Private Sub UpdateController1_UpdateStarting(sender As Object, e As Kjs.AppLife.Update.Controller.UpdateStartingEventArgsHandles UpdateController1.UpdateStarting
     If (Not e.IsInitiatingController) Then
         '-- 5/6/2014: There is an issue reported by Larry Caylor at the SF forum in which he discovered that AppLifeUpdate could not closed
         '   the application properly before applying an update.
         '   http://forum.strataframe.net/FindPost32536.aspx
         SessionLock.StopSessionMonitoring()
    End If
End Sub



Edhy Rijo

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi Edhy.

See if this one has anything to do with it:

http://forum.strataframe.net/FindPost31637.aspx

Abraços.

Ivan
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Ivan,

Thanks a lot for sharing this, definitely this solved my issue.
Adding this code to stop the Session Monitoring right after the RunApplication line in your AppMain.vb / Program.cs fixed.

        '-- Run the application
        StrataFrameApplication.RunApplication()

        '-- stop SessionLock Monitoring to avoid error on exit on Windows 8
        SessionLock.StopSessionMonitoring()


Edhy Rijo

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Glad it helped, Edhy! Cool
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search