inkle / inky

An editor for ink: inkle's narrative scripting language
http://www.inklestudios.com/ink
2.42k stars 296 forks source link

Error message "A JavaScript error occurred in the main process" #448

Open HuangSao opened 2 years ago

HuangSao commented 2 years ago

Hi,

Thank you for your work making this editor! Unfortunately, I ran into some problem.

My system: win11 Inky version: 0.14.1

Every time I open a new window/create a new ink document/open a previous ink document, I get this error:

error

I am a beginner at Inky and before this error occurred, I was testing Inky and writing some -> structure. I accidentally wrote an infinite loop which made the editor crash. I terminated Inky with the task manager. And then, every time I open Inky, this error keeps occurring.

I tried to reinstall Inky but the same issue happens all the same. What can I do about it?

Looking forward to your reply.

TurbochargedSnail commented 1 year ago

I met same error

williamWu619 commented 10 months ago

I have the same issue. Also more issue appeared before: Unable to save. Lost entire file. etc.

Selsynn commented 9 months ago

The solution to that is to open your file with a text editor. Not Inky. (Notepad for example). And fix your infinite loop. Then close the editor and reopen inky.

However the issue with the unable to save is to back up the project often. I personnally use git in my project, and more often than not I write outside inky and use inky to solve some confusion i have on how it's working. Once you have mastered the how it works, you can just write in your favorite editor (not inky) that will handle the save every five minutes or something like that, and open inky to test is out sometimes. But never to fully write it.

Another tip; when you are seeing it's becoming unresponsive, open your file with another editor as quickly as you can. The editor will be able to rewrite what it has in memory (with the message kind of "Another program changed this file. Do you want to reload" and you hit NO! and you save it again. It means the version you opened will be the latest and rewrite on the blank inky have created. ) I also never tried to Ctrl+A and Ctrl+C just when it's becoming unresponsive. Not sure you can select the text you were working on.

But the main tip is: if you are working on something big/that takes long: back up your file. And use another tool to write the full content, like Code, or Notepad++ for example. Else, have a timer to back up correctly and not loosing the whole day of working on it. An infinite loop is super easy to create.