Almamu / linux-wallpaperengine

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

terminate called after throwing an instance of 'nlohmann::detail::parse_error' #6

Closed princenna closed 3 years ago

princenna commented 5 years ago

I get this error whenever I try to initialize wallengine on a folder Heres terminal input and output

❯ ./wallengine --pkg folder Initializing irrlicht to WindowID 0 Irrlicht Engine version 1.8.4 Linux 4.19.42-1-MANJARO #1 SMP PREEMPT Fri May 10 20:52:43 UTC 2019 x86_64 Using renderer: OpenGL 3.0 Mesa DRI Intel(R) Haswell Mobile : Intel Open Source Technology Center OpenGL driver version is 1.2 or better. GLSL version: 1.3 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 zsh: abort (core dumped) ./wallengine --dir folder

Almamu commented 5 years ago

Looks to be some kind of json malformation, can you share the background so I can debug it?

princenna commented 5 years ago

I have the issue with all my backgrounds, including this one which I got from your last issue

princenna commented 5 years ago

This is what I get if I run the project without parameters, maybe it'll help.

❯ ./wallengine
Initializing irrlicht to WindowID 0
Irrlicht Engine version 1.8.4
Linux 4.19.49-1-MANJARO #1 SMP PREEMPT Sun Jun 9 20:24:20 UTC 2019 x86_64
Using renderer: OpenGL 3.0
Mesa DRI Intel(R) Haswell Mobile : Intel Open Source Technology Center
OpenGL driver version is 1.2 or better.
GLSL version: 1.3
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
zsh: abort (core dumped)  ./wallengine
Almamu commented 5 years ago

Sorry for the delay, looking at the command and the output in both instances the app cannot find a background to load. It's important to note that you have to specify the correct folder the background is located at, so If you have the background in a folder named "background" at the same level as the wallpaperengine ejecutable you'd need to run: ./wallengine --dir ./background/ if the background is decompressed or ./wallengine --pkg ./background/ if the background is just a scene.pkg file with a project.json file.

princenna commented 5 years ago

That worked but now i've got this

help

And its just black

Almamu commented 5 years ago

Can you tell me what background you are trying to load? There is a lot of stuff left to implement on the viewer, so lots of them will just display a black window until everything is implemented.

ghost commented 4 years ago

Hi. Great work so far. Pretty much any parse error seems to crash in a bad way, for example if I run the background with --dir instead of --pkg.

Here's my try at running it through gdb: gdb.txt

The background is here, maybe slightly NSFW: https://steamcommunity.com/sharedfiles/filedetails/?id=1314862464&searchtext=taimanin

I see this when I build your project: /usr/bin/ld: CMakeFiles/wallengine.dir/wallpaperengine/irr/CImageLoaderTEX.cpp.o: in function irr::video::CImageLoaderTex::loadImage(irr::io::IReadFile*) const': CImageLoaderTEX.cpp:(.text+0xd81): warning: the use oftmpnam' is dangerous, better use `mkstemp' [100%] Built target wallengine

-Tod

Almamu commented 4 years ago

Yeah the code lacks lots of proper checks on a lot of places (at least the master branch). This'll be fixed once the data-separation branch is done, but I've been kind of busy so I can't promise anything. I'm still re-evaluating the engine choice too as I can't really seem to apply multiple shaders to one material in a reliable way...

Almamu commented 3 years ago

Closed as there's no activity on this since November.