<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ArcMap crashes with add-in, but not when started from Visual Studio 2012 in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcmap-crashes-with-add-in-but-not-when-started/m-p/300501#M7803</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am building an add-in for a while. It is open source and the code is here: &lt;/SPAN&gt;&lt;A href="https://mcda4arcmap.codeplex.com/SourceControl/latest"&gt;https://mcda4arcmap.codeplex.com/SourceControl/latest&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ArcMap (latest version) crashes on start up when the add-in is installed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;According to the log file sometimes when the extensions are initialized, which makes sense.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The interesting part is that it works very well when I start it via Visual Studio 2012. At some point in time (2 months ago?) it also worked without Visual Studio 2012, but I developed and never tested it without and therefore I have no idea what change causes this behavior.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another interesting observation is that I can install the add-in for the first time and use a small part of the functionality (every other will crash ArcMap) without a problem. When I restart ArcMap, ArcMap will crash again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The last observation is that I can start it from Visual Studio 2013. In lets say 1 out of 10 times Visual Studio 2013 will crash and ArcMap starts or ArcMap.exe cannot be started and Visual Studio 2013 does not crash.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have two external dlls included and target version is 4.5 (4.0 will also crash, I tried it).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only option I see is to remove features and try until I find the evil method call or whatever.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do I have a chace to debug the ArcMap extension initialization?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It would be beneficial to know what ArcMap does with add-ins on start up, e.g. is the startup method of my extension called? What checks are performed?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 May 2014 07:57:52 GMT</pubDate>
    <dc:creator>SteffanVoss</dc:creator>
    <dc:date>2014-05-12T07:57:52Z</dc:date>
    <item>
      <title>ArcMap crashes with add-in, but not when started from Visual Studio 2012</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcmap-crashes-with-add-in-but-not-when-started/m-p/300501#M7803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am building an add-in for a while. It is open source and the code is here: &lt;/SPAN&gt;&lt;A href="https://mcda4arcmap.codeplex.com/SourceControl/latest"&gt;https://mcda4arcmap.codeplex.com/SourceControl/latest&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ArcMap (latest version) crashes on start up when the add-in is installed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;According to the log file sometimes when the extensions are initialized, which makes sense.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The interesting part is that it works very well when I start it via Visual Studio 2012. At some point in time (2 months ago?) it also worked without Visual Studio 2012, but I developed and never tested it without and therefore I have no idea what change causes this behavior.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another interesting observation is that I can install the add-in for the first time and use a small part of the functionality (every other will crash ArcMap) without a problem. When I restart ArcMap, ArcMap will crash again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The last observation is that I can start it from Visual Studio 2013. In lets say 1 out of 10 times Visual Studio 2013 will crash and ArcMap starts or ArcMap.exe cannot be started and Visual Studio 2013 does not crash.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have two external dlls included and target version is 4.5 (4.0 will also crash, I tried it).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only option I see is to remove features and try until I find the evil method call or whatever.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do I have a chace to debug the ArcMap extension initialization?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It would be beneficial to know what ArcMap does with add-ins on start up, e.g. is the startup method of my extension called? What checks are performed?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2014 07:57:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcmap-crashes-with-add-in-but-not-when-started/m-p/300501#M7803</guid>
      <dc:creator>SteffanVoss</dc:creator>
      <dc:date>2014-05-12T07:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: ArcMap crashes with add-in, but not when started from Visual Studio 2012</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcmap-crashes-with-add-in-but-not-when-started/m-p/300502#M7804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When it crashes, a crash dump should be generated:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://support.esri.com/em/knowledgebase/techarticles/detail/40370"&gt;http://support.esri.com/em/knowledgebase/techarticles/detail/40370&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can open the crash dump in Visual Studio and see where it crashed.&amp;nbsp; Hopefully, that gives you some insights into the problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In terms of debugging:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1) You can launch the ArcMap process from the debugger&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) You can run ArcMap and then attach to process&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3) You can launch the debugger from your code (see System.Diagnostics.Debugger.Launch and Break)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4) You can debug the crash dump&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;5) You can use print statements (I use the Debug View utility) or logging&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Make sure that you configure the debugger to use the ESRI symbol server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Finally, if Visual Studio is being less than helpful then use WinDbg (free from Microsoft).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2014 23:43:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcmap-crashes-with-add-in-but-not-when-started/m-p/300502#M7804</guid>
      <dc:creator>RichardWatson</dc:creator>
      <dc:date>2014-05-12T23:43:50Z</dc:date>
    </item>
  </channel>
</rss>

