Re: Strange error when app starts



Excellent idea which I have tried but it didn't work. The aplication crashed
just the same as though the try catch block had not been entered even though
it enclosed everything.

MJ

"Pritcham" <dontwanttogivemyname@xxxxxxxxxxx> wrote in message
news:1161159446.515433.111820@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi

Apologies if this suggestion is a little 'basic' but have you wrapped
the call to InitialiseComponents() inside a try...catch so that you can
actually get the full details of the exception in order to establish
what file it is having problems with?

Martin
MJ wrote:
Other Assemblies
The application does use Crystal and Component One components but they
all
installed correctly via the installer

Config Files
The application uses one custom config file and all paths exist

Any suggestions on how to debug an application that runs perfectly on a
development machine but fails in the "real world"

See the following code which is the constructor of the main form:

project.public Form1()
{
MessageBox.Show("This message will show as normal");
InitializeComponent();
MessageBox.Show("This message never shows as the application has now
failed");
}

MJ

"Bryan Phillips" <bphillips@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:upgkmvh8GHA.4012@xxxxxxxxxxxxxxxxxxxxxxx
Are you referencing any assemblies other than those in the System.*
namespaces? If so, you might not have copied other dependent
assemblies
to the destination computers. Also, check your app.config files for
any
paths that do not exist on those workstations. Finally, if there is an
infrastructure group that maintains these workstations, make sure that
they have not made any changes that you are not aware of.

Bryan Phillips
MCSD, MCDBA, MCSE
Blog: http://bphillips76.spaces.live.com




"MJ" <no_s_pam@xxxxxxxxxxxxx> wrote in message
news:12j9njg6dims8e1@xxxxxxxxxxxxxxxxxx:

I have a strange (to me) problem with a c# forms application that I am
developing. The application is installed on approxmatly 30 Windows XP
machines and until recently they all worked perfectly. However since I
have
updated the application to a new version one of the machines fails
with
an
unhandled exception when the application starts. The code in
program.cs
works fine and anything before the InitializeComponent(); method in
the
main
form. As soon as the aplication enters the InitializeComponent method
it
crashes with mention of a filenotfound exception.

I have copied the application folder from the failing PC to a good PC
and
it
works fine which leads me to believe that it must be a system file
that
is
missing. Likewise if I copy the program folder from a good PC to the
failing
one it again fails.

I have reinstalled the app and the .Net 2 framework but to no avail.

Having only done "basic debugging" I'm now a bit stuck.

Any help would be appreciated




.



Relevant Pages

  • Re: Strange error when app starts
    ... installed correctly via the installer ... development machine but fails in the "real world" ... machines and until recently they all worked perfectly. ... As soon as the aplication enters the InitializeComponent method it ...
    (microsoft.public.dotnet.framework.windowsforms)
  • RE: Express refuses to install
    ... Loaded DLL:C:\Program Files\Microsoft SQL Server\90\Setup ... Action "LaunchPatchedBootstrapAction" will be skipped due to the following ... Action "InvokeSqlSetupDllAction" threw an exception during execution. ... Aborting queue processing as nested installer has completed ...
    (microsoft.public.sqlserver.setup)
  • Re: Threading and Serial port issue
    ... "fails" is pretty useless information. ... If it generates an exception, ... I then sit in a loop waiting for data to arrive. ... private void SetupBoard_Click ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: FC-4 -- unhappy experiences
    ... > The motivation seems pretty clear to me: it's the Fedora Installer. ... on as wide a range of machines as possible. ... I follow the anaconda development mailing list ... >> with two SCSI disks and an IDE disk. ...
    (Fedora)
  • Re: Coding inside the debugger
    ... but why isn't the test written so that the reason it fails is ... If something fails in tests like these, ... public void testCreateWithDefaultthrows Exception { ... Ghostworld world = worldWithClass; ...
    (comp.object)