Revit crasching when exporting IFC (Resolved with 3.3.1)

Please note: Should you experience issues with Enscape or your subscription, and in case of any urgent inquiries/questions (e.g. regarding our upcoming licensing changes) please reach out to our dedicated support team via the Help Center or Support button as detailed here.
  • Hi,

    We have had som problems latley with Revit crashing when we try to export IFC. After a bit of troubleshooting it seems to be Enscape that is the problem. If we uninstall Enscape it works like it should with the IFC Export. It seems to appear randomly and not all computers are effected. When the problem appears Revit just quits, without any warning, when the user clicks on export IFC. The dialog for Export IFC don't show up. We disabled all the addinns and then the Export IFC worked. We enabled all the addins again and now we get to the dialog for Export IFC, but it crashed whe we tyied to run the export. If disable just the .addin-file for Enscape it works and if we unistall Enscape it works. Somtimes it works to export IFC if we reinstall Enscape, but not everytime. When the crashes happens we can see an Application Error in the Windows Event Viewer. It seems to be an error between Revit.exe and clr.dll (Microsoft.Net?)


    Anyone who had the same problem?

  • Go to Best Answer
    • Official Post

    JohnFN , please kindly send us a Feedback Report with your log files - Based on that we can then figure what could be done about this after troubleshooting the exact cause behind your Revit crashes. Thank you in advance!

  • Now I have assisted a user that got this problem. The user works in Revit 2020. The project is places on BIM 360. He used the built-in IFC exporter but it have some limitations so we upgraded to the latest relese on GitHub, https://github.com/Autodesk/revit-ifc. After the installation Revit crashed when he tried to use the Export IFC. I renamed the file 0_Enscape.addin in the 2020 addins folder and restarted Revit and now it works. On his computer 2020 is the latest Revit version and the Enscape version is 3.2.

    • Official Post

    Now I have assisted a user that got this problem. The user works in Revit 2020. The project is places on BIM 360. He used the built-in IFC exporter but it have some limitations so we upgraded to the latest relese on GitHub, https://github.com/Autodesk/revit-ifc. After the installation Revit crashed when he tried to use the Export IFC. I renamed the file 0_Enscape.addin in the 2020 addins folder and restarted Revit and now it works. On his computer 2020 is the latest Revit version and the Enscape version is 3.2.

    Thanks for your response.


    If possible, please still send us a Feedback Report as mentioned since this will allow us to have a look at your logs to potentially troubleshoot the cause behind this incompatibility/issue.

  • Hi John and Demian,


    I'm currently facing the same issue as you John. However, I'm not an Enscape user, but we are developers for a Revit add-in as well.


    A client of ours uses Enscape, and had issues when using the IFC-exporter as well. It doesn't seem to be localized to only 1 Revit version however. My client has this issue in Revit 2021, and I've been able to reproduce in both Revit 2021, and 2019 (currently installed on my machine).


    So far what John did with the addin manifest seems to fix it, however I can't find any explanation as to why. When I renamed the Enscape manifest and restarted Revit (or simply move the manifest to another directory), the IFC-export tool works without any issues. Even after putting back the Enscape manifest, the IFC-export is working again. I did this for my Revit 2021 installation, and haven't been able to reproduce the problem again for that version.


    Here is all the debug information I found while diving deeper into this crash. I hope it helps you guys, and if there is any information that I could provide for you guys, please let me know. If we could solve this (for my client too), I'd be a happy developer. If you want to get into further contact, you can always send me an email (I can give you my email through a DM).


    Good luck!


    ______________________


    So first, I took a look with the Assembly Binding Log Viewer (fuslogvw). And one of the things I noticed is that most of the Enscape assemblies come with a "Partial bind" error. The functionality of Enscape seems to be unaffected however. I've also attached two of the logs named "flog1.txt" and "flog2.txt" (they are pretty much the same, except for the DLL they're referring too ofcourse).


    When attaching my debugger, I noticed these issues:


    The crash seems to happen when the IFC-exporter tries to open a settingsfile from the IsolatedStorageFile. When it goes into line 25, it gives the CLR-crash that John described. Because even though the file-reading fails, it should be catched by the Try-catch block and return a new "Rect" object.


    - Now what seems to happen is a Stackoverflow error after failing to read the settings file by the IFC exporter. It ends up in the Enscape.Common.dll where it get's in an infinite loop. I presume some kind of Revit event handler that isn't handling some edge-case correctly.


    - At least, it seems that the FirstChanceException handler is re-throwing itself, trying to write something to a logfile. At first the error is thrown by FileStream.Init(), which throws an _Error.WinIOError(). After that, the FirstChanceException handler from Enscape keeps throwing itself while trying to write to a log file.


    - Now of course, you have obfuscated your DLL's, which makes sense. So I can't really see much of what's happening in Enscape.Common.DLL, but I did try to check the code in DotPeek. Maybe with this, you at least know where to look in your codebase.

    - As we could see in the stacktrace, the FirstChanceException handler is added here, which will be thrown on any exception within the AppDomain, which is kinda dangerous in my opinion. Because every plugin in the whole Revit installation can throw this event, which will end up in Enscape event handler. So I can only assume that this would cause conflicts with more add-ins than just IFC-exporter.

  • MartijnKalecSoftware , that sounds exatly like the issue we have. We run all the revit versions from 2018 to 2022, depending on the project, and it seems like it appears on all the versions. If we rename the Enscape .addin (manifest??) for one version it seems like the issue is fixed for that version, but it remains on the other versions.

    Hopefully you guys on Enscape can solve this now?

  • I don't know, really. I have recived som emails from their support asking me to install other versions of Enscape. First they told me that they had a hotfix (3.2.0+65063) we run 3.2.0+63301, and they asked me to install it to see if it helped. It didn't. Then they asked me to install an older version, 3.1.2, and it worked. Then i reinstalled 3.2.2 again and it worked after that on my testcomputer. So, some uninstalling and reinstalling seems to fix the problem, but what is causing it?

  • Yeah it seems that there isn't a particular fix in the new builds, but I'm not sure of course. But at least removing/disabling Enscape, and starting Revit without it seems to fix the problem.


    Basically what seems to happen is:
    - Another addin besides Enscape throws an error, that it normally would handle by itself. In this particular case, IFC-exporter tries to open a file, that's not in the system.

    - IFC-exporter wants to handle that error, by simply creating a new file.

    - But before IFC-exporter can even handle it's own error, Enscape catches the error in their add-in, doesn't handle it properly, which then crashes Revit.


    The reason for this is that the Enscape addin is "subscribed" to any event where an error happens within Revit, even other addins. And Enscape didn't handle this certain case with IFC-exporter properly, which makes sense, because you can't really know what you are going to get, when another addin gives you an error to deal with.


    But as a little disclaimer. This is only what I think is happening, based on a small amount of information I can look at. Because I can't look directly at their code of course.

    • Official Post

    JohnFN , MartijnKalecSoftware , thanks for your further replies and Feedback.


    This is still something our developers will have to further look into - JohnFN , I can see that you also replied back to my colleague, so he will thus also use the existing info to further look into this with the devs. If there is any further news to share, we will get back to you again as well.

  • Thank you for your issue I have the same experience, all Revit versions 2018 till 2022 have IFC export crashes as soon I start the IFC export menu option,

    This is since the new version in december.

    Only de-installing the Enscape add in solves the problem.

  • Demian Gutberlet Is there any timeline to researching/solving this issue? I've basically spend a few hours of my time trying to figure out what is exactly going wrong, and I've pointed you to the exact issue (even the file) in the codebase where the problem lies. So I'm not sure what 'further looking into' is even gonna do. It mostly sounds like this issue is not high on your to-do list.


    I get that I sound agitated, and that's because I am. It's been almost a month since I basically gave you the solution, and in the meanwhile I have multiple clients in my mailbox complaining about our Revit addin not working. And I can't even solve it for them, except for spending my time to deactivate/reactivate Enscape. I've got other things to do.

    • Official Post

    Demian Gutberlet Is there any timeline to researching/solving this issue? I've basically spend a few hours of my time trying to figure out what is exactly going wrong, and I've pointed you to the exact issue (even the file) in the codebase where the problem lies. So I'm not sure what 'further looking into' is even gonna do. It mostly sounds like this issue is not high on your to-do list.


    I get that I sound agitated, and that's because I am. It's been almost a month since I basically gave you the solution, and in the meanwhile I have multiple clients in my mailbox complaining about our Revit addin not working. And I can't even solve it for them, except for spending my time to deactivate/reactivate Enscape. I've got other things to do.

    My apologies, I can understand the frustration of course - We appreciate the info and research you shared with us so I've gathered everything to forward to our developers directly. There has been some slight miscommunication internally which is why there has been a delay as well.


    Our developers should get back to me again in the next few days, then I will immediately get back to you too.

  • I had this issue recently as well It seems the IFC Exporter for the 2022 Revit version has had some issues. The only thing I figured out is that there is always a new update now on the IFC Exporter on Git Hub and not on the autodesk Apps website .

    And second thing how to make it work for some reason when you launch Revit as administrator it works flawlessly. If I launch it as normal user it will always have the same crash as you are facing.

    I already talked to Autodesk support about it and talked it about the IFC Exporter developer with it and nobody can really understand why its like that on my PC ( Even after giving literally all Revit related folder administrator rights on Windows it still crashes when launching revit not as Admin)


    Edit: I got the tip from the IFC Exporter developer that they are planing to integrate the app into the autodesk desktop app menu for revit thats why it wont be anymore on the addons website

    • Official Post

    Everyone, this is still under review with our developers - I really appreciate all the input given so far, as mentioned above, I'll also get back to you again if there is either an ETA for a solution or news in general.

  • Hi,


    I didn't want to open a new topic because the problem is similar...

    Revit crash upon clicking IFC export and this problem is related to Enscape.

    I have removed Enscape addin for Revit 2022, IFC Export works. move addin back, IFC crashes Revit.


    I´m using Revit Ver. 22.1.21.13 and Enscape 3.2.


    A large number of users have the same problem!


    Do you have any solution to this problem?


    Thanks

  • We have the same problem at our company, 5 users with Revit 2022 with Enscape 3.2. When we all export to IFC Revit crashes every single time.


    When we downgrade from Enscape 3.2 to Enscape 3.1 this problem disappears for everyone, so it seems Enscape 3.2 is causing a problem for IFC export.


    Has this problem been recognized ? Is a solution on it's way ?