Closed JairoMartinezA closed 1 month ago
Need more details:
Sorry Alex,
I was thinking the error was with log not with some 'wrong' JSON file
_json_loads FAIL: filename "/Users/my_user/Library/Application Support/CudaText/settings_default/default.json", text:
My file:
so the error is for my default.json too? and how can I repro it? what UI to call?
note: default.json has comments which are usually NOT allowed in JSON.
Correct Alex,
After I deleted the comments in that file, the error is no longer present.
And how can I repro the error?
The error is with your default.json file. I just downloaded the latest sources and created a new executable version, and voila, the error appears. Maybe it only happens with the MacOS build.
Error appears just on app start? on clean app (no additional plugs)? or should user call Options Editor Lite plugin (which uses cudaxlib API)?
Alex, I have re-downloaded the default.json content from GH, and now the error is gone. I was able to recover a previous version (the wrong version), and with this version, the error is present. However, I don't think it's necessary to waste time on this. I compared both versions, and there are some differences.
BUT NOW ALL IS OK AGAIN.
Ok, but I still cannot guess what is wrong with BothFiles.zip files. 2 json files have comments.
The guilty value is:
Current Version
//Regular expression, which finds hyperlinks.
"links_regex": "\\b(mailto:)?\\w[\\w\\-\\+\\.]*@\\w[\\w\\-\\.]*\\.\\w{2,}\\b|\\b(https?://|ftp://)\\w[\\w\\-\\.@]*(:\\d+)?(/([~\\w\\.\\-\\+\\/%@!%:]|\\(.*?\\))*)?(\\?\\S*[\\w/\\-\\+])?(\\#[\\w\\-\\./%:!]*)?",
Wrong version
//Regular expression, which finds hyperlinks.
"links_regex": "\\b(mailto:)?\\w[\\w\\-\\+\\.]*@\\w[\\w\\-\\.]*\\.\\w{2,}\\b|\\b(https?://|ftp://)\\w[\\w\\-\\.@]*(:\\d+)?(/([~\w\.\-\+\/%@!%:&\*=\(\)\[\]\{\}\|,;'\"`\$]|\\(.*?\\))*)?(\\?\\S*[\\w/\\-\\+])?(\\#[\\w\\-\\./%:!]*)?",
Hm? they are both OK, I don't see why one of these 2 values is wrong...
After that character, one more backslash is added. I haven't really validated the expressions per se; I'm only reflecting the differences.
Ah, now I see, yes it was the error.
Wait, error in JSON is still in git. i will fix it ASAP.
Fixed
Hi Alex
With the latest sources (CudaText 1.214.6.4, darwin-x86_64-cocoa, fpc 3.2.2), I am getting the following error. The file currently exists, and I have changed the permissions to be similar to the other config files, but the error is still present.