zsviczian / obsidian-excalidraw-plugin

A plugin to edit and view Excalidraw drawings in Obsidian
3.76k stars 204 forks source link

BUG: Harmless but incorrect slew of infinite loop warnings reported when opening drawing containing an embedded drawing #1405

Open daniel347x opened 8 months ago

daniel347x commented 8 months ago

Your environment Please run Command Palette/Show Debug info in Obsidian and paste the result here.

SYSTEM INFO: Obsidian version: v1.4.16 Installer version: v1.4.13 Operating system: Windows 10 Pro 10.0.19045 Login status: logged in Catalyst license: none Insider build toggle: on Live preview: on Legacy editor: off Base theme: light Community theme: Olivier’s Theme v1.3.3 Snippets enabled: 3 Restricted mode: off Plugins installed: 115 Plugins enabled: 80 1: Breadcrumbs v3.6.4 2: Tab Switcher v1.4.0 3: Quick Explorer v0.2.8 4: Recent Files v1.3.8 5: Show Current File Path v0.5.2 6: Text Snippets v0.1.2 7: Quiet Outline v0.3.17 8: Latex Suite v1.8.7 9: Quick Latex for Obsidian v2.6.3 10: Editor Syntax Highlight v0.1.3 11: Style Settings v1.0.7 12: Linter v1.20.1 13: Omnisearch v1.18.1 14: Quick Switcher++ v3.3.8 15: Spaced Repetition v1.10.3 16: Admonition v10.1.1 17: Advanced Tables v0.19.1 18: Excalidraw v1.9.27 19: Copy Inline Code v1.1.2 20: Minimal Theme Settings v7.3.0 21: Fantasy name generator v0.1.0 22: Dice Roller v10.2.0 23: Obsidian42 - BRAT v0.7.0 24: Iconize v2.6.1 25: Icon Shortcodes v0.9.7 26: Obsidian Math+ v0.5.1 27: Note Refactor v1.8.2 28: ExcaliBrain v0.2.11 29: Copy Image and URL context menu v1.5.1 30: Multi Tag v0.9.1 31: Auto Classifier v1.1.1 32: Hover Editor v0.11.14 33: File Tree Alternative Plugin v2.3.6 34: Whisper v1.5.1 35: Checklist v2.2.13 36: Copy Block Link v1.0.4 37: Dataview v0.5.63 38: QuickAdd v1.4.0 39: Chat Stream v1.3.3 40: Templater v1.16.4 41: Better PDF 2 v2.0.3 42: Commander v0.5.1 43: Kanban v1.5.3 44: Chronology v1.1.10 45: Calendar v1.5.10 46: Fantasy Calendar v3.0.0 47: Google Calendar v1.10.14 48: Transcription v3.1.7 49: Tag Wrangler v0.6.1 50: File Explorer Note Count v1.2.1 51: Another Quick Switcher v9.2.0 52: Settings Search v1.3.10 53: Voice v0.0.12 54: URL Display v1.2.0 55: Text Conversions v1.0.0 56: Tags Overview v0.1.6 57: Number Headings v1.16.0 58: Heading Shifter v1.5.1 59: Highlightr v1.2.2 60: Excel to Markdown Table v0.4.0 61: Markdown Table Editor v0.3.1 62: Color Palette v1.1.1 63: Colored Tags v3.0.1 64: Colorful Note Borders v0.2.4 65: Colored Text v0.6.0 66: Automatic Table Of Contents v1.0.3 67: Link Tree v1.0.0 68: Markdown Tree v0.1.0 69: Open vault in VSCode v1.2.1 70: Bulk Rename v0.5.2 71: Homepage v3.6.0 72: Obsidian Git v2.22.0 73: Mononote v1.0.0 74: Creases v0.7.0 75: AI Research Assistant v1.6.0 76: No dupe leaves v0.0.11 77: Hotkeys for specific files v1.4.0 78: Graph Analysis v0.15.4 79: Code Emitter v0.1.2 80: Code Files v1.1.5

Describe the bug

I have a drawing (Drawing A) that opens without warning or error. (It contains many embedded small images - some included a number of times.)

I have created a second drawing (Drawing B) in which I embed Drawing A (via Ctrl+Alt+Drag). The drawing embeds fine and displays correctly. However, there are a large slew of warnings that state:

EXCALIDRAW WARNING
Aborted loading embedded images due to infinite loop in file: 5

As noted, the entire embedded drawing (Drawing A) appears exactly as expected - no problem actually loading it.

The only issue are the large slew of (harmless but irritating) warning messages.

Screenshot is attached below.

Screenshots If applicable, add screenshots to help explain your problem.

image

zsviczian commented 8 months ago

can you share the file?

daniel347x commented 8 months ago

I isolated a near-simplest possible case. It involves a drawing with 5 nested embeddings:

start here --> drawing-1 --> drawing-2 --> drawing-3 --> drawing-4 --> drawing-5 --> drawing-6 <-- red circle

harmless-infinite-loop-error.zip

You just click on "drawing-1" to exhibit the problem. A single warning message pops up - just like the one in the original screenshot:

image

Yet, despite the warning message, the image itself displays perfectly, as you can see.

It seems the bug might be an incorrectly-reported "embedding depth exceeded" error.

Thanks so much for considering having a look at the bug, and, especially, for this plugin! I am using Excalidraw instead of PowerPoint - so much better for programming-type folks.