I'm getting a very strange crash when testing an existing application in Windows 8. The main application is written in Delphi XE (Win32) and it does some calls to .Net assemblies using COM interop. The current .Net version being used is 3.5.
When the application executes on a fresh install of Windows 8, it crashes up to 10 times before it suddenly starts to run properly. Once it has started to do OK it will continue to do so. No error logs or error messages are shown. The application just hangs or stops working.
I have had the same result on 4 different Win8 installations, both physical and virtual.
I have been able to do some remote debugging and managed to track down the error to the .Net method Double.TryParse
, when trying to parse a non-numeric value.
Double.Parse
within a Try/Catch block does not work either.
The main assemblies are written in Delphi Prism, but I have been able to reproduce the error with test assemblies written in C# using VS2010.
.Net 4 seems to work properly, but due to the missing support for Oracle we're not able to upgrade right now.
The program works OK on previous versions of Windows, and also on Windows Server 2012.
Any hints or suggestions would be really appreciated.
Addition: I forgot to mention the test assembly works properly when being called from another test application written in C# / managed code. It's only the combination of Delphi (Win32), .Net 3.5, COM InterOp and Windows 8 that produces the crash.
I'm also very baffled why the application suddenly starts to work, after crashing up to 10 times.