Home All Groups Group Topic Archive Search About

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

Author
14 May 2010 10:24 AM
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...

Author
14 May 2010 11:37 AM
Phill W.
On 14/05/2010 11:24, AussieRules wrote:

> 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.
Author
14 May 2010 10:00 PM
AussieRules
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...



Show quoteHide quote
"Phill W." <p-.-a-.-w-a-r-d-@-o-p-e-n-.-a-c-.-u-k> wrote in message
news:hsjcmd$9bd$1@south.jnrs.ja.net...
> On 14/05/2010 11:24, AussieRules wrote:
>
>> 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.
Author
14 May 2010 10:11 PM
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 ??

Thanks


Show quoteHide quote
"Phill W." <p-.-a-.-w-a-r-d-@-o-p-e-n-.-a-c-.-u-k> wrote in message
news:hsjcmd$9bd$1@south.jnrs.ja.net...
> On 14/05/2010 11:24, AussieRules wrote:
>
>> 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.
Author
14 May 2010 10:54 PM
Armin Zingler
Am 15.05.2010 00:11, schrieb AussieRules:
Show quoteHide quote
> 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.

--
Armin
Author
14 May 2010 2:00 PM
Onur_Güzel
Show quote Hide quote
On May 14, 1:24 pm, "AussieRules" <nos...@nospam.com> wrote:
> 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
Author
16 May 2010 6:53 PM
Herfried K. Wagner [MVP]
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?

--
  M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
  V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>
Author
17 May 2010 8:08 AM
AussieRules
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


Show quoteHide quote
"AussieRules" <nospam@nospam.com> wrote in message
news:%23qS8c%2308KHA.3840@TK2MSFTNGP02.phx.gbl...
> 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...
>
>