[GH-ISSUE #1802] [Bug] Math Equation would be null. #705

Closed
opened 2026-03-23 20:39:57 +00:00 by mirror · 4 comments
Owner

Originally created by @huang12zheng on GitHub (Feb 4, 2023).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/1802

Originally assigned to: @LucasXu0 on GitHub.

Bug Description

Left (Left(docId: KAqvylhRb-
snapshot: {"document":{"type":"editor","children":[{"type":"text","delta":[{"insert":"fdgfd"}]},{"type":"math_equation","attributes":{"math_equation":null}},{"type":"text","delta":[{"insert":"fdsaf"}]},{"type":"text","delta":[{"insert":"fdsaf"}]},{"type":"text","delta":[{"insert":"aa"}]},{"type":"math_equation","attributes":{"math_equation":"E"}},{"type":"text","delta":[{"insert":"dfaf"}]},{"type":"math_equation","attributes":{"math_equation":"E"}},{"type":"text"}]}}
))

How to Reproduce

https://user-images.githubusercontent.com/28038074/216769677-f23afaa1-a6e7-487a-9814-8ca33c77ded4.mp4

Expected Behavior

{"type":"math_equation","attributes":{"math_equation":null}}
to be
{"type":"math_equation","attributes":{"math_equation":""}}


or no render error

Operating System

Darwin13.1(version 22C65)

AppFlowy Version(s)

1.0.0+1

Screenshots

No response

Additional Context

PS: I don't know what flutter and rust do when modifying values. Maybe write_snapshot and document_rev_table, and then pull the data out of it. But I spent a lot of time trying to figure it out.
Because of FFI, I can't debug directly, which is a little sad

Originally created by @huang12zheng on GitHub (Feb 4, 2023). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/1802 Originally assigned to: @LucasXu0 on GitHub. ### Bug Description Left (Left(docId: KAqvylhRb- snapshot: {"document":{"type":"editor","children":[{"type":"text","delta":[{"insert":"fdgfd"}]},{"type":"math_equation","attributes":{"math_equation":null}},{"type":"text","delta":[{"insert":"fdsaf"}]},{"type":"text","delta":[{"insert":"fdsaf"}]},{"type":"text","delta":[{"insert":"aa"}]},{"type":"math_equation","attributes":{"math_equation":"E"}},{"type":"text","delta":[{"insert":"dfaf"}]},{"type":"math_equation","attributes":{"math_equation":"E"}},{"type":"text"}]}} )) ### How to Reproduce https://user-images.githubusercontent.com/28038074/216769677-f23afaa1-a6e7-487a-9814-8ca33c77ded4.mp4 ### Expected Behavior {"type":"math_equation","attributes":{"math_equation":null}} to be {"type":"math_equation","attributes":{"math_equation":""}} --- or no render error ### Operating System Darwin13.1(version 22C65) ### AppFlowy Version(s) 1.0.0+1 ### Screenshots _No response_ ### Additional Context PS: I don't know what flutter and rust do when modifying values. Maybe write_snapshot and document_rev_table, and then pull the data out of it. But I spent a lot of time trying to figure it out. Because of FFI, I can't debug directly, which is a little sad
Author
Owner

@LucasXu0 commented on GitHub (Feb 5, 2023):

Hi, @huang12zheng. Thanks for reporting.

You can debug the Rust code by executing AF-desktop: Debug Rust.
Screenshot 2023-02-05 at 16 38 33

<!-- gh-comment-id:1417113245 --> @LucasXu0 commented on GitHub (Feb 5, 2023): Hi, @huang12zheng. Thanks for reporting. You can debug the Rust code by executing `AF-desktop: Debug Rust`. <img width="232" alt="Screenshot 2023-02-05 at 16 38 33" src="https://user-images.githubusercontent.com/11863087/216809564-4467cfc3-ecbd-41e1-8a0d-353b854814f7.png">
Author
Owner

@annieappflowy commented on GitHub (Feb 6, 2023):

Is this resolved? @huang12zheng

<!-- gh-comment-id:1418366139 --> @annieappflowy commented on GitHub (Feb 6, 2023): Is this resolved? @huang12zheng
Author
Owner

@huang12zheng commented on GitHub (Feb 6, 2023):

@annieappflowy the problem of this issue is relation to #1806

On the development tips, LucasXu0 tells the method, I don't know how to try.

<!-- gh-comment-id:1418417851 --> @huang12zheng commented on GitHub (Feb 6, 2023): @annieappflowy the problem of this issue is relation to #1806 On the development tips, LucasXu0 tells the method, I don't know how to try.
Author
Owner

@LucasXu0 commented on GitHub (Feb 6, 2023):

Here're the steps.

  1. Get the process id of AppFlowy
  2. Executing the AF-desktop: Debug Rust task.
  3. Input the process id.
  4. Set a breakpoint to debug the code.
<!-- gh-comment-id:1418428637 --> @LucasXu0 commented on GitHub (Feb 6, 2023): Here're the steps. 1. Get the process id of AppFlowy 2. Executing the `AF-desktop: Debug Rust` task. 3. Input the process id. 4. Set a breakpoint to debug the code.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#705
No description provided.