Situation: I load two svg-documents, one from my editor, the second from the third-party. the first one is loaded as it should, the information is read from it, but on loading the second breakpoint gets up on the xml.Load method (ofd.FileName) and does not move further. Such a bug occurs when reading files from a third-party graph. editor, though, my editor's files do not differ from those in structure. The code in the attachment.

if (ofd.ShowDialog() == DialogResult.OK) { this.Clear(); XmlDocument xml = new XmlDocument(); xml.Load(ofd.FileName); // Повисаем здесь ... } else return; 
  • @ tym32167 You do not need to know what comes after the line "xml.Load (ofd.FileName);" because breakpoint doesn't go any further. and so, the file of another editor is normally read and not blocked, of course - Vanya Belyaev
  • one
    @VanyaBelyaev msdn.microsoft.com/ru-ru/library/cc667410.aspx After that, instead of "External code", the stack will be inside the stack of the .NET Framework components. Example (you will have XmlDocument.Load instead of Thread.Sleep ): i.imgur.com/RDA36Of.png - Lunar Whisper
  • @ tym32167 "C: \\ Users \\ Vanya \\ Desktop \\ 555.svg" so that you understand, opening a document like svg, generated by your editor, everything works. and the code is correct there, because file from my editor is read by other editors - Vanya Belyaev
  • Well, if your path is correct, the file is not occupied by other processes and is readable, then all that remains is to look at the file contents. - tym32167
  • @ tym32167 as it turned out, System.IO.DirectoryNotFoundException crashes. but how?? - Vanya Belyaev

0