Closed szadev closed 2 months ago
Hello! Thanks for opening the issue.
I have a suspicion that this is just down to the way the JAXB library used by MPXJ to handle XML data works, in that in some cases it uses exceptions as part of its normal flow control. If you ignore exceptions raised from the JAXB library in Visual Studio, or just allow the debugger to continue running after the exception you've trapped, the export should complete successfully. Visual Studio doesn't seem to be a fan of this particular library code, so it often seems to run very slowly when run through the debugger. Running it outside of the debugger it seems to run at a more acceptable speed.
Let me know how you get on!
Yeah, it works with try catch without debug. Thank you!
The problem also occurs when reading a file. It only happens on the first call when the application is running, and other attempts to call methods are fine. This makes debugging the application more difficult, but is not a critical issue. Also, I saw the exception messages in the debugging window:
In Visual Studio Tools->Options->Debugging->Enable Just My Code might help to keep the noise down.
Actually, Just My Code does not help, but I found that you can disable certain Java exceptions. Here it is: Ctrl+Alt+E or Debugging -> Windows -> Exception Parameters, then in the opened tab you can disable Java exceptions.
P.S. I cloned this repo and wrote tests for the UniversalProjectWriter and catched this problem while running the tests in debug.
Code:
Problem: It works, when I use MPX format, but with XML, VisualStudio hangs completely at first, then gives a NullReferenceException. ProjectFile created from real ms project file with MPP format. Stack trace: