我在 Windows 7 上运行,我的应用程序在启动时出现问题。在我的应用程序中,我使用了一些线程和外部 dll(sqlite3.dll 等...)。我在 start.exe 文件的开头包含了这些行:
RegistryKey rkApp = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
String p = System.Environment.CommandLine.Replace("vshost.","");
String pp = p.Remove(p.Length-1);
rkApp.SetValue("MyAPP", pp);
如果我从 exe 文件(或使用 VisualStudio)手动启动我的应用程序可以正常工作。如果我在重新启动时启动我的应用程序,MyApp 会在几秒钟后崩溃。
为什么我有这个问题?
编辑:我附上了崩溃日志:
Descrizione
Percorso dell'applicazione che ha generato l'errore: C:\Users\Francesco\DynInst\bin\start.exe
Firma del problema
Nome evento problema: APPCRASH
Nome applicazione: start.exe
Versione applicazione: 1.0.0.0
Timestamp applicazione: 4d2061b9
Nome modulo con errori: KERNELBASE.dll
Versione modulo con errori: 6.1.7600.16385
Timestamp modulo con errori: 4a5bdaae
Codice eccezione: e0434f4d
Offset eccezione: 00009617
Versione SO: 6.1.7600.2.0.0.256.48
ID impostazioni locali: 1040
Informazioni aggiuntive 1: 0a9e
Ulteriori informazioni 2: 0a9e372d3b4ad19135b953a78882e789
Ulteriori informazioni 3: 0a9e
Ulteriori informazioni 4: 0a9e372d3b4ad19135b953a78882e789
Ulteriori informazioni sul problema
ID bucket: 2250313277