Urgent HELP needed..... After installing, app crashes

  • Thread starter Thread starter AussieRules
  • Start date Start date
A

AussieRules

Hi,

I am able to run my application on my development machine with no problems.

When I compile and install the application on the brand new computer, I am
unable to start the application as it crashes.


To try and work out the problem, i put as the very first line in my main
form load event to just show a message box.

The installed application crashs before the dialog box is shown, so I don't
know how to debug as its crashing before any of my code starts..

I have to get this sorted this weekend, so any advice or tips would be taken
with huge thanks...
 
I am able to run my application on my development machine with no problems.
It's becoming the .Net developers' Mantra:
"It runs on /my/ machine"
When I compile and install the application on the brand new computer, I
am unable to start the application as it crashes.
Define "install".

If you use any installer product, it should take all the necessary
dependencies across onto the target machine as well. Just copying the
executable isn't always enough.
To try and work out the problem, i put as the very first line in my main
form load event to just show a message box.
Never mind Form_Load - what about Sub Main()?
At the very least, get a Try..Catch construct in there to catch things
like this (it's not perfect, by any means, but it's a start).
The installed application crashs before the dialog box is shown, so I
don't know how to debug as its crashing before any of my code starts..

Have a look in the Application Event Log; there should be an entry in
there that gives you some idea of what's going on.

HTH,
Phill W.
 
Hi,

I am able to run my application on my development machine with no problems.

When I compile and install the application on the brand new computer, I am
unable to start the application as it crashes.

To try and work out the problem, i put as the very first line in my main
form load event to just show a message box.

The installed application crashs before the dialog box is shown, so I don't
know how to debug as its crashing before any of my code starts..

I have to get this sorted this weekend, so any advice or tips would be taken
with huge thanks...

Make sure that any COM components are registered on target machine
(with regsvr32 optionally) if you use any COM components. Plus,
investigating Event Log gives much more idea about the exception.

HTH,

Onur Güzel
 
HI,
Thanks for you advice.

I created the installer application via the standard visual studio setup
wizard. It would seem to have the dependacies, and I have checked to make
sure the .net framework is installed(which it is).

My splash screen (define in project properties) displayes and then I get the
error :

appname as encountered a problem and needs to close. We are sorry for the
inconvenience.

(send error report) ( Don't send)


Looking at the application.log I get.

..net Runtime 2.0 Error

EventType clr203r3, P1 appname.exe, P2 1.0.0.0, P3 4becddd1, P4 appname, P5
1.0.0.0, P6 4becdd1, P7 29,P8 e9, P9system.invalidoperationexception, P10Nil

I don't have a sub main, and my project startup is set to form1. I will add
a sub main now...
 
Hi,

I have tried to add a sub main, I just added this code into my form where I
have all my other function and subs.

<STAThread()> Shared Sub Main()

' Declare a variable named frm1 of type Form1.
MsgBox("hello")

Dim frm1 As frmMain

' Instantiate (create) a new Form1 object and assign
' it to variable frm1.

frm1 = New frmMain()

' Call the Application class' Run method
' passing it the Form1 object created above.

Application.Run(frm1)

End Sub



It doesn't seem to work as I never get the hello message box ???

Have I done something wrong ??

Thanks
 
Am 15.05.2010 00:11, schrieb AussieRules:
Hi,

I have tried to add a sub main, I just added this code into my form where I
have all my other function and subs.

<STAThread()> Shared Sub Main()

' Declare a variable named frm1 of type Form1.
MsgBox("hello")

Dim frm1 As frmMain

' Instantiate (create) a new Form1 object and assign
' it to variable frm1.

frm1 = New frmMain()

' Call the Application class' Run method
' passing it the Form1 object created above.

Application.Run(frm1)

End Sub



It doesn't seem to work as I never get the hello message box ???

Have I done something wrong ??

Disable the "Application framework" and set Sub Main as the
"startup object". Both available in the project properties.
 
Am 14.05.2010 12:24, schrieb AussieRules:
I am able to run my application on my development machine with no problems.

When I compile and install the application on the brand new computer, I
am unable to start the application as it crashes.

Which Windows version? 32-bit or 64-bit? Did you compiler for x86, X64
or "Any CPU"? Does your application make use of COM/ActiveX components?
 
Just thought I would update...

After making the suggest changes by Armin Zingler, I was able to track the
error do a DLL from a component that was the problem.

I looked into it, and the license.txt file had an entry for the dll that was
not the same version as the dll i was using. I deleted those entries, and
re-installed the component, remove and recreated the setup project, and all
was fine..

Thanks
 
Back
Top