- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
We somehow manage to crash Revit when we run a CustomExporter from an IExternalEventHandler.Execute method. In fact the export is successful and completes and we don't get any managed exceptions whatsoever, but Revit crashes in unmanaged code somewhere in Utility.dll with access violation exception. Note that the crash does not occur consistentlty. Sometimes Revit crashesh and sometimes it does not which makes this issue even more strange.
Doing exactly the same export from an IExternalCommand does not crash Revit.
We have attached a Visual Studio solution with a dummy implementation of IExportContext that simply dumps everything to an XML file. To reproduce this:
1. Open the solution, adjust your Revit version in the post-build event command line and build the solution to install the plugin.
2. Open your Revit 20XX and allow the plugin "Application RevitExternalEventSpike" to load.
3. Open the "house" project, i.e. C:\Program Files\Autodesk\Revit 2018\Samples\rac_basic_sample_project.rvt
4. On the Revit menu on top you will see "External Event Spike". Click it.
5. You will see two buttons. The left one, called "Export View Window" opens a non-modal window which has a button that raises the external event. Click it and then click the button "Export view".
6. The custom exporter is invoked and it successfully exports the data to an xml file (DebugExportDump.xml in MyDocuments folder). After this the crash occurs sometimes.
7. Doing the same thing through an IExternalCommand, i.e. the right button called "Export view" again exports the view but Revit does not crash.
NOTE: This crash does not happen consistentlty. Sometimes Revit crashes and sometimes it does not which makes it even harder to determine the exact conditions and steps to reproduce this.
Unfortunately, we can't debug C:\Program Files\Autodesk\Revit 2018\Utility.dll so we are at a loss here.
However, here is what Visual Studio says after we attach the debugger. This is all the info that we can provide:
Unhandled exception at 0x00007FF86492C0F0 (Utility.dll) in Revit.exe: 0xC000041D: An unhandled exception was encountered during a user callback.
Version: 18.00.1.2
Original Location: C:\Program Files\Autodesk\Revit 2018\Utility.dll
Callstack:
> Utility.dll!00007ff86492c0f0() Unknown
DesktopMFC.dll!00007ff863b6ab9e() Unknown
DesktopMFC.dll!00007ff863a371b7() Unknown
mfc140u.dll!00007ff8635ec16c() Unknown
mfc140u.dll!00007ff8635ec544() Unknown
mfc140u.dll!00007ff86347cc51() Unknown
user32.dll!00007ff8b6a9bc50() Unknown
user32.dll!00007ff8b6a9b80b() Unknown
DesktopMFC.dll!00007ff863ab2b13() Unknown
DesktopMFC.dll!00007ff863aa5426() Unknown
user32.dll!00007ff8b6a9bc50() Unknown
user32.dll!00007ff8b6a9b94c() Unknown
user32.dll!00007ff8b6ab11f3() Unknown
ntdll.dll!00007ff8b95c90b4() Unknown
win32u.dll!00007ff8b64f1744() Unknown
user32.dll!00007ff8b6a9b652() Unknown
combase.dll!00007ff8b737f805() Unknown
combase.dll!00007ff8b737f0ee() Unknown
combase.dll!00007ff8b737ed6b() Unknown
combase.dll!00007ff8b73f1d5b() Unknown
combase.dll!00007ff8b73ed87c() Unknown
combase.dll!00007ff8b737ebb6() Unknown
combase.dll!00007ff8b73eede6() Unknown
combase.dll!00007ff8b73438dc() Unknown
rpcrt4.dll!00007ff8b93e18f1() Unknown
combase.dll!00007ff8b73432a9() Unknown
combase.dll!00007ff8b745eea2() Unknown
00007ff8367e7e0a() Unknown
00007ff8367e7b89() Unknown
00007ff8367e7b0b() Unknown
00007ff8367e7aba() Unknown
00007ff8367e75ff() Unknown
00007ff8367e726e() Unknown
clr.dll!00007ff8909c220e() Unknown
DesktopMFC.dll!00007ff863a98013() Unknown
Utility.dll!00007ff8642629c6() Unknown
Utility.dll!00007ff864278271() Unknown
Utility.dll!00007ff86426206b() Unknown
Utility.dll!00007ff864277e9b() Unknown
Utility.dll!00007ff8642781ca() Unknown
Utility.dll!00007ff86427786a() Unknown
KernelBase.dll!00007ff8b5a46913() Unknown
ntdll.dll!00007ff8b95f6711() Unknown
ntdll.dll!00007ff8b95c9020() Unknown
ntdll.dll!00007ff8b95ca08d() Unknown
ntdll.dll!00007ff8b9539c58() Unknown
ntdll.dll!00007ff8b95c910e() Unknown
Utility.dll!00007ff86492c0f0() Unknown
DesktopMFC.dll!00007ff863b6ab9e() Unknown
DesktopMFC.dll!00007ff863a371b7() Unknown
mfc140u.dll!00007ff8635ec16c() Unknown
mfc140u.dll!00007ff8635ec544() Unknown
mfc140u.dll!00007ff86347cc51() Unknown
user32.dll!00007ff8b6a9bc50() Unknown
user32.dll!00007ff8b6a9b80b() Unknown
DesktopMFC.dll!00007ff863ab2b13() Unknown
DesktopMFC.dll!00007ff863aa5426() Unknown
user32.dll!00007ff8b6a9bc50() Unknown
user32.dll!00007ff8b6a9b94c() Unknown
user32.dll!00007ff8b6ab11f3() Unknown
ntdll.dll!00007ff8b95c90b4() Unknown
win32u.dll!00007ff8b64f1744() Unknown
user32.dll!00007ff8b6a9b652() Unknown
mfc140u.dll!00007ff8635d35b2() Unknown
mfc140u.dll!00007ff8635d3ff3() Unknown
mfc140u.dll!00007ff863609ff7() Unknown
Revit.exe!00007ff7e846127f() Unknown
kernel32.dll!00007ff8b8db2774() Unknown
ntdll.dll!00007ff8b9590d61() Unknown
Threads:
Not Flagged 17164 0 Worker Thread ucrtbase.dll thread AcIPC_2_x64.dll!00007ff88f3bad69 Normal
Not Flagged > 18312 0 Main Thread Main Thread Utility.dll!00007ff86492c0f0 Normal
Not Flagged 3712 0 Worker Thread ntdll.dll thread ntdll.dll!00007ff8b95c8c44 Normal
Not Flagged 9820 0 Worker Thread ntdll.dll thread ntdll.dll!00007ff8b95c8c44 Normal
Not Flagged 14920 0 Worker Thread ntdll.dll thread ntdll.dll!00007ff8b95c8c44 Normal
Not Flagged 17108 0 Worker Thread ucrtbase.dll thread mfc140u.dll!00007ff86358f85c Normal
Not Flagged 23220 0 Worker Thread ntdll.dll thread ntdll.dll!00007ff8b95c8c44 Normal
Not Flagged 19348 0 Worker Thread ucrtbase.dll thread AcIPC_2_x64.dll!00007ff88f3b8940 Normal
Not Flagged 17652 0 Worker Thread ucrtbase.dll thread AcIPC_2_x64.dll!00007ff88f3bad69 Normal
Not Flagged 9156 0 Worker Thread gdiplus.dll thread gdiplus.dll!00007ff86ab6faf8 Normal
Not Flagged 23056 0 Worker Thread ucrtbase.dll thread AcIPC_2_x64.dll!00007ff88f3bad69 Normal
Not Flagged 21996 0 Worker Thread ucrtbase.dll thread AcIPC_2_x64.dll!00007ff88f3b8940 Normal
Not Flagged 13876 0 Worker Thread ucrtbase.dll thread AcIPC_2_x64.dll!00007ff88f3bad69 Normal
Not Flagged 1744 0 Worker Thread mswsock.dll thread mswsock.dll!00007ff8b524fe29 Above Normal
Not Flagged 18740 0 Worker Thread msvcr110.dll thread adlmint.dll!00007ff851ea9178 Normal
Not Flagged 24304 0 Worker Thread ucrtbase.dll thread Qt5Core_Ad_5.dll!00000000523b19d7 Normal
Not Flagged 22480 0 Worker Thread ucrtbase.dll thread Qt5Core_Ad_5.dll!00000000523b19d7 Normal
Not Flagged 7756 0 Worker Thread ucrtbase.dll thread Qt5Core_Ad_5.dll!00000000523b19d7 Normal
Not Flagged 368 0 Worker Thread ucrtbase.dll thread Qt5Core_Ad_5.dll!00000000523b19d7 Normal
Not Flagged 21776 0 Worker Thread ucrtbase.dll thread Qt5Core_Ad_5.dll!00000000523b19d7 Normal
Not Flagged 13024 0 Worker Thread ucrtbase.dll thread Qt5Core_Ad_5.dll!00000000523b19d7 Normal
Not Flagged 5680 0 Worker Thread ucrtbase.dll thread Qt5Core_Ad_5.dll!00000000523b19d7 Normal
Not Flagged 9188 0 Worker Thread ucrtbase.dll thread Qt5Core_Ad_5.dll!000000005231f67d Normal
Not Flagged 17588 0 Worker Thread ucrtbase.dll thread Qt5Core_Ad_5.dll!00000000521e4608 Normal
Not Flagged 7748 0 Worker Thread ucrtbase.dll thread Qt5Core_Ad_5.dll!00000000521e4608 Normal
Not Flagged 13896 0 Worker Thread ucrtbase.dll thread Qt5Core_Ad_5.dll!00000000521e4608 Normal
Not Flagged 7220 0 Worker Thread clr.dll thread clr.dll!00007ff890b0d862 Normal
Not Flagged 13488 0 Worker Thread clr.dll thread clr.dll!00007ff890add39f Highest
Not Flagged 9220 0 Worker Thread ntdll.dll thread ntdll.dll!00007ff8b95c8c44 Normal
Not Flagged 6284 0 Worker Thread ntdll.dll thread ntdll.dll!00007ff8b95c8c44 Normal
Not Flagged 5140 0 Worker Thread combase.dll thread combase.dll!00007ff8b7382ce3 Normal
Not Flagged 13336 0 Worker Thread ucrtbase.dll thread Qt5Core_Ad_5.dll!00000000523b19d7 Normal
Not Flagged 13756 0 Worker Thread wpfgfx_v0400.dll thread wpfgfx_v0400.dll!00007ff84f2416e2 Normal
Not Flagged 1340 0 Worker Thread ntdll.dll thread ntdll.dll!00007ff8b95c8c44 Normal
Not Flagged 16724 0 Worker Thread ntdll.dll thread ntdll.dll!00007ff8b95c8c44 Normal
Not Flagged 19992 0 Worker Thread winmm.dll thread winmm.dll!00007ff8b3d729d0 Time Critical
Not Flagged 15620 0 Worker Thread combase.dll thread combase.dll!00007ff8b7382ce3 Normal
Not Flagged 15652 0 Worker Thread ucrtbase.dll thread mfc140u.dll!00007ff86358f3fe Normal
Not Flagged 7060 0 Worker Thread clr.dll thread clr.dll!00007ff8909c9dcd Normal
Not Flagged 5624 0 Worker Thread clr.dll thread clr.dll!00007ff890b845da Normal
Not Flagged 8424 0 Worker Thread AddInJournalEngine.dll thread win32u.dll!00007ff8b64f1144 Normal
Not Flagged 17808 0 Worker Thread clr.dll thread clr.dll!00007ff890a0e26c Normal
Not Flagged 14884 0 Worker Thread clr.dll thread clr.dll!00007ff890a0e26c Normal
Not Flagged 9928 0 Worker Thread clr.dll thread clr.dll!00007ff890b845da Normal
Not Flagged 18028 0 Worker Thread msvcr100.dll thread Chronicle.dll!00007ff84049e07f Normal
Not Flagged 20952 0 Worker Thread msvcr100.dll thread cgauth.net.dll!00007ff8403d9187 Normal
Not Flagged 19276 0 Worker Thread msvcr100.dll thread mswsock.dll!00007ff8b52485a2 Normal
Not Flagged 8636 0 Worker Thread ucrtbase.dll thread tbb.dll!00007ff89631fba2 Normal
Not Flagged 6652 0 Worker Thread rti-16.dll thread rti-16.dll!00007ff8466adb48 Normal
Not Flagged 5176 0 Worker Thread rti-16.dll thread rti-16.dll!00007ff8466adb48 Normal
Not Flagged 4052 0 Worker Thread rti-16.dll thread rti-16.dll!00007ff8466adb48 Normal
Not Flagged 11828 0 Worker Thread rti-16.dll thread rti-16.dll!00007ff8466adb48 Normal
Not Flagged 20040 0 Worker Thread rti-16.dll thread rti-16.dll!00007ff8466adb48 Normal
Not Flagged 19068 0 Worker Thread rti-16.dll thread rti-16.dll!00007ff8466adb48 Normal
Not Flagged 12456 0 Worker Thread rti-16.dll thread rti-16.dll!00007ff8466adb48 Normal
Not Flagged 8020 0 Worker Thread rti-16.dll thread rti-16.dll!00007ff8466adb48 Normal
Not Flagged 15016 0 Worker Thread nvwgf2umx.dll thread nvwgf2umx.dll!00007ff8818b0883 Above Normal
Not Flagged 14628 0 Worker Thread nvwgf2umx.dll thread nvwgf2umx.dll!00007ff88199317f Idle
Not Flagged 10360 0 Worker Thread nvwgf2umx.dll thread nvwgf2umx.dll!00007ff88199317f Idle
Not Flagged 10544 0 Worker Thread nvwgf2umx.dll thread nvwgf2umx.dll!00007ff88199317f Idle
Not Flagged 10548 0 Worker Thread nvwgf2umx.dll thread nvwgf2umx.dll!00007ff88199317f Idle
Not Flagged 19548 0 Worker Thread msvcrt.dll thread jscript9.dll!00007ff83d0d806c Below Normal
Not Flagged 10796 0 Worker Thread msvcrt.dll thread jscript9.dll!00007ff83d14631f Normal
Not Flagged 11560 0 Worker Thread ucrtbase.dll thread tbb.dll!00007ff8963212b1 Normal
Not Flagged 8944 0 Worker Thread ucrtbase.dll thread tbb.dll!00007ff8963212b1 Normal
Not Flagged 21540 0 Worker Thread ucrtbase.dll thread tbb.dll!00007ff8963212b1 Normal
Not Flagged 23424 0 Worker Thread ucrtbase.dll thread tbb.dll!00007ff8963212b1 Normal
Not Flagged 6280 0 Worker Thread ucrtbase.dll thread tbb.dll!00007ff8963212b1 Normal
Not Flagged 13448 0 Worker Thread ucrtbase.dll thread tbb.dll!00007ff8963212b1 Normal
Not Flagged 18116 0 Worker Thread ucrtbase.dll thread tbb.dll!00007ff8963212b1 Normal
Not Flagged 23284 0 Worker Thread msvcr100.dll thread vray.dll!00007ff838cda617 Normal
Not Flagged 22296 0 Worker Thread msvcr100.dll thread mswsock.dll!00007ff8b52485a2 Normal
Not Flagged 19652 0 Worker Thread msvcr100.dll thread win32u.dll!00007ff8b64f1144 Normal
Not Flagged 18100 0 Worker Thread msvcr100.dll thread VRaySDKLibrary.dll!00007ff83faa3bb7 Above Normal
Not Flagged 10564 0 Worker Thread msvcr100.dll thread VRaySDKLibrary.dll!00007ff83faa3bb7 Above Normal
Not Flagged 14128 0 Worker Thread ntdll.dll thread ntdll.dll!00007ff8b95c8c44 Normal
Not Flagged 12316 0 Worker Thread ntdll.dll thread ntdll.dll!00007ff8b95c8c44 Normal
Not Flagged 11872 0 Worker Thread ntdll.dll thread ntdll.dll!00007ff8b95c8c44 Normal
Not Flagged 4884 0 Worker Thread nvwgf2umx.dll thread nvwgf2umx.dll!00007ff881f4d5e5 Normal
Not Flagged 5248 0 Worker Thread ntdll.dll thread ntdll.dll!00007ff8b95c8c44 Normal
Not Flagged 20380 0 Worker Thread nvwgf2umx.dll thread nvwgf2umx.dll!00007ff88199317f Idle
Not Flagged 6676 0 Worker Thread nvwgf2umx.dll thread nvwgf2umx.dll!00007ff88199317f Idle
Not Flagged 21176 0 Worker Thread nvwgf2umx.dll thread nvwgf2umx.dll!00007ff88199317f Idle
Not Flagged 20092 0 Worker Thread nvwgf2umx.dll thread nvwgf2umx.dll!00007ff88199317f Idle
Not Flagged 20616 0 Worker Thread ntdll.dll thread ntdll.dll!00007ff8b95c8c44 Normal
Not Flagged 23228 0 Worker Thread ntdll.dll thread ntdll.dll!00007ff8b95c8c44 Normal
Not Flagged 19604 0 Worker Thread nvwgf2umx.dll thread nvwgf2umx.dll!00007ff88199317f Normal
Not Flagged 18360 0 Worker Thread Win64 Thread 00007ff8308de226 Normal
Not Flagged 9560 0 Worker Thread Win64 Thread 00007ff8308de226 Normal
Not Flagged 6920 0 Worker Thread Win64 Thread 00007ff8308de226 Normal
Not Flagged 22200 0 Worker Thread Win64 Thread 00007ff8308de226 Normal
Not Flagged 15680 0 Worker Thread Win64 Thread 00007ff8308de226 Normal
Not Flagged 13412 0 Worker Thread Win64 Thread 00007ff8308de226 Normal
Not Flagged 17620 0 Worker Thread Win64 Thread 00007ff8308de226 Normal
Not Flagged 24524 0 Worker Thread Win64 Thread 00007ff8308de226 Normal
Not Flagged 17256 0 Worker Thread clr.dll thread clr.dll!00007ff8909c54e7 Normal
Not Flagged 13428 0 Worker Thread msvcr100.dll thread 000002ed532f65d0 Normal
Not Flagged 22160 0 Worker Thread vray.dll thread vray.dll!00007ff83a4d0a36 Normal
Not Flagged 6120 0 Worker Thread vray.dll thread vray.dll!00007ff83a4d0a36 Normal
Not Flagged 14056 0 Worker Thread vray.dll thread vray.dll!00007ff83a4d0a36 Normal
Not Flagged 21520 0 Worker Thread vray.dll thread vray.dll!00007ff83a4d0a36 Normal
Not Flagged 11992 0 Worker Thread vray.dll thread vray.dll!00007ff83a4d0a36 Normal
Not Flagged 12204 0 Worker Thread vray.dll thread vray.dll!00007ff83a4d0a36 Normal
Not Flagged 7892 0 Worker Thread vray.dll thread vray.dll!00007ff83a4d0a36 Normal
Not Flagged 19960 0 Worker Thread vray.dll thread vray.dll!00007ff83a4d0a36 Normal
Not Flagged 22016 0 Worker Thread msvcr100.dll thread vray.dll!00007ff839b7652b Normal
Not Flagged 21112 0 Worker Thread msvcr100.dll thread vray.dll!00007ff839b7652b Normal
Not Flagged 8148 0 Worker Thread msvcr100.dll thread vray.dll!00007ff839b7652b Normal
Not Flagged 12788 0 Worker Thread msvcr100.dll thread vray.dll!00007ff839b7652b Normal
Not Flagged 8356 0 Worker Thread msvcr100.dll thread vray.dll!00007ff839b7652b Normal
Not Flagged 23468 0 Worker Thread msvcr100.dll thread vray.dll!00007ff839b7652b Normal
Not Flagged 19480 0 Worker Thread msvcr100.dll thread vray.dll!00007ff839b7652b Normal
Not Flagged 11452 0 Worker Thread msvcr100.dll thread vray.dll!00007ff839b7652b Normal
Not Flagged 17332 0 Worker Thread clr.dll thread clr.dll!00007ff8909c859e Normal
Not Flagged 16968 0 Worker Thread clr.dll thread clr.dll!00007ff890a0e26c Normal
Not Flagged 19492 0 Worker Thread clr.dll thread clr.dll!00007ff890a0e26c Normal
Not Flagged 19208 0 Worker Thread clr.dll thread clr.dll!00007ff890a0e26c Normal
Not Flagged 5836 0 Worker Thread clr.dll thread clr.dll!00007ff890a0e26c Normal
Not Flagged 4624 0 Worker Thread clr.dll thread mscoreei.dll!00007ff8920aa39d Normal
Not Flagged 10040 0 Worker Thread clr.dll thread ntdll.dll!00007ff8b95c5434 Normal
Not Flagged 18520 0 Worker Thread clr.dll thread ntdll.dll!00007ff8b95c5434 Normal
Not Flagged 6236 0 Worker Thread clr.dll thread ntdll.dll!00007ff8b95c5434 Normal
Not Flagged 19152 0 Worker Thread clr.dll thread ntdll.dll!00007ff8b95c5434 Normal
Not Flagged 3500 0 Worker Thread clr.dll thread ntdll.dll!00007ff8b95c5434 Normal
Not Flagged 20700 0 Worker Thread clr.dll thread ntdll.dll!00007ff8b95c5434 Normal
Not Flagged 4012 0 Worker Thread clr.dll thread ntdll.dll!00007ff8b95c5434 Normal
Can anyone from the dev team give us a hand with this one. We know that the information provided might not be enough, but you may have encountered similar behavior before.
Thanks in advance.
Solved! Go to Solution.