Application Error on exit


Author
Message
Larry Caylor
Larry Caylor
Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K

Just in case I didn’t make it clear in my previous posts, when the Connection Wizard is run within an application, you have to either add a new connection or edit the existing one for the exception to occur. Simply selecting another connection from the list of available connections will not produce an exception.

-Larry

Trent Taylor
Trent Taylor
StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Do you get the same error if you do not use a Shared Settings file?
Larry Caylor
Larry Caylor
Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K
It makes no difference if I enter the connection information manually or use a shared settings file. The only thing that matters is that a connection is added or edited in the Connection Wizard and that the project is a SF Windows application with security. In every test I've run if the Connection Wizard is used to add or edit a connection and the application uses SF security, I'll get an application exception when I exit the application.

-Larry 

Trent Taylor
Trent Taylor
StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
One thing that you could do is just create an external encrypted file that has your connection info and load it up manually and set the DataSources yourself.  This is basically all the Shared Settings file does.  I will try to reproduce this again....so far no luck Ermm
Larry Caylor
Larry Caylor
Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K

The issue with the unknown software exception is continuing to cause problems. It’s now showing up in other parts of my application. I have an Active Reports viewer control in the application. When I go to print the report, a standard printer dialog is displayed. If I simply click print, the report is printed and when I exit the program, it terminates normally. However if I open the dialog, make some changes to the printer settings, and then cancel the printer dialog, when I close the program I get an application exception at the same location as when working with the connection wizard. Performing the same steps with Active Reports outside of a StrataFrame application does not produce the error.

 

I’ve attached an example of a project that displays the exception. It’s nothing more than a SF windows application with role based security that contains a SF main form. I’d like to know if you get the same error when performing the following steps. Again this error only happens in SF application with role based security. An application without role based security does not have this problem.

 

Run app in debug

Database Connection Wizard is displayed

Click Next

Select any database (there are no business objects)

Click Next

Click Finish

On login screen, click Exit

Program aborts with an unknown exception.

 

Attachments
ErrorSample.zip (122 views, 683.00 KB)
StrataFrame Team
S
StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Wow, still no dice... works fine for me.  Try this:

comment out the line within the InitApplication() method that calls the StartSessionMonitoring() on the SessionLock class and see if you still get the error.

Larry Caylor
Larry Caylor
Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K
You're on to something; comment out that line and no exception on exit.

-Larry

StrataFrame Team
S
StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
OK, then, if you don't need session locking, then just leave it out.  If you do need session locking, then add the following line to right after the call to StrataFrameApplication.RunApplication() within the Main() method and see if it fixes the problem:

SessionLock.StopSessionMonitoring();

The SessionLock class uses some low-level OS hooks to trap the mouse and keyboard input to determine when the session is idle... looks like your MDAs are catching the error and displaying it.

Larry Caylor
Larry Caylor
Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)Advanced StrataFrame User (880 reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K
Wow...  FantasticBigGrin That fixed the problem. I have this app deployed on fifty or so PCs and it's been drving me nuts. Thanks!!!!

I'd like to suggest that you add that one line of code to the standard AppMain just in case some other unfortunate individual runs into this

-Larry

StrataFrame Team
S
StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Good to hear BigGrin  I'll add that line to the template.
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