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' and make dislikes something in the code #23

Closed Martin1995 closed 4 years ago

Martin1995 commented 4 years ago

when i run wallengine after compiling and trying to use a wallpaper from the steam workshop i get the following output ./wallengine --dir /home/martin/.local/share/Steam/steamapps/workshop/content/431960/2172415034/ Irrlicht Engine version 1.8.4 Linux 5.4.53-1-lts #1 SMP Wed, 22 Jul 2020 20:16:09 +0000 x86_64 Using renderer: OpenGL 4.6.0 GeForce RTX 2080 with Max-Q Design/PCIe/SSE2: NVIDIA Corporation OpenGL driver version is 1.2 or better. GLSL version: 4.6 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 [1] 3248 abort (core dumped) ./wallengine --dir

i had just a look in to the json file and i couldn't see what it disliked for me it looked normal (okay it has some katakana in it's text but otherwise looks normal). the wallpapers project.json as txt-file is attached here: project.txt maybe it is helpful.

I don't know if this has something to do with my problem but, when i compiled it, make complained about the following: /usr/bin/ld: CMakeFiles/wallengine.dir/wallpaperengine/irr/CImageLoaderTEX.cpp.o: in function 'irr::video::CImageLoaderTex::loadImage(irr::io::IReadFile*) const': CImageLoaderTEX.cpp:(.text+0xd7f): warning: the use of 'tmpnam' is dangerous, better use 'mkstemp'

Almamu commented 4 years ago

It should give a more meaningful error now, anyway, the version in the master branch is not able to play video yet, so your only option is to use the data-separation branch which supports video playback (although without audio support yet) that seems to load the background without any issue. Another option for you would be to use mpv or a similar player that allows you to play a video as a desktop background.

Martin1995 commented 4 years ago

Okay i will try it out

Martin1995 commented 4 years ago

works in window mode with flickery video and when i try to run it with screen specified it just does this ./wallengine --dir /home/martin/.steam/steam/steamapps/workshop/content/431960/2172415034/ --screen-root eDP-1-1 Found requested screen: eDP-1-1 -> 0x0:1920x1080 Irrlicht Engine version 1.8.4 Linux 5.4.53-1-lts #1 SMP Wed, 22 Jul 2020 20:16:09 +0000 x86_64 X Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 152 (GLX) Minor opcode of failed request: 31 (X_GLXCreateWindow) Serial number of failed request: 27 Current serial number in output stream: 28 maybe you know what x dislikes here.

I tried also some wallpapers in pkg format and it threw the following error terminate called after throwing an instance of 'std::runtime_error' what(): Cannot find file shaders/genericimage2.vert but the file exists in assets.zip image

Almamu commented 4 years ago

About the flickery video, could you record a short clip of how it looks? When I tried it on my computer the video played just fine. Are you running a NVIDIA graphics card? The error when trying to run as the desktop background seems to be a common issue with them. Sadly I don't have the hardware to properly debug it right now.

About the "Cannot find file shaders/genericimage2.vert" error, the folder structure inside the assets.zip file is incorrect. The contents of the assets folder have to be on the root of the zip file, like this: image

Martin1995 commented 4 years ago

now, after rearranging the assets.zip, the video doesn't flicker anymore.

About nVidia Card, it's an "nVidia RTX 2080 with Max Q Design" that is running with Prime and has the Primary Display connected to Intel HD Graphics (Tuxedo Laptop [Rebranded Clevo])

Almamu commented 4 years ago

Oh that's perfect.

I do have some nvidia laptops that I could try this setup on and see If I can reproduce (and fix) the issue. I guess you also have the propietary nvidia driver installed, right?

Martin1995 commented 4 years ago

Yes the proprietary nvidia driver is installed

Almamu commented 4 years ago

20 is the issue to keep track of this bug