Autor Beitrag
Florian Wolf
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 20


C# (VS 2008)
BeitragVerfasst: Mo 28.03.11 17:27 
Ich habe ein C# Programm erstellt. Dieses Programm habe ich über ein in VS erstelltes Setup auf einen anderen Rechner installiert.

Dort bekomme ich nach dem Start des Programms sofort die Fehlermeldung: "... hat ein Problem festgestellt und muss beendet werden."
Wenn ich mir den Inhalt des zu sendenden Fehlerberichts anschaue bekomme ich folgende Informationen:
EventType : clr20r3 P1 : ramona.exe P2 : 1.0.0.0 P3 : 4d90819c
P4 : system.windows.forms P5 : 2.0.0.0 P6 : 4889dee7 P7 : 199c
P8 : 2 P9 : pszqoadhx1u5zahbhohghldgiy4qixhx

Auf einem anderen Rechner, auf dem ebenfalls Visual Studio installiert ist, lässt sich die Software problemlos starten.

Ich habe bei dem Setup auch schon sämtliche .Net-Framwork-Versionen mit eingebunden, was keine Veränderung bringt.

Ich denke, dass auf dem Rechner, auf dem das VS nicht installiert ist irgend etwas fehlt, habe aber keine Idee was es sein könnte.
Th69
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Moderator
Beiträge: 4795
Erhaltene Danke: 1059

Win10
C#, C++ (VS 2017/19/22)
BeitragVerfasst: Mo 28.03.11 18:33 
Hallo,

am besten, du erweiterst dein Programm um die Behandlung des AppDomain.UnhandledException-Ereignis (s. Beispiel)
Wenn du ein WinForms- (oder WPF)-Programm hast, dann laß dir dann einfach eine MessageBox mit der Exception bzw. der Message-Eigenschaft ausgeben.

So solltest du dem Fehler besser auf die Spur kommen...
Florian Wolf Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 20


C# (VS 2008)
BeitragVerfasst: Di 29.03.11 08:42 
Danke für die schnelle Antwort.
Ich habe wie im Beispiel das UnhandledException-Ereignis eingefügt. Leider kommt die Software gar nicht so weit. Ich bekomme immer noch bevor irgend etwas passiert die Absturzmeldung wie oben beschrieben.
Th69
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Moderator
Beiträge: 4795
Erhaltene Danke: 1059

Win10
C#, C++ (VS 2017/19/22)
BeitragVerfasst: Di 29.03.11 10:03 
Hi,

wie sieht denn deine Main-Methode aus?
Machst du noch irgendetwas vor dem Application.Run()-Aufruf? Dann fange dort auch mal alle Exceptions ab.

Oder aber referenzierst du in deinem Programm externe Assemblies, welche du nicht dem Programm beigepackt hast?
Florian Wolf Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 20


C# (VS 2008)
BeitragVerfasst: Di 29.03.11 10:04 
Ich habe das Problen etwas näher eingrenzen können.
Ich verwende in der Software eine USB-Kamera. Beim erzeugen des Formulars für diese Kamera geschieht der Fehler.
Wenn ich in der .Designer.cs-Datei folgende Zeile auskommentiere lässt sich die Software starten:

((System.ComponentModel.ISupportInitialize)(this.axuEyeCam1)).EndInit();

Kann mir jemand erklären was diese Zeile bewirkt?
Florian Wolf Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 20


C# (VS 2008)
BeitragVerfasst: Di 29.03.11 10:08 
Meine Mail-Routine sieht wie folgt aus:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
static void Main()
{
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Application.Run(new Ramona());
}


Ich habe nichts dazu gefügt und habe auch keine Parameter die ich dem Programm übergebe.
Greenberet
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 339
Erhaltene Danke: 20

Win 10
C# (VS 2012), C++ (VS 2012/GCC), PAWN(Notepad++), Java(NetBeans)
BeitragVerfasst: Di 29.03.11 10:24 
Ich würde vorschlagen, dass du auch den Rest deines Programms hier hochladest/postest.
Dadurch lässt sich das Problem leichter finden.
Florian Wolf Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 20


C# (VS 2008)
BeitragVerfasst: Di 29.03.11 13:49 
Ich habe das Problen gefunden. Bei der Installation der Kameratreiber gab es ein Problem und deshalb kam direkt die Fehlermeldung beim erstellen des Formulars.

Vielen Dank für eure Hilfen.