Environment
- OneNote Viewer v0.3.0 (flatpak,
io.github.emsi.OneNoteViewer)
- Bundled onenote_parser 2.0.0 (emsi/onenote.rs rev 612a9f6)
Problem
Opening a .one section saved by a recent OneNote version shows "Could not read notebook":
could not parse <file>.one: Malformed OneStore data: Unexpected node (parsing Revision): ObjectInfoDependencyOverridesFND(ObjectInfoDependencyOverridesFND { data: ObjectInfoDependencyOverrideData { c8_override_count: 194, c32_override_count: 0, ... } }) (in onenote_parser/src/onestore/desktop/objects/revision.rs:208)
Root cause
The revision parser skips ObjectInfoDependencyOverridesFND only right after an ObjectGroupList and inside the object loop. When the node appears directly in the revision's file node list at another position (legitimate per MS-ONESTORE, emitted by recent OneNote versions), it hits the else branch and aborts the whole parse.
Fix
I opened a PR against the parser with a one-line fix (skip the node in the revision main loop, like DataSignatureGroupDefinitionFND): emsi/onenote.rs#1
With the patch, the failing file parses successfully. On a corpus of 171 real-world .one files the failure count dropped from 82 to 30; the remaining 30 fail identically before and after with unrelated pre-existing errors, so there are no regressions. Parser unit tests still pass.
Would it be possible to merge the parser fix and cut a new OneNote Viewer release with it?
Environment
io.github.emsi.OneNoteViewer)Problem
Opening a
.onesection saved by a recent OneNote version shows "Could not read notebook":Root cause
The revision parser skips
ObjectInfoDependencyOverridesFNDonly right after anObjectGroupListand inside the object loop. When the node appears directly in the revision's file node list at another position (legitimate per MS-ONESTORE, emitted by recent OneNote versions), it hits theelsebranch and aborts the whole parse.Fix
I opened a PR against the parser with a one-line fix (skip the node in the revision main loop, like
DataSignatureGroupDefinitionFND): emsi/onenote.rs#1With the patch, the failing file parses successfully. On a corpus of 171 real-world
.onefiles the failure count dropped from 82 to 30; the remaining 30 fail identically before and after with unrelated pre-existing errors, so there are no regressions. Parser unit tests still pass.Would it be possible to merge the parser fix and cut a new OneNote Viewer release with it?