Note title longer than 128 chars results in crash

Bug report

Hi, thanks for the amazing work with this software.
Just found what seems to be a bug related to the title length in a Note inside a Notebook, which causes the app crashing if its length is higher than 128 digits.

Here’s the console log displayed after crash

TypeError: Converting circular structure to JSON
    --> starting at object with constructor 'Object'
    |     property 'value' -> object with constructor 'Object'
    --- property 'value' closes the circle
    at JSON.stringify (<anonymous>)
    at e (file:///C:/Users/../AppData/Local/inkdrop/app-5.5.1/resources/app.asar/browser-main.js:1:130447)
    at f.renderDebugInfo (file:///C:/Users/../AppData/Local/inkdrop/app-5.5.1/resources/app.asar/browser-main.js:1:130467)
    at f.render (file:///C:/Users/../AppData/Local/inkdrop/app-5.5.1/resources/app.asar/browser-main.js:1:131201)
    at gi (C:\Users\..\AppData\Local\inkdrop\app-5.5.1\resources\app.asar\app\static\node_modules\react-dom\cjs\react-dom.production.min.js:182:198)
    at fi (C:\Users\..\AppData\Local\inkdrop\app-5.5.1\resources\app.asar\app\static\node_modules\react-dom\cjs\react-dom.production.min.js:181:230)
    at Rj (C:\Users\..\AppData\Local\inkdrop\app-5.5.1\resources\app.asar\app\static\node_modules\react-dom\cjs\react-dom.production.min.js:263:496)
    at Qj (C:\Users\..\AppData\Local\inkdrop\app-5.5.1\resources\app.asar\app\static\node_modules\react-dom\cjs\react-dom.production.min.js:246:271)
    at Kj (C:\Users\..\AppData\Local\inkdrop\app-5.5.1\resources\app.asar\app\static\node_modules\react-dom\cjs\react-dom.production.min.js:246:200)
    at yj (C:\Users\..\AppData\Local\inkdrop\app-5.5.1\resources\app.asar\app\static\node_modules\react-dom\cjs\react-dom.production.min.js:239:178)
    at C:\Users\..\AppData\Local\inkdrop\app-5.5.1\resources\app.asar\app\static\node_modules\react-dom\cjs\react-dom.production.min.js:123:121
    at exports.unstable_runWithPriority (C:\Users\..\AppData\Local\inkdrop\app-5.5.1\resources\app.asar\app\static\node_modules\scheduler\cjs\scheduler.production.min.js:19:473)
    at cg (C:\Users\..\AppData\Local\inkdrop\app-5.5.1\resources\app.asar\app\static\node_modules\react-dom\cjs\react-dom.production.min.js:122:331)
    at fg (C:\Users\..\AppData\Local\inkdrop\app-5.5.1\resources\app.asar\app\static\node_modules\react-dom\cjs\react-dom.production.min.js:123:67)
    at gg (C:\Users\..\AppData\Local\inkdrop\app-5.5.1\resources\app.asar\app\static\node_modules\react-dom\cjs\react-dom.production.min.js:122:502)
    at Mj (C:\Users\..\AppData\Local\inkdrop\app-5.5.1\resources\app.asar\app\static\node_modules\react-dom\cjs\react-dom.production.min.js:240:72)
    at Object.notify (C:\Users\..\AppData\Local\inkdrop\app-5.5.1\resources\app.asar\app\static\node_modules\react-redux\lib\utils\Subscription.js:21:13)
    at Object.notifyNestedSubs (C:\Users\..\AppData\Local\inkdrop\app-5.5.1\resources\app.asar\app\static\node_modules\react-redux\lib\utils\Subscription.js:92:21)
    at handleChangeWrapper (C:\Users\..\AppData\Local\inkdrop\app-5.5.1\resources\app.asar\app\static\node_modules\react-redux\lib\utils\Subscription.js:97:26)
    at dispatch (C:\Users\..\AppData\Local\inkdrop\app-5.5.1\resources\app.asar\app\static\node_modules\redux\lib\redux.js:305:13)
    at C:\Users\..\AppData\Local\inkdrop\app-5.5.1\resources\app.asar\app\static\node_modules\redux-thunk\lib\index.js:27:22
    at file:///C:/Users/../AppData/Local/inkdrop/app-5.5.1/resources/app.asar/browser-main.js:1:512621
    at dispatch (C:\Users\..\AppData\Local\inkdrop\app-5.5.1\resources\app.asar\app\static\node_modules\redux\lib\redux.js:667:34)
    at file:///C:/Users/../AppData/Local/inkdrop/app-5.5.1/resources/app.asar/browser-commons.js:1:70795

Environment

  • Platform:
  • Platform version:
  • App Version:

How to reproduce

Create a new note with a title longer than 128 digits

Hi Danielsec,

Thanks for the report!
I managed to reproduce it. It looks like a breaking change in Electron where the error is not properly serialized.
The app should display a message like “”/title" must NOT have more than 128 characters."
I’ll fix it in the next release!

Fixed in v5.5.2-beta.1