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

My problem started with an application that was just deployed. I’m getting an error when the application is closed. This only happens the first time after the initial run of the program where the Connection Wizard is used to configure the connection. After closing the error window I saw that the app was still alive in Task Manager and killed the process.   Re-running the app a second time without running the connection wizard allows the application to exit with no errors.

 

I went back to the development environment and created a simple app to see if happen there. Attached is screenshot of the error I received there.  

 

-Larry

 

Attachments
strataframe_app.png (212 views, 134.00 KB)
SFTEst1Error.png (194 views, 35.00 KB)
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
Larry,

How are you getting the exception in the designer?  As we have both experienced, these types of errors are very hard to diagnose since they are generally not created by the environment that is getting the error...just manifested there.

How long have you been getting this?  Can you reproduce on more than one computer? Also, what are the exact steps to reproduce?  Last question, is BatchTrackerWIN.exe something that you have loaded on your machine or is this your assembly EXE?

Sorry for all of the questions, but I have seen exception error a thousand times in my life and it is generally caused by something outside of the environment.

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

Hi Trent,

 

I was pretty sure this wouldn’t be easy.

 

In the Designer:

 

·     Delete connection data under All Users\Application Data

·     Open VS

·     StrataFrame prompts for StrataFrame Data base connection info, enter info

·     Open test project, a SF Windows with Security App containing one form and 2 BOs

·     Click run in debug

·     SF displays connection Wizard to configure data source for test app, enter data

·     Authentication Form is displayed, Click Exit

 

The message “The exception unknown software exception (0xc002001) occurred in the application at location 0x7c812a5b.  Click on OK to terminate the program.  (See attachment SFTest1b)

 

Even after you click OK, the app continues to run and you either have to click on Stop Debugging or kill the process in Task manager.

 

The test project has been configured to disable the Visual Studio Hosting process. This results in the same error that I received on the deployed version of my full app. If Visual Studio Hosting Services are enabled, the error is slightly different (See attachment SFTest1c)

 

Now that the database connection has been established I can start the application and exit at the same point (or anywhere else) with no exceptions.

 

In Deployment:

 

If I take the same test app and deploy it to another PC and run the Connection Wizard and exit at the Authorization form I get an exception and the app appears to exit but continues to run in Task Manager.

(See SFTest 1d)

 

BatchTracker is the application we’ve put together. It tracks client records through a document imaging process.  However the tests that I’ve just done were with a very simple test app with one form and couple of BOs.

 

I’ve seen this exception a few times in VS but it was so infrequent that I didn’t really notice it. So far I tried deploying our tracking app to five different PCs and the results are all the same.

 

My system is the only one running V1.51 (10/30/06) and no one else has noticed the issue on v1.4. I’m out of the office tomorrow but when I get back I’ll try loading up another development system with 1.51 and see if I can reproduce the error since there is the possibility that there may be a damaged dll on my system. I’ll let you know what I find out.

 

I just figured I’ve give you guys a shout in case you’d run into the same issue before I build another PC. Layering on all this software on a development machine is a real pain.  

 

-Larry

 

Attachments
SFTES1b.png (172 views, 12.00 KB)
SFTest1c.png (145 views, 19.00 KB)
SFTest1d.png (159 views, 92.00 KB)
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
Larry,

I know that you do not want to hear this, but I have tested this on two different computers, and spent a fair amount of time on this including last night at home, and I cannot reproduce this.  There is something in your application, development, and/or run-time environment that is not playing nice with your assembly.

You know us, we like to fix things Smile, but we have to be able to reproduce them before we can.  Obviously this is an isolated type of thing in your environment otherwise we would be hearing about this from every one of our users....not that it makes you feel any better Ermm 

Have you loaded any type of patch to VS 2005, the OS, or something that could be playing a part here?

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

Trent,

 

I’ve done quite a bit of testing and in all cases I’ve been able to consistently reproduce the application exception I’ve been getting. It is important to note that the exception ONLY occurs on a SF Windows Application with Security. A standard SF Windows Application does not exhibit the problem.

 

The exception only happens on exiting the application if the Database Connection Wizard has been run in the current instance, either on startup where the applications data base has not yet been defined or if run from the File menu on a SF Main form. If run from the File menu you must run the wizard all the way through the Finish step for the exception to occur on exiting the application.

 

So far I haven’t been able to isolate the cause of this problem. It’s happening on every PC where I try to deploy an app as well as two development PCs that I’ve tested. To eliminate as many variables as possible, I’ve also done the following, once under Windows XP Pro SP2 and once using Windows 2000 Pro SP4. In both cases I received an exception (although at different locations depending on the OS). I could be missing something when I’m setting up the environment and building the test app, but I can’t see what it is. Maybe you can.

 

·     Started with a Dell GX280 and reformatted the drive.

·     Installed Windows XP Professional SP2 with no additional updates

·     No anti-virus software installed on PC

·     Installed VS2005 Professional, default install from Dec 2005 Microsoft volume licensing discs. No additional updates or patches installed.

·     Installed SQL Server 2005 STD using Dec 2005 Microsoft volume licensing, all services installed. No additional patches or updates installed.

·     Rebooted PC

·     Installed SF v1.5 11/09/06 without DevExpress or Infragistics with StrataFrame DB on local SQL instance

·     Created a Security project and added 1 user (used “MySecurityKey” for key)

·     Ran DDT to create a database that includes 1 table + Security tables, no localization or message tables

·     Deployed the new DB to the local SQL instance with the data from the Security project

·     Created a new StrataFrame Windows project with security. No modifications to AppMain

·     Replaced the standard form with a SF main form.  Left name as Form1 with no code added

·     No business objects were added to the project

·     Ran program in designer

·     In the connection wizard configured the app to use the new data base with Windows security.

·     When the Authorization form is displayed, clicked on Exit

·     Program throws an application exception (same as previous posts)

·     Clicked on Stop Debugging.

·     Re-Ran application

·     When the Authorization form is displayed, clicked on Exit

·     Application exited with no exception

·     Re-Ran application

·     Entered ID and password on Authorization form,  clicked OK

·     Main form is displayed

·     Clicked on File, Database Connection menu

·     Selected the current connection

·     Clicked on Edit

·     Ran through the Connection Wizard, leaving the information the same

·     Clicked Cancel on the connection windows to close

·     Closed the Main form to exit application

·     Application exception raised

 

 

All the PCs where I’ve tested running the VS2005 design environment are Dell GX280 or GX620 systems. Deployed systems have been GX620s as well as no-name clones running either Windows XP SP2 or Windows 2000 Pro SP4.

 

After running the initial test of the bare bones XP machine, I applied all of the latest XP patches and SQL 2005 SP1.  The results were still the same.  As far as I’m aware there are no SPs for VS2005. I’ve tried using local databases and remote databases. I’ve even taken the development systems off the network. The results are always the same.

 

Any suggestions would be appreciated since the current situation is making deployment of SF applications very difficult (I’m using a shared configuration file). I haven’t tried it yet but I’m assuming that I could work around the issue by hard coding the connection string in AppMain.

 

-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
All of this looks good.  Here is one question though, you mentioned you are using a shared settings file...does the same thing happen if you just manually enter the information in the Connection Wizard and do not use the shared settings file?  This could be the culprit as it does some stuff in memory and if it is coming from a network drive, I see this being a potential cause of the error since you are getting an exception.

Also, I am assuming that if you manually set the DataSources collection and circumvent the Connection Wizard, you do not get the error...correct?  Try taking the shared settings file out of the formula first, then we will go to hard-coding the path.  Let's get the error to go away and then we can start adding things back in.  Thanks.

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

I’ve tried using the shared settings file and I’ve tried entering the information manually. I’ve also tried copying the shared settings file to a local drive. In all cases I get an application exception when I exit the program. You’re correct that if I just hard code the connection string in AppMain everything works fine. Running the Connection Wizard appears to be the cause of the problem when run in an application that uses SF Security. If I create SF Windows app without security, I can run the Connection Wizard as many times as I want and it doesn’t cause an application exception when exiting the application.

 

In my application I’m using SF Security only for password validation. The only restriction we have for our tracking app is that the user is an authenticated user. I haven’t defined any roles or permissions. My Test application contains just one user with no roles or permissions. This doesn’t cause any problems with the app; everything works fine except when the Connection Wizard is run. I did try creating a role and permission for the one user but that didn’t seem to change anything. I’m wondering if I’m missing something when setting up a project with security. It’s driving me nuts that you can’t reproduce this problem when I can 100% of the time on four different development machines running two different operating systemsCrazy.

 

-Larry

 

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

Trent,

I do all my development in VB but I thought I run a test in C# and see if the results were any different. My test application is nothing more than a SF Windows app with security and one form, a SF Main form. I’ve added no code to what is generated from the templates. I ran the app, manually entered the connection data in Connection Wizard and clicked on exit when the authorization form was displayed. Attached in a screen shot of the error I received.

-Larry

Attachments
SFTest1C#Error.png (173 views, 22.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
It seems to be coming form some sort of unmanaged call that isn't being cleaned up or disposed, or something... I'll take a look at it.  Thanks for the additional info.
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
Hi Ben,

Here is a little more info. I enabled unmanaged code debugging on my VB test app and the following showed up. It corresponds to the exception I'm getting.

The thread 'Win32 Thread' (0x494) has exited with code 0 (0x0).

First-chance exception at 0x7c812a5b in SF1TestVB.exe: 0xC0020001: The string binding is invalid.

-Larry


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