Crashes when replacing pasted link

Bug report

When i paste a link and replace/overwrite it a few moments later Inkdrop crashes. I don’t think that this was introduced with canary.20 but before i couldn’t really determine what i was doing when it suddenly crashed. This doesn’t seem to be os dependent as i can also reproduce it on my linux device. Only official plugin were enabled.
I can see the following error when launching Inkdrop with --enable-logging

app:error [getPageTitle] error: Error: ERR_FAILED (-2) loading 'https://forum.inkdrop.app/'
    at rejectAndCleanup (node:electron/js2c/browser_init:2:89743)
    at finishListener (node:electron/js2c/browser_init:2:89905)
    at WebContents.stopLoadingListener (node:electron/js2c/browser_init:2:90292)
    at WebContents.emit (node:events:521:24) {
  errno: -2,
  code: 'ERR_FAILED',
  url: 'https://forum.inkdrop.app/'
} +0ms

Environment

  • Platform: Windows, Ubuntu
  • Platform version: 11, 24.04
  • App Version: 6.0.0-canary.20

How to reproduce

  1. Copy a link to your clipboard
  2. Paste the link in a note in inkdrop
  3. Select the pasted link
  4. Replace the selected link by pasting the link again
  5. Wait for 2-5 seconds and observe that inkdrop crashed

inkdrop-crash-link

Hi @Lukas ,

Thanks for the report. It looks like a race condition bug. Auto link title opens an invisible BrowserWindow and waits for the page to finish loading. When you quickly paste a link twice, it happens to read a page title from the already-destroyed window for the first pasted link. I’ll fix it!

1 Like

Fixed in canary.21 :raising_hands: Thanks again