Link to paragraph with equation in its title causes a crash
Opened this issue · 1 comments
Problem to Solve
Creating a link to a paragraph, with a equation inside the link title, makes Onenote crash.
To Reproduce
OneMore must be enabled.
Steps to reproduce the behavior:
- Write a paragraph and copy its "link to paragraph"
- Write some text and an equation next to each other in a different paragraph
- Select the text and the equation made at (2) and insert a link, use the URI copied at (1)
- Change page and come back
- OneNote crashes in a couple of seconds
Expected Behavior
I expect it not to crash.
Screenshots
Environment (if applicable)
- Microsoft® OneNote® for Microsoft 365 MSO (Version 2407 Build 16.0.17830.20166) 64-bit
- Windows 10 Pro 64 bit, Version 22H2, Build 19045.4780
- OneMore version: 6.50 (versions 6.40 and 4.90 are affected as well, look at the bottom)
Additional Context
Updated logs:
Event Viewer crash report (OneMore 6.50)
Faulting application name: ONENOTE.EXE, version: 16.0.17830.20166, time stamp: 0x66b7a8df
Faulting module name: RICHED20.DLL, version: 16.0.17830.20056, time stamp: 0x668f315c
Exception code: 0xc0000005
Fault offset: 0x0000000000230035
Faulting process ID: 0x215c
Faulting application start time: 0x01daf60a5c0bc718
Faulting application path: C:\Program Files\Microsoft Office\root\Office16\ONENOTE.EXE
Faulting module path: C:\Program Files\Microsoft Office\root\vfs\ProgramFilesCommonX64\Microsoft Shared\Office16\RICHED20.DLL
Report ID: 5998e846-3dba-4d23-b2d5-fe591ee71561
Faulting package full name:
Faulting package-relative application ID:
OneMore.log (6.50)
01|11:45:40.575| Starting dllhost 4316, 2611 Mhz, 8 MB, en-GB/en-GB, v6.5.0, OneNote 15.0, Office 16.0, 2024-08-24 11:45
01|11:45:40.578| ..Windows 10 Pro, Version 22H2, Build 19041, 64 bit
01|11:45:40.579| ..C:\Program Files\Microsoft Office\root\Office16\ONENOTE.EXE (16.0.17830.20166)
01|11:45:40.602| ..OnConnection(ConnectionMode:ext_cm_Startup,custom[1:Int32])
01|11:45:40.609| ..OneAddInsUpdate(custom[])
03|11:45:41.114| ..building ribbon
03|11:45:41.124| ..building ribbon colorizer commands
03|11:45:41.535| ..building ribbon language proofing commands
03|11:45:41.554| ..building context menu
03|11:45:41.807| ..OnStartupComplete(custom[])
03|11:45:41.812| ..starting command service
03|11:45:41.812| ..starting reminder service
03|11:45:41.812| ..starting navigation service
03|11:45:41.821| ..starting hashtag service, Ready
03|11:45:41.821| ..ready
10|11:45:41.842| hashtag service waiting, Ready
04|11:45:42.099| defined 51 hotkeys for input locale 2057
04|11:46:35.690| RPC error, retrying in 500ms
System.Runtime.InteropServices.COMException
Message: The remote procedure call failed. (Exception from HRESULT: 0x800706BE)
Description: Unrecognized error code 0x800706BE
ErrorCode: 0x800706BE (-2147023170)
HResult: 0x800706BE (-2147023170)
Source: Microsoft.Office.Interop.OneNote
StackTrace: at Microsoft.Office.Interop.OneNote.ApplicationClassCOM.GetPageContent(String bstrPageID, String& pbstrPageXmlOut, PageInfo pageInfoToExport, XMLSchema xsSchema)
at River.OneMoreAddIn.OneNote.<>c__DisplayClass48_1.<GetPage>b__0()
at River.OneMoreAddIn.OneNote.<InvokeWithRetry>d__35.MoveNext()
TargetSite: [Microsoft.Office.Interop.OneNote] Microsoft.Office.Interop.OneNote.ApplicationClassCOM::GetPageContent()
04|11:48:00.153| error instantiating OneNote IApplication after 0 retries
System.Runtime.InteropServices.COMException
Message: Retrieving the COM class factory for component with CLSID {D7FAC39E-7FF1-49AA-98CF-A1DDD316337E} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).
Description: Unrecognized error code 0x80080005
ErrorCode: 0x80080005 (-2146959355)
HResult: 0x80080005 (-2146959355)
Source: River.OneMoreAddIn
StackTrace: at River.OneMoreAddIn.ApplicationFactory.CreateApplication()
TargetSite: [River.OneMoreAddIn] River.OneMoreAddIn.ApplicationFactory::CreateApplication()
04|11:48:00.671| error invoking action, aborting retries
System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: River.OneMoreAddIn
StackTrace: at River.OneMoreAddIn.OneNote.<>c__DisplayClass48_1.<GetPage>b__0()
at River.OneMoreAddIn.OneNote.<InvokeWithRetry>d__35.MoveNext()
TargetSite: [River.OneMoreAddIn] River.OneMoreAddIn.OneNote+<>c__DisplayClass48_1::<GetPage>b__0()
10|11:48:05.046| hashtag service scanned 0 pages, updating 0, in 19829ms
In the OneMore.log there are errors about getting the page that seem to match the step 4 to reproduce the issue.
This issue is related to #1554
I tried to...
Compile, install the application and attach with a debugger by injecting a breakpoint as described on the OneMore Debugging wiki. I saw that the dllhost doesn't crash as opposed to Onenote.
I had this problem since a couple of days before 6.50 came out, I had 6.40 at that time.
I tried to reinstall different versions of OneMore, 6.40 does the same as described up, 4.90 doesn't crash unless I tap onto its button in the dropdown menu (triple dots on the Home section).
THE FINE PRINT This is a hobby project that I started for myself. I'm happy to take requests and will promise to
consider each one carefully but offer no guarantees that I will ultimately agree to their
usefulness or have time to implement any of them. If OneNote offers a "close enough" work-around
then I will probably reject the request - you've been warned!
OneMore uses the OneNote Interop APIs to read the page content. This is one case where the OneNote API causes OneNote to crash. The OneMore Navigator window has a background service that watches page navigations, so when you switch back to the bad page, it tries to record that and fails.
This would happen for any OneMore function that needs to load the page content using the OneNote Interop API, not just the Navigation service. So while you could disable the Navigation service in the OneMore settings, any other OneMore command on that page may cause OneNote to crash.
Unfortunately, while an exception is returned to the OneMore COM Surrogate process, OneNote has already crashed and the Interop RPC layer is corrupted. So OneMore cannot recover OneNote at that point.
There's nothing that can be done to fix this. It is an internal OneNote defect.
I will add a warning to the OneMore Wiki