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

Ctrl+z/Ctrl+y crash #2140

Closed
ghost opened this issue Jun 9, 2021 · 2 comments
Closed

Ctrl+z/Ctrl+y crash #2140

ghost opened this issue Jun 9, 2021 · 2 comments
Labels
editor :type/bug Something isn't working. Affects daily use.

Comments

@ghost
Copy link

ghost commented Jun 9, 2021

Describe the bug
Pressing Ctrl+z/Ctrl+y with some conditions causes a crash

To Reproduce

  • Create a new graph
  • Open Contents page and delete root node and click reload button
  • go to Contents
  • type [[Something]]
  • Re-index
  • Go to Contents
  • Press ctrl+z twice
  • Press ctrl+y (multiple times)
Uncaught TlHi: nullcolumnNumber: undefineddata: $APP.kO: nullY: (6) [$…P.H, $…P.H, $…P.H, $…P.H, $…P.H, lq]aa: 16647951da: 139268meta: nullqa: 3__proto__: Objectdescription: undefinedfileName: undefinedlineNumber: undefinedmessage: "Cannot add #datascript/Datom [31 :block/name \"something\" 536870927 true] because of unique constraint: (#datascript/Datom [21 :block/name \"something\" 536870917 true])"name: "Error"number: undefinedstack: "Error: Cannot add #datascript/Datom [31 :block/name \"something\" 536870927 true] because of unique constraint: (#datascript/Datom [21 :block/name \"something\" 536870917 true])\n    at new Tl (file:///C:/Users/David/AppData/Local/Logseq/app-0.1.6/resources/app/js/main.js:2740:130)\n    at Function.on.G (file:///C:/Users/David/AppData/Local/Logseq/app-0.1.6/resources/app/js/main.js:5271:71)\n    at Function.on.B (file:///C:/Users/David/AppData/Local/Logseq/app-0.1.6/resources/app/js/main.js:5271:30)\n    at Gr (file:///C:/Users/David/AppData/Local/Logseq/app-0.1.6/resources/app/js/main.js:2881:195)\n    at Lr (file:///C:/Users/David/AppData/Local/Logseq/app-0.1.6/resources/app/js/main.js:2894:342)\n    at Nr (file:///C:/Users/David/AppData/Local/Logseq/app-0.1.6/resources/app/js/main.js:2906:92)\n    at Mna (file:///C:/Users/David/AppData/Local/Logseq/app-0.1.6/resources/app/js/main.js:3028:316)\n    at file:///C:/Users/David/AppData/Local/Logseq/app-0.1.6/resources/app/js/main.js:3029:293\n    at Function.$APP.ql.B (file:///C:/Users/David/AppData/Local/Logseq/app-0.1.6/resources/app/js/main.js:4918:74)\n    at Rna (file:///C:/Users/David/AppData/Local/Logseq/app-0.1.6/resources/app/js/main.js:3029:275)"__proto__: ErrorMa: {}ka: ƒ (a,b,c)toString: ƒ ()constructor: ƒ (a,b,c)__proto__: Object

Expected behavior
No crash

Desktop (please complete the following information):
Windows 0.1.6

Additional context
Once I was able to get Contents' default text pasted in today's journal file pressing crtl+z and ctrl+y randomly (Unable to reproduce again). I don't use Journal so I don't know how that corruption happened.

@tiensonqin tiensonqin added :type/bug Something isn't working. Affects daily use. editor labels Jun 9, 2021
@tiensonqin
Copy link
Contributor

@Zab1900 I can reproduce now, thank you for the reporting.

tiensonqin added a commit that referenced this issue Jun 9, 2021
@tiensonqin
Copy link
Contributor

A fix will be included in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor :type/bug Something isn't working. Affects daily use.
Projects
None yet
Development

No branches or pull requests

1 participant