Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TOC refresh link crashes oneMore #1255

Closed
iAnyKey opened this issue Jan 9, 2024 · 7 comments · Fixed by #1256 or #1257
Closed

TOC refresh link crashes oneMore #1255

iAnyKey opened this issue Jan 9, 2024 · 7 comments · Fixed by #1256 or #1257
Assignees
Labels
bug Something isn't working released Available in a released installer
Milestone

Comments

@iAnyKey
Copy link

iAnyKey commented Jan 9, 2024

Problem to Solve

TOC of a note can only be inserted once. In case if new sections are added afterwards and you try to update the existing TOC by clicking refresh button, the whole addon will become unresponsive.

To Reproduce

Steps to reproduce the behavior:

  1. Add new note
  2. Add several sections and assing Heading styles accordingly
  3. Add TOC
  4. Modify existing note structure (e.g. add a section/rename a section/...)
  5. Try to update the TOC by clicling the [Refresh] link

Expected Behavior

TOC should become updated and reflect the changes, which have been made in step 4.
Addon should remain responsive

Environment (if applicable)

  • OneNote Version: Microsoft® OneNote® for Microsoft 365 MSO (Version 2310 Build 16.0.16924.20054) 64-bit
  • OneMore Version: 6.0.1

logs

01| Starting dllhost 3784, 1040 Mhz, 32 MB, en-US/en-US, v6.0.1, OneNote 15.0, Office 16.0, 2024-01-09 16:39
01| ..Windows 11 Enterprise, Version 22H2, Build 22621, 64 bit
01| ..C:\Program Files\Microsoft Office\root\Office16\ONENOTE.EXE (16.0.16924.20180)
01| ..OnConnection(ConnectionMode:ext_cm_Startup,custom[1:Int32])
01| ..OneAddInsUpdate(custom[])
01| ..building ribbon
01| ..building ribbon colorizer commands
01| ..building ribbon language proofing commands
01| ..building context menu
01| ..OnStartupComplete(custom[])
01| ..starting command service
01| ..starting reminder service
01| ..starting navigation service
01| ..starting hashtag service
01| ..ready
09| Running command UpdateCommand
03| ..defined 46 hotkeys for input locale 1031
08| hashtag service scanned 16 pages in 1042ms
06| Running command InsertTocCommand
06| ..schema error [width="7865479000000000.0"] (System.Xml.Linq.XAttribute)

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!

@iAnyKey iAnyKey added bug Something isn't working unread I have seen it or had time to refine it yet labels Jan 9, 2024
@stevencohn stevencohn added no-repro Cannot reproduce and removed unread I have seen it or had time to refine it yet labels Jan 9, 2024
@stevencohn
Copy link
Owner

I can't seem to reproduce this. Can you provide a more clear example of the type of content you're adding and changes you make before the refresh?

@iAnyKey
Copy link
Author

iAnyKey commented Jan 9, 2024

It's about changing the caption's Text. For instance it happens to me if i try to change follwing structure:

1. section A
    Some regular text
2. section B
3. section C

Into this:

1. section A
    Some regular text
2. section BBB
3. section C

And then try to refresh the TOC. It will not change the caption of section B and just stops responding.

I would really Mike to Attaché some Screenshots, but the test note page also becomes "unchangeable" for oneMore. So you need to create a New note instance after such crash.

@stevencohn
Copy link
Owner

like this?

toc-capture

@iAnyKey
Copy link
Author

iAnyKey commented Jan 9, 2024

Well exactly...
I think I need to look for the cause deeper on my setup.
maybe you have any hints?

@stevencohn
Copy link
Owner

stevencohn commented Jan 9, 2024

There is one spot where OneMore updates a width XML attribute that perhaps isn't formatted correctly, resulting in the silly "7865479000000000.0" value. I can correct that, even though I haven't been able to repro the use case or confirm whether that will fix it.

@iAnyKey
Copy link
Author

iAnyKey commented Jan 9, 2024

Just tried to reproduce the issue on my 2nd personal device...and I couldnt. Everything worked fine.
Screenshot 2024-01-09 203743
Screenshot 2024-01-09 203759

The only difference is the newer onenote version (16.0.16924.20180 vs 16.0.17029.20108) but older and unmanaged windows (Windows 11 Enterprise, Version 22H2, Build 22621, 64 bit vs Windows 11 Professional, Version 23H2, Build 22621, 64 bit).

Could the addon functionality be affected by some restrictive group policies?

01| Starting dllhost 15768, 1792 Mhz, 8 MB, de-DE/de-DE, v6.0.1, OneNote 15.0, Office 16.0, 2024-01-09 20:35
01| ..Windows 11 Professional, Version 23H2, Build 22621, 64 bit
01| ..C:\Program Files\Microsoft Office\root\Office16\ONENOTE.EXE (16.0.17029.20108)
01| ..OnConnection(ConnectionMode:ext_cm_Startup,custom[1:Int32])
01| ..OneAddInsUpdate(custom[])
01| ..building ribbon
01| ..building ribbon colorizer commands
01| ..building ribbon language proofing commands
01| ..OnStartupComplete(custom[])
01| ..starting command service
01| ..starting reminder service
01| ..starting navigation service
01| ..starting hashtag service
01| ..ready
03| defined 46 hotkeys for input locale 3079
04| building hashtag database
04| hashtag database done
04| hashtag service scanned 3 pages in 2344ms
04| Running command InsertTocCommand
05| Invoking command InsertTocCommand
09| hashtag service scanned 4 pages in 57ms

@stevencohn stevencohn added next-release Addressed but not yet released and removed no-repro Cannot reproduce labels Jan 10, 2024
@stevencohn stevencohn self-assigned this Jan 10, 2024
@stevencohn stevencohn linked a pull request Jan 10, 2024 that will close this issue
@stevencohn
Copy link
Owner

Still unable to repro. But I added in some extra validation.

stevencohn added a commit that referenced this issue Jan 10, 2024
@stevencohn stevencohn linked a pull request Jan 10, 2024 that will close this issue
@stevencohn stevencohn added released Available in a released installer and removed next-release Addressed but not yet released labels Jan 21, 2024
weissm pushed a commit to weissm/OneMore that referenced this issue Jan 22, 2024
weissm pushed a commit to weissm/OneMore that referenced this issue Jan 22, 2024
@stevencohn stevencohn added this to the 6.2.1 milestone Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released Available in a released installer
Projects
None yet
2 participants