Almamu / linux-wallpaperengine

Wallpaper Engine backgrounds for Linux!
GNU General Public License v3.0
1.67k stars 61 forks source link

[BUG] terminate called after throwing an instance of 'nlohmann::detail::parse_error' #38

Closed ghost closed 2 years ago

ghost commented 3 years ago

Hey! When I try to use a background in the wallpaper engine port I'll get an exception.

"terminate called after throwing an instance of 'nlohmann::detail::parse_error' what(): [json.exception.parse_error.101] parse error at 1: syntax error - unexpected end of input; expected '[', '{', or a literal Aborted (core dumped)"

It said that something went wrong while parsing the json but the json is alright. I've tried over 20 backgrounds and everytime I get this error.

I hope you can help me ^^

Almamu commented 3 years ago

Most likely the issue is with the way you're running the background and not the background itself. Can you tell me the ID of one of the backgrounds you're loading? A couple should be enough

ghost commented 3 years ago

Sure https://steamcommunity.com/sharedfiles/filedetails/?id=1980267847 https://steamcommunity.com/sharedfiles/filedetails/?id=1851912143 https://steamcommunity.com/sharedfiles/filedetails/?id=1905804984 https://steamcommunity.com/sharedfiles/filedetails/?id=2065411781

Almamu commented 3 years ago

I've tried the four backgrounds you shared and they should load with the latest version of the data-separation branch, although there's no support for features like light and javascript, so those backgrounds won't look as they do on Windows. None of them was complaining about json errors tho, all the things that I fixed were unrelated to that message you reported when opening the issue.

ghost commented 3 years ago

I've tried to use the latest data-separation branch but I've still got the errors. image

Almamu commented 3 years ago

For the sailor moon background you have to use the --pkg switch instead of the --dir because It's a compressed background: https://github.com/Almamu/linux-wallpaperengine/tree/data-separation#541-running-compressed-backgrounds

ghost commented 3 years ago

I've tried both methods.

Almamu commented 3 years ago

Oh sorry, I did not see the first command in the picture. Is the scene.pkg and project.json in that folder? You should have at least those two files for it to work properly. image

Almamu commented 3 years ago

And this should be in the one that is a video: image

ghost commented 3 years ago

yeah.

image image

somehow test1 work now but it's only a picture and not a live background.

Almamu commented 3 years ago

Have you updated your local copy of the project and recompiled it? The error message, Unexpected package header... should be fixed in the last commit of the data-separation branch.

ghost commented 3 years ago

Yes, I've deleted the folder at cloned it with 'git clone https://github.com/Almamu/linux-wallpaperengine.git'

But the error still happens.

Wait I see that it didn't choose the branch I'll try it again.

ghost commented 3 years ago

Okay my mistake I've cloned the false branch but I'm get now this error.

image

ghost commented 3 years ago

I can confirm this issue, the same is happening to me. Using the data separation branch replaces the previous error with this: image In case you are wondering, the JSON is valid. Not sure why the error is there. I've tested about 3-4 different wallpapers and the same issue persists. (Arch Linux, Nvidia, 5.12.10-zen kernel)

ghost commented 3 years ago

Btw if it's relevant for debugging I'm using EndeavourOS it's Arch based distro.

Almamu commented 3 years ago

I can confirm this issue, the same is happening to me. Using the data separation branch replaces the previous error with this: image In case you are wondering, the JSON is valid. Not sure why the error is there. I've tested about 3-4 different wallpapers and the same issue persists. (Arch Linux, Nvidia, 5.12.10-zen kernel)

There's no JSON error in your screenshot. Your issue is different. "unexpected package header" means that the .pkg format is not supported. most of the time it's just a different indicator and nothing else differs, can you link the background you're trying to load so I can add the package version to the list?

Okay my mistake I've cloned the false branch but I'm get now this error.

image

About this one, is that when trying to load one of the backgrounds you linked earlier? I do not get it with any of those on the data-separation branch.

ghost commented 3 years ago

About this one, is that when trying to load one of the backgrounds you linked earlier? I do not get it with any of those on the data-separation branch.

Yeah it's for an example this background. https://steamcommunity.com/sharedfiles/filedetails/?id=1980267847

Almamu commented 3 years ago

About this one, is that when trying to load one of the backgrounds you linked earlier? I do not get it with any of those on the data-separation branch.

Yeah it's for an example this background. https://steamcommunity.com/sharedfiles/filedetails/?id=1980267847

Could you try with the latest version on the main branch? I'm loading that background just fine (the only thing missing being the particles and the clock on top which are features not supported yet).