Repository navigation
Description
Description
When run the Autodesk Revit 2025 application with the latest .NET 10 build, it is closed unexpectedly after closing File > Options window.
Reproduction Steps
Please get the repro machine information from devdiv bug
The machine only has the .NET 10 Preview3 runtime and set environment variables DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX=2:
- Launch Revit 2025.exe.
- If the "Options - Hardware Acceleration" window pops up, click the “Close” button.
- Click the "Home" button on left top
- Click "File" menu.
- Click "Options".
- Close the "Options" window and click anywhere in application.
Expected behavior
The application can continue work after closing "Options" window.
Actual behavior
Error Report window appear and then the application is closed unexpectedly.
Regression?
Yes
Verify Scenarios:
1). Windows 10 22H2 AMD64 + dotnet-sdk-8.0.407: Pass
2). Windows 10 21H2 AMD64 + dotnet-sdk-9.0.202: Pass
3). Windows 10 21H2 AMD64 + 10.0.100-preview.2.25164.34: Pass
4). Windows 10 22H2 AMD64 + dotnet-sdk-10.0.100-preview.3.25168.9: Fail
Known Workarounds
No response
Configuration
Application Name: Autodesk Revit 2025
OS: Windows 10 21H2
CPU: X64
.NET Build Number: dotnet-sdk-10.0.100-preview.3.25168.9
Other information
Findings:
The application log journal.0003.txt and minidump.dmp file are all attached in ErrorDetails.zip file
.
From the application log, it shows below exception with stack trace:
'C 21-Mar-2025 02:51:16.948; DBG_INFO: Managed exception caught from external API application 'Autodesk.StructuralRibbon.Application' in method 'Void Execute(Autodesk.Revit.UI.UIApplication).' Exception type: '<System.NullReferenceException>,' Exception method: '<Object reference not set to an instance of an object.>,' Stack trace ' at Autodesk.Revit.UI.StructuralRibbon.VisibilityManager.Execute(UIApplication application)
' at Autodesk.Revit.UI.IExternalEventHandlerBridge.execute_(IExternalEventHandlerBridge*, RevitApplication* pApp).': line 112 of F:\Ship25.4\2025_px64\Source\API\RevitAPIUI\Objects\APIExternalEvent.cpp.
' 0:< External event handler <Dialog option event handler for Structural Ribbon> failed with an exception {System exception}. The event was registered by an AddIn StructuralRibbon (844fae81-bbed-4b1e-aa6f-06ef261f6096)
And here is the stack from minidump:
STACK_TEXT:
00000050`d0f29560 00007ffb`50e25f1b : 00000000`00000000 00000000`00000000 00000050`d0f296b8 00000050`d0f296b0 : coreclr!__report_gsfailure+0x1d
00000050`d0f295a0 00007ffb`50e21578 : 00000000`00000000 00000000`00000000 00000000`00000000 00000050`d0f2ab20 : coreclr!JIT_FailFast+0xb
00000050`d0f295d0 00007ffb`50d1f653 : 00000050`d0f297b0 00000000`00000000 00007ffa`f9614f24 00007ffa`f9320000 : coreclr!Frame::GetFunction+0x98
00000050`d0f29600 00007ffb`50d1e9c7 : 00000050`00000000 00007ffa`f9320000 00000050`d0f2e750 00000000`00000000 : coreclr!StackFrameIterator::NextRaw+0x893
00000050`d0f296a0 00007ffb`50d1fa2a : 00000050`d0f29701 000001ba`00000000 00000050`d0f29a58 00000050`d0f2a050 : coreclr!StackFrameIterator::Filter+0x223
00000050`d0f29740 00007ffb`50d1e659 : 00000000`00000002 00000050`d0f29870 000001ba`f6b6dbb0 00000000`000001a8 : coreclr!StackFrameIterator::Init+0x15e
00000050`d0f29770 00007ffb`50d1df95 : 000001ba`f7062590 00007ffb`50effa50 000001fb`ab1b1e38 00007ffb`e94db86b : coreclr!Thread::StackWalkFramesEx+0x89
00000050`d0f29b50 00007ffb`50effc21 : 00000050`d0f2c210 00000050`d0f2c210 000001ba`f2270000 00000000`00000002 : coreclr!Thread::StackWalkFrames+0xb9
00000050`d0f2ac70 00007ffb`50f00894 : 00000000`00000000 00000000`00000000 00000000`80131506 00000000`00000000 : coreclr!LogCallstackForLogWorker+0x121
00000050`d0f2ad50 00007ffb`50effd60 : 00000000`80131506 00000000`00000000 00007ffb`50e9d7d3 00000000`00000000 : coreclr!LogInfoForFatalError+0x218
00000050`d0f2adf0 00007ffb`50eff607 : 00000000`80131506 00007ffb`50e9d7d3 000001fb`9add0000 00007ffb`50daeea4 : coreclr!EEPolicy::LogFatalError+0x60
00000050`d0f2bab0 00007ffb`50e9d7f2 : 00000050`d0f2c210 00000050`d0f2c970 00000050`d0f2c210 00000050`d0f30000 : coreclr!EEPolicy::HandleFatalError+0x133
00000050`d0f2c0b0 00007ffb`50df9e53 : 000001ba`f7062590 00000050`d0f30000 00000050`d0f30000 000001bb`043f8290 : coreclr!CLRVectoredExceptionHandlerPhase2+0xa398e
00000050`d0f2c110 00007ffb`50df9d7d : 00000000`00000000 00000050`d0f30000 00000000`00000000 00007ffa`f7ebdd37 : coreclr!CLRVectoredExceptionHandler+0x93
00000050`d0f2c180 00007ffb`e9529b4c : 00007ffb`50df9ca0 00000000`00000000 000001ba`f6f6a600 00000000`00000000 : coreclr!CLRVectoredExceptionHandlerShim+0xdd
00000050`d0f2c1d0 00007ffb`e9502376 : 00000050`d0f2c970 00000050`d0f2c480 00000000`00000000 00007ffb`50cc0000 : ntdll!RtlpCallVectoredHandlers+0x108
00000050`d0f2c270 00007ffb`e95513ce : 00000050`d0f2e600 000001bb`043f7f48 00000000`00000000 000001ba`fb844648 : ntdll!RtlDispatchException+0x66
00000050`d0f2c480 00007ffb`50d1d6fa : 00000050`d0f2cd50 00007ffb`50d1f67d 00000000`00000000 00000000`00010082 : ntdll!KiUserExceptionDispatch+0x2e
00000050`d0f2cb90 00007ffb`50d1f75b : 00000050`d0f2cc60 00007ffa`f302f082 00000000`00000000 00000000`00000000 : coreclr!ExceptionTracker::IsInStackRegionUnwoundBySpecifiedException+0x16
00000050`d0f2cbc0 00007ffb`50d1e98c : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : coreclr!ExceptionTracker::HasFrameBeenUnwoundByAnyActiveException+0xa7
00000050`d0f2cc40 00007ffb`50d1fa2a : 00000050`d0f2cd01 000001ba`00000000 00000050`d0f2cff8 00000050`d0f2d5f0 : coreclr!StackFrameIterator::Filter+0x1e8
00000050`d0f2cce0 00007ffb`50d1e659 : 00000000`00000002 00000050`d0f2ce10 000001ba`f6b6dbb0 00000000`000001a8 : coreclr!StackFrameIterator::Init+0x15e
00000050`d0f2cd10 00007ffb`50d1df95 : 000001ba`f7062590 00007ffb`50d9eae0 00000000`00000000 00007ffa`00000000 : coreclr!Thread::StackWalkFramesEx+0x89
00000050`d0f2d0f0 00007ffb`50d1de50 : 00000000`00043466 00000050`d0f2e650 00000000`2f467000 00000000`00341150 : coreclr!Thread::StackWalkFrames+0xb9
00000050`d0f2e210 00007ffb`50d1dc68 : 000001ba`f7062590 00000000`00000002 00007ffb`50ce5540 00000000`00000000 : coreclr!ScanStackRoots+0xec
00000050`d0f2e280 00007ffb`50ce6e5f : 00000000`000001c0 00000050`d0f2e330 000001fb`92d696c0 00000000`00000000 : coreclr!GCToEEInterface::GcScanRoots+0xac
00000050`d0f2e2c0 00007ffb`50cde76b : 00000000`00000000 00000000`00000000 00000002`69d82000 00007ffb`50ccef69 : coreclr!WKS::gc_heap::mark_phase+0x1d7
00000050`d0f2e370 00007ffb`50cce76e : 00000000`00022e86 00000000`00022e86 00000000`00000001 00000000`00000000 : coreclr!WKS::gc_heap::gc1+0x57
00000050`d0f2e3c0 00007ffb`50ce8462 : 00000000`00000001 00000000`00000000 00000000`00000000 00007ffb`51113fc8 : coreclr!WKS::gc_heap::garbage_collect+0x17a
00000050`d0f2e410 00007ffb`50deb97a : 00000008`2ac660aa 00000000`00000000 00000000`00000000 00000000`00000000 : coreclr!WKS::GCHeap::GarbageCollectGeneration+0x13e
00000050`d0f2e470 00007ffb`50deb270 : 00000000`00000000 00007ffb`5110867c 00007ffb`5110867c 00000000`00000000 : coreclr!WKS::gc_heap::trigger_gc_for_alloc+0x26
00000050`d0f2e4a0 00007ffb`50deb105 : 00000000`00000000 000001ba`f6b6dd08 00000000`00000028 00000000`00000000 : coreclr!WKS::gc_heap::try_allocate_more_space+0x144
00000050`d0f2e500 00007ffb`50ce1de7 : 000001bb`06800178 00000000`00000028 000001ba`f6b6dd08 00007ffa`f8776781 : coreclr!WKS::gc_heap::allocate_more_space+0x31
00000050`d0f2e530 00007ffb`50d0070b : 00000050`d0f2e5c0 00000000`00000028 00000000`00000100 000001bb`043ffa20 : coreclr!WKS::GCHeap::Alloc+0x97
00000050`d0f2e570 00007ffb`50d00545 : 00000000`00000007 000001ba`f6b6dd08 00000000`00000000 000001fb`8e1b085c : coreclr!AllocateString+0x143
00000050`d0f2e600 00007ffa`f93d1699 : 000001bb`0078ff50 000001bb`043fff90 000001bb`043fffa8 00000050`d0f2e7c0 : coreclr!FramedAllocateString+0x85
00000050`d0f2e750 000001bb`0078ff50 : 000001bb`043fff90 000001bb`043fffa8 00000050`d0f2e7c0 00000000`00000000 : 0x00007ffa`f93d1699
00000050`d0f2e758 000001bb`043fff90 : 000001bb`043fffa8 00000050`d0f2e7c0 00000000`00000000 00000050`0000000e : 0x000001bb`0078ff50
00000050`d0f2e760 000001bb`043fffa8 : 00000050`d0f2e7c0 00000000`00000000 00000050`0000000e 00007ffa`00000000 : 0x000001bb`043fff90
00000050`d0f2e768 00000050`d0f2e7c0 : 00000000`00000000 00000050`0000000e 00007ffa`00000000 00000050`d0f2e750 : 0x000001bb`043fffa8
00000050`d0f2e770 00000000`00000000 : 00000050`0000000e 00007ffa`00000000 00000050`d0f2e750 00007ffa`f21aca35 : 0x00000050`d0f2e7c0
dotnet info:
.NET SDK:
Version: 10.0.100-preview.3.25168.8
Commit: f255b7461b
Workload version: 10.0.100-manifests.93f92b2e
MSBuild version: 17.15.0-preview-25167-10+bcc2dc6a6
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19044
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\10.0.100-preview.3.25168.8\
.NET workloads installed:
There are no installed workloads to display.
Configured to use workload sets when installing new manifests.
Workloads are configured to install and update using workload versions, but none were found. Run "dotnet workload restore" to install a workload version.
Host:
Version: 10.0.0-preview.3.25167.9
Architecture: x64
Commit: 4ff64a03e5
.NET SDKs installed:
10.0.100-preview.3.25168.8 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 10.0.0-preview.3.25164.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 10.0.0-preview.3.25167.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 10.0.0-preview.3.25126.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
@dotnet-actwx-bot @dotnet/compat


Activity
Junjun-zhao commentedon Mar 21, 2025
@jeffschwMSFT This is a new regression issue in .NET 10 Preview 3 with Autodesk Revit application. Could you please take a look and help triage it? Thanks very much.
jkotas commentedon Mar 21, 2025
cc @janvorli
Junjun-zhao commentedon Mar 25, 2025
Hi @jkotas @janvorli Is there any update on this issue? If not, could you please prioritize investigating it? Thanks!
In the meantime, could you please confirm if it is a blocker for .NET 10 Preview 3?
CC @PriyaPurkayastha
janvorli commentedon Mar 25, 2025
@Junjun-zhao I think the issue might be caused by the same issue as the previous one for the Autodesk Revit (#113158) that I've created a fix for last week. The PR for it is still pending due to some issues I have with the CI tests. They may be unrelated, but since this change touches low levels of exception handling, I want to be 100% sure it doesn't introduce new issues.
Junjun-zhao commentedon Mar 26, 2025
Thanks @janvorli for the information. I saw the PR has been merged. Do you know will it be merged into .NET Preview 3? or when there is a build to have a try?
janvorli commentedon Mar 26, 2025
@Junjun-zhao I've spent some time debugging the new failure on your repro machine and I've found that it is actually a different issue than the one I've fixed. I will continue debugging it today, so far I don't know what's going on there yet.
As for the preview 3, the snap of the repo state for preview 3 actually happened a week ago, so my fix for the previous issue won't be there.
janvorli commentedon Mar 26, 2025
I was able to find the culprit and I am working on a fix. Quick proof of concept of that fix was successfully verified on the repro machine.
Fix propagating of unhandled exception to native caller
janvorli commentedon Mar 31, 2025
@Junjun-zhao - the final fix was merged - I have verified it with the Autodesk Revit on the repro machine.
Fix propagating of unhandled exception to native caller (dotnet#113980)
Junjun-zhao commentedon Apr 1, 2025
Hi @janvorli Thank you very much for the fix and update.
Could you please help confirm if this is a blocker for .NET 10 Preview 3 and will be merged into Preview3?
janvorli commentedon Apr 1, 2025
@Junjun-zhao as I've mentioned in a comment above, the snap for preview 3 has happened two weeks ago, so this fix won't be in preview 3.
janvorli commentedon Apr 1, 2025
I don't see that as a blocker, it is a very specific scenario of propagating exceptions from native code to managed code that is called on a native thread. This issue has been there since .NET 9.
Fix propagating of unhandled exception to native caller (dotnet#113980)
Junjun-zhao commentedon Apr 2, 2025
Thanks @janvorli for your timely confirmation. I'm just a bit curious as to why this issue occurs in Preview 3 but did not in Preview 2, given that it has been present since .NET 9.
janvorli commentedon Apr 2, 2025
It should occur in Preview 2 too, I don't see how it would not happen there. But it is possible that it started to occur due to some change in Revit. The thing that triggers the issue is a null reference exception in some .NET Revit code that gets called from an OnIdle MFC app handler. That exception is not handled in the .NET code and is propagated out to the native MFC app code. If that exception didn't occur, the issue would not happen.
CancanTang commentedon Apr 10, 2025
Hi @janvorli , when we tried to reproduce the bug on dotnet-sdk-10.0.100-preview.4.25208.21, we found that the application became unresponsive after closing the options window, and no error report window popped up. Has this pull request #113980 been merged into dotnet-sdk-10.0.100-preview.4.25208.21?
The SDK installed on the repro machine in devdiv bug has been replaced with dotnet-sdk-10.0.100-preview.4.25208.21
janvorli commentedon Apr 10, 2025
@CancanTang Preview 4 packages are built from the main branch, so my change is in there. I've looked at the machine and attached WinDbg to the hung process. I can see what's wrong, it is caused by a recent change to writing some logging information to console. It looks like it is broken for apps that don't have any console. @lateralusX your logging change causes the minipal_log_write to end up in an infinite loop on Windows when the app has no console (it is a windowed app). The write_file returns 0xffffffffffffffff in that case. Can you please take a look?
janvorli commentedon Apr 10, 2025
@CancanTang @lateralusX just told me he has fixed it yesterday in #114432 that is just waiting for the CI tests completion and will be merged after.
CancanTang commentedon Apr 14, 2025
Verified this issue with dotnet-sdk-preview.4.25211.22, it has been fixed.