Hang on creating metadata field/YAML above a table

Steps to reproduce

I have a note with a table in it and some text underneath that. The note has no headings, text and no metadata at the top. It starts with the table. When I started typing --- to start the YAML block above the tale Obsidian hung. I quit a reloaded and reproduced this several times. The only way out of it was to edit the note in another editor (BBEdit) and add the metadata. After that it was fine.

Expected result

Should just be able to add lines of anything above the table.

Actual result

Hang.

Environment

  • Operating system: Mac OS 12.1

  • Debug info:
    This was the dev console error:

app.js:1 RangeError: Invalid change range 591 to 2 (in doc of length 11530) at e (app.js:1) at e (app.js:1) at Function.t.of (app.js:1) at t.transaction (app.js:1) at t.e.newlineAndIndentOnly (app.js:1) at shift (app.js:1) at c (app.js:1) at gc (app.js:1) at Object.keydown (app.js:1) at e.runCustomHandlers (app.js:1) at HTMLDivElement.<anonymous> (app.js:1) at HTMLDivElement.e (eval at <anonymous> (app.js:1), <anonymous>:333:36332)


Additional information

Happy to supply the note file directly to the developers. I can’t post it publicly here.

Does it happen in the help vault?

you get the debug info using the show debug in command palette. You can attach the note with a DM to me.

Sorry, somehow missed this. It does happen with the Help vault. I tried a different table and it still happens. I can’t get the debug info because it hangs bad enough to just freeze Obsidian so badly, in fact, that I can no longer open the Help vault. I just get a blank window.

This is, by the way, in Source mode in the Editor.

can you please attach a copy of the file that is causing this?

Any table will do it, but I’ve attached one for you.
d20 Looting a Body.md (9.5 KB)
Here is how to reproduce it (Mac OS 12.1, Obsidian build 0.14.2, source edit mode, not live preview):

  1. Create a note
  2. Paste in a markdown table (or combine 1. & 2. and open a note with a table in it). Ensure there are no headings above the table. The crash happens when the table is the first thing in the file.
  3. Start to type --- and return to create YAML metadata.
  4. Watch it hang.

Sometimes you can get to the next line before the hang, but it will hang. Also, it boinked my Help vault in the app, so assume this is vault destructive.

I do get a two second freeze but no hang.
what is the output of show debug info, even before the bug happens.

It freezes as soon as you type --- and then again as you try and write any metadata and then again when you try to close the metadata with ---. On a small note or vault, it’s a freeze of several seconds. On larger vaults it seems to really hang.

The dev panel in Obsidian/Chrome is a UI nightmare. Can you give me a few more specifics about what you’re after? I ran the performance recording and saved the attached profile.

In the Issues pane I get this:

Audit usage of navigator.userAgent, navigator.appVersion, and navigator.platform
A page or script is accessing at least one of navigator.userAgent, navigator.appVersion, and navigator.platform. Starting in Chrome 101, the amount of information available in the User Agent string will be reduced.
To fix this issue, replace the usage of navigator.userAgent, navigator.appVersion, and navigator.platform with feature detection, progressive enhancement, or migrate to navigator.userAgentData.
Note that for performance reasons, only the first access to one of the properties is shown.
1 source
codemirror.js:1

Profile-20220406T114844.json.zip (1.1 MB)

Steps to reproduce

  1. Create an empty note
  2. Create a table within that note
  3. In one of the cells insert a large amount of text (I had 1598 characters)
  4. Anywhere above the table, try to type the string “—” (3 dashes)

Expected result

I am able to type out the string “—”

Actual result

The desktop app crashes and has to be restarted.

Environment

SYSTEM INFO:
Obsidian version: v1.1.16
Installer version: v0.15.9
Operating system: Windows 10 Pro 10.0.22000
Login status: not logged in
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

This is my table that is causing the crash: Obsidian Table Crash - Pastebin.com

there’s nothing in the link provided.
Also https://forum.obsidian.md/t/about-the-bug-reports-category/24/11

You’re also strongly recommended to re-install your Obsidian to get a newer installer version. It might not fix this issue, but that installer version is ancient, and you’re lacking other features due to it.

Here is a test file with an empty table, and some text ready for copy and paste into the table, before inserting the frontmatter dashes.

TableTest.md.zip (1.1 KB)

I’ve been able to reproduce this bug occasionally. Not within the sandbox, and not without community plugins turned off. So my best guess is that maybe the OP had the Advanced table plugin running before turning of community plugins, and that it’s the cause of the hick-up.

I have just updated my installer version and tried to replicate this in the sandbox and it is still occurring.

For some reason my pastebins keeps getting removed. Here’s an example table that causes the issue even in sandbox:

| Date       | Person           | Feedback                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ---------- | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 06/04/2023 |   | OverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOverOver |
|            |  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
|            |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |

Why are you using forward slashes in the divider line?

I’m not, it’s being formatted like that on here for some reason but if you copy it across, they become regular pipes.

Adding the --- turns what comes after into a YAML block. The table is clearly not YAML. Moreover, It causes the YAML parser to choke.

That what was I was thinking when I looked into this thingy, as well. So here’s a workaround for you @Centurion , and that is before you add the triple dashes, add a random letter at the very top of the page, so that Obsidian doesn’t even consider trying to parse it as YAML/frontmatter.

Then add the two lines with triple dashes (after the random letter), and then when both lines (and potentially some fields) are in place, you can remove that random letter.

This was a while back, but I remember testing it with the sandbox and having the same issue. It’s not longer a problem for me now on recent versions.

Do it just happened again for me. I’m not sure it is the Advanced Tables plugins because I have two different vaults using that plug-in and one has this bug the other does not. It hangs so bad I can’t get anything from the inspector.

No it’s a problem with the YAML perser.