none
.NET Runtime version 2.0.50727.8784 - Fatal Execution Engine Error (70E30706) (80131506) RRS feed

  • Question

  • Hello,

    I have VSTO Add-in on Excel created with VS2010 Excel 2007. I did few upgrades on my Add-in startup and it started to crash. It happens only if i load Add-In on Excel 2016 32-bit. It's working on Excel 2007/2010/2013.

    In Windows Event log i found this: ".NET Runtime version 2.0.50727.8784 - Fatal Execution Engine Error (70E30706) (80131506)"

    It's same if i try to open Excel->File->Options->Add-ins->COM Add-ins->GO-> mark my Add-in-> pressing OK -> Excel closes it self and in Event log I see same critical error. And as i said it's only on Excel 2016 happens. Here is the code which i commented and my Add-in started to work again:

    private void ThisAddIn_Startup(object sender, System.EventArgs e) { ... MethodInvoker proc = new MethodInvoker(checkStatusA); proc.BeginInvoke(null, null); .. } private void checkStatusA() { try {

    string url = "my url to check or it's responding"; var req = (HttpWebRequest)WebRequest.Create(url); req.Timeout = 5000; var resp = (HttpWebResponse)req.GetResponse(); resp.Close(); } catch { return; } }

    My goal is to check if webpage .aspx is responding, or does it exist, or webpage is working. Max timeout set 1-5 seconds to not pause too long Add-in loading if it's not responding.

    Wednesday, June 14, 2017 8:43 AM

Answers

  • Hi,

    The code was same, i just removed code which had no impact on changes.

    So i tried again to make this behavior and it seems i can't? I have checked history on Team Foundation server, seems I'm building and deploying same project with same code but it not crashing anymore, tried on 2 PC's with Office 2016 it's all fine now. Kind a sad that some "mystery" happens. Don't know what to add more.

    Friday, June 23, 2017 5:55 AM

All replies

  • Hi Vytautas Astera,

    your Addin was developed using VS 2010 for Office 2007.

    generally VSTO Addin can be run on multiple Office versions.

    so you are able to run your addin on Office 2010 and 2013.

    you need to use .net framework 4 or later and try to install the Visual Studio 2010 Tools for Office Runtime on targeted machine. then you will be able to run your addin on Office 2016 too.

    please try to visit link below will give you the information regarding .net framework and office run time to run your addin on multiple version of Office.

    Running Solutions in Different Versions of Microsoft Office

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, June 15, 2017 6:20 AM
    Moderator
  • Ty for answer. My VSTO Add-in created 7 years ago, and its working good on all 32 bit office versions. On target pc where it's deployed PC's all are up to date(window 7 32-bit(2007 offce), x64(2016 offce, crash), 3 pcs window 10 x64 (office 2013 ok /2016 crash) and add-in was installed before, its not first time. I just made an update and its started to crash for no reasons and without any visible errors, i just commented code which i wrote at top, and its working again on Office 2016.

    Hope my answer will be more clear :)

    Thursday, June 15, 2017 6:35 AM
  • Hi Vytautas Astera,

    can you post the code we will try to check if something is wrong in the code.

    did you get any error related to this new code?

    if yes then let us know about that.

    other thing I want to suggest you that if possible for you then you can try to use the Templates for 2016 Addin and just copy the code from old to new addin and try to test.

    it can solve your issue.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, June 16, 2017 9:18 AM
    Moderator
  • Hi Vytautas Astera,

    can you post the code we will try to check if something is wrong in the code.

    did you get any error related to this new code?

    if yes then let us know about that.

    other thing I want to suggest you that if possible for you then you can try to use the Templates for 2016 Addin and just copy the code from old to new addin and try to test.

    it can solve your issue.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Hi, 

    I have posted code when created this thread, hmz.. i will add again. If you don't see please let me know.

    So firstly I'm opening Excel and launching my Macros which load Add-In:

    Sub aa()
    
    ComAddinName = "myAddinName"
    Application.COMAddIns.Item(ComAddinName).Connect = True
    
    End Sub
    

    Here the code which my VSTO AddIn loads and crashes with no visible error, and it's only happens on Excel 2016(-32bit), if i comment these lines it's all works fine :) my project created on VS2010 with latest updates, and Excel 2007 with lastest updates. It does not crash on Excel 2007/2010/2013 all 32bit.

    In VS2010 my project ThisAddin_Startup code:

    private void ThisAddIn_Startup(object sender, System.EventArgs e)
            {
    ...
    MethodInvoker proc = new MethodInvoker(checkStatusA);
    proc.BeginInvoke(null, null);
    ..
    }
    
    private void checkStatusA()
    {			
    try
    {
        string url = "my url to check or it's responding";
        var req = (HttpWebRequest)WebRequest.Create(url);
        req.Timeout = 5000;
        var resp = (HttpWebResponse)req.GetResponse();
        resp.Close();
    }
    catch
    {
        return;
    }
    }

     
    Monday, June 19, 2017 6:24 AM
  • Hi Vytautas Astera,

    I try to reproduce the issue on my side.

    I use VS 2010 and Excel 2007 to create Addin.

    then I publish the addin.

    I try to install the addin on Excel 2016 32 bit version.

    then I try to use VBA code to call the addin.

    I did not get any error and code run without any issue on my side.

    did I miss any steps ? if yes let me know about that, I will again try to make a test.

    I suggest you to make a test on different machine and let me know about the testing result.

    so that we can try to provide you further suggestion.

    other thing I test that I migrate the Addin project to VS 2015 and try to run it.

    I find that at that time also it runs without any issue.

    one thing I want to confirm with you that is your URL always take much more time then 5 seconds? if possible you can try to post your URL. so I can make a test with it.

    here I am just using the random URLs.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Tuesday, June 20, 2017 6:18 AM
    Moderator
  • I can't migrate to VS2015, because i need to be able work it on Excel 2007/2010. Also not sure about in my project add "Setup and Deployment" can migrate. This is big project developed around 7 years, also with some 3rd party tools which i use on windows forms, its a bit too complex to try migrate other .NET framework version just because of few code lines.

    Url is simple .aspx page, timeout 5s set just to make sure if there is slow internet connection it wont stuck :).

    As i wrote In my first post after i changed("upgraded") code and deployed to my clients setup, all with Excel 2016 started to crash, even i my office laptop with Excel 2016. After i commented new code it's started to work properly everywhere i installed it.

    Is there anyway i could manually "debug" errors or see whats happens? How can i see in what DLL what crashes or happens? If windows logs can log this crash i could do the same step by step ?

    Also maybe its for a new thread. But i would also want to solve some Excel issues which happens using My VSTO project C#/VBA code, sometimes in rare same(for e.g 1/1000) situations using same function maybe once a week it crashes with message Excel restarting and in windows logs i can see:

    Faulting application name: EXCEL.EXE, version: 15.0.4937.1000, time stamp: 0x591aa21f
    Faulting module name: EXCEL.EXE, version: 15.0.4937.1000, time stamp: 0x591aa21f
    Exception code: 0xc0000005
    Fault offset: 0x0083dcc7
    Faulting process id: 0x1b5c
    Faulting application start time: 0x01d2ea509cfa68d6
    Faulting application path: C:\Program Files (x86)\Microsoft Office\Office15\EXCEL.EXE
    Faulting module path: C:\Program Files (x86)\Microsoft Office\Office15\EXCEL.EXE
    Report Id: 3cd09717-2e92-4d9d-ac4d-dafde8cabca9
    Faulting package full name: 
    Faulting package-relative application ID:

    Sometimes Excel even puts my Add-In in Disabled Items after crash. On my developer Project it's never crashes. Also non of clients using Excel 2007 or Excel 2010 reported any crash. This is only on 2013/2016.

    But as i said maybe i should create new thread here? :) 

    Wednesday, June 21, 2017 8:22 AM
  • Hi Vytautas Astera,

    I want to confirm with you that , are you trying to run this code on a addin_startup event in your actual project?

    what if you move this code to button click on the ribbon?

    I suggest you to just check it for the testing purpose.

    so that we can know whether it create some issues on addin_startup and not working.

    the other thing I want to confirm with you that, do you have exactly only this code or you had provided the little different code for the sample.

    because when I made a test with same code , I did not get error.

    so it looks like there is some difference between our testing.

    let me know about your testing result.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, June 21, 2017 8:38 AM
    Moderator
  • Hi,

    The code was same, i just removed code which had no impact on changes.

    So i tried again to make this behavior and it seems i can't? I have checked history on Team Foundation server, seems I'm building and deploying same project with same code but it not crashing anymore, tried on 2 PC's with Office 2016 it's all fine now. Kind a sad that some "mystery" happens. Don't know what to add more.

    Friday, June 23, 2017 5:55 AM
  • Hi Vytautas Astera,

    from your last reply , it looks like your issue is solved now.

    if yes, then please try to mark your last post as an answer.

    so that we can close this thread.

    if you have any further question then let me know about that.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, June 23, 2017 6:00 AM
    Moderator