The application exits with:
The program '[12868] AppName.vshost.exe' has exited with code 1073741855 (0x4000001f).
Below Code:
Call Export()
twice after each other: crash with above logging
Call the contents of Export()
inside Export()
twice (the inner scope), and it doesn't crash.
This is reproducible, I have no idea where to start.
private void btnExport_Click(object sender, RoutedEventArgs e)
{
Enable(false);
statusbar.Message = "Exporting...";
Task t = new Task(Export);
t.ContinueWith(ExportEnd);
t.Start();
}
private void Export()
{
{
PBNSectionDictionary source = ctrlSectionSelection.SectionSelection.SelectSections;
PBNSectionDictionary dict = new PBNSectionDictionary();
foreach (string sectionType in source.Keys)
{
if (source[sectionType] != null)
{
dict[sectionType] = collector.ReadFullSection(source[sectionType]);
}
}
PBNFMV.Export.PBNExport export = new PBNFMV.Export.PBNExport(new Lms.Custom.Files.AdvancedFileLocator(Constants.NAME), dict, manager);
export.Export();
dict.Dispose();
}
}
private void ExportEnd(Task t)
{
Enable(true);
statusbar.Message = "Export done";
}
Event log:
Faulting application name: PBNFMV.exe, version: 16.2.0.0, time stamp: 0x58aeadf2 Faulting module name: ntdll.dll, version: 6.1.7601.23569, time stamp: 0x57f7bb79 Exception code: 0xc0000374 Fault offset: 0x000ce8fb Faulting process id: 0xbd4 Faulting application start time: 0x01d28db92a6d6c1e Faulting application path: C:\APPPATH\source\PBNFMV\bin\Debug\PBNFMV.exe Faulting module path: C:\windows\SysWOW64\ntdll.dll Report Id: 72f988f9-f9ac-11e6-8d91-000acd1f71fd
Exception settings completely enabled:
C++ exceptions common language runtime exceptions gpu memory access exceptions managed debugging assitants win32 exceptions
The issue is solved.
Hence: very strange.
It was due to construction of an object further (!) in code execution, which made things crash (because of a bad implementation in a library).
The strange part is why that object was already instantiated, i believe some optimalisation in the .net runtime.
Apologies
User contributions licensed under CC BY-SA 3.0