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

Unknown bit assertion failed #6

Closed
valentin-ricard opened this issue Mar 4, 2023 · 1 comment
Closed

Unknown bit assertion failed #6

valentin-ricard opened this issue Mar 4, 2023 · 1 comment

Comments

@valentin-ricard
Copy link

valentin-ricard commented Mar 4, 2023

Reproduction steps:

  • Open a previously working RM file (used Lines_v2.rm in this repository)
  • Using the desktop app, open the file
  • Double click to create a node for writing
  • Do not write text, and exit the editor

If this cannot be reproduced, here is a .rm file with the unknown bit different from 0.
(zipped the file due to github not supporting .rm files)
2d23993e-0422-4360-bce5-6c3e97a47d21.zip

Output:

// Snipped output
SceneGroupItemBlock(parent_id=CrdtId(0, 11),
                    item_id=CrdtId(2, 26),
                    left_id=CrdtId(1, 24),
                    right_id=CrdtId(0, 0),
                    deleted_length=0,
                    value=CrdtId(2, 25))
Sub-block starting at 559, length 64, only read 61

SceneLineItemBlock(parent_id=CrdtId(2, 25),
                   item_id=CrdtId(2, 30),
                   left_id=CrdtId(0, 0),
                   right_id=CrdtId(0, 0),
                   deleted_length=0,
                   value=Line(color=<PenColor.BLACK: 0>,
                              tool=<Pen.BALLPOINT_2: 15>,
                              points=[Point(x=-65.49798583984375,
                                            y=-176.16778564453125,
                                            speed=3,
                                            direction=0,
                                            width=8,
                                            pressure=0),
                                      Point(x=-65.70648193359375,
                                            y=-176.17727661132812,
                                            speed=0,
                                            direction=0,
                                            width=8,
                                            pressure=0)],
                              thickness_scale=1.0,
                              starting_length=0.0))
Block starting at 537, length 86, only read 83
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/redblueflame/test/rmscene/src/rmscene/__main__.py", line 62, in <module>
    args.func(args)
  File "/home/redblueflame/test/rmscene/src/rmscene/__main__.py", line 35, in pprint_file
    for el in result:
  File "/home/redblueflame/test/rmscene/src/rmscene/scene_stream.py", line 738, in read_blocks
    yield from _read_blocks(stream)
  File "/home/redblueflame/test/rmscene/src/rmscene/scene_stream.py", line 716, in _read_blocks
    with stream.read_block() as header:
  File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/home/redblueflame/test/rmscene/src/rmscene/tagged_block_reader.py", line 125, in read_block
    assert unknown == 0
AssertionError
@ricklupton
Copy link
Owner

@valentin-ricard thanks for the example file. Should now be able to parse without error with dfbdae5.

A new CRDT id has been added to the Line scene item; not sure what it means, currently ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants