brianch / offline-chess-puzzles

Tool to view and solve puzzles from the lichess puzzle database
MIT License
125 stars 17 forks source link

New updates not running on Windows 11 (64-bit) #22

Open tutdrive77 opened 7 months ago

tutdrive77 commented 7 months ago

Hi Brian,

I wanted to reach out regarding the latest updates. Firstly, I want to express my appreciation for your continuous efforts in improving this chess puzzle app.

However, I encountered an issue with both recent updates (2.4.1 and 2.4.0). It seems that the executable file (offline-chess-puzzles.exe) isn't launching on any of my computers running Windows 11, 64-bit. Interestingly, the previous version 2.3.0 works flawlessly on both Windows 11 and Windows 7 systems.

I've tried troubleshooting the problem, but unfortunately, I haven't had any success in getting the new version to start. I've tested it across multiple machines with the same result.

I'm reaching out to see if there's anything specific I can do to provide more information to help diagnose the issue. Could it perhaps be related to a missing DLL or any other dependencies?

Thanks again for your efforts! Please let me know if there's any additional information you require from my end.

brianch commented 7 months ago

Hello!

It doesn't open at all? Which graphics card do the machines have (if any) ? And is it working in the Win 7 computer?

I did test it in a Windows 11 VM, so I would guess it's graphics related.

Try navigating to the app directory in explorer, right click (in an open space) and go to "open in terminal". There type: set ICED_BACKEND=tiny-skia offline-chess-puzzles.exe [you can press tab to auto-complete]

Setting this environment variable will force the software renderer to be used, which is slower but should work in any computer.

If you find it simpler, you can download the zip below, extract the .bat file (it does the same thing as the instructions above) to the app's directory and double click in it (it'll open a CMD window before running the app).

force-software-renderer.zip

tutdrive77 commented 7 months ago

Amazing, thanks, now it worked! I think that was the issue in both of my computers.

The one with Windows 11 has a GeForce MX130 (and Intel i5 processor). The other with Windows 7 is much older, AMD chip and no graphic card.

But with your tip this old laptop runs perfectly the 32-bit version of your program.

brianch commented 7 months ago

That's great! So it's working on all your computers now?

In most cases it should auto detect if there's a suitable GPU to use or if it should use just the CPU, but in a few computers this can fail.

Just out of curiosity, did you notice any difference in performance (CPU usage) compared to the last version? The software renderer is slower, but it might still be faster than version 2.3 (that uses openGL) considering that 2.4 has a couple significant improvements in that regard (most noticeably, the way I was loading the piece SVGs before was slower than it should).

Next time I'll try to put a version that forces the software renderer in the release zip file as well (or something like this .bat file), so we get all cases covered, or perhaps even force it to be always on. I think we can leave this issue open until then.

Thanks a lot for reporting!

tutdrive77 commented 7 months ago

Yes, the version 2,4 is noticeable faster than 2.3, even running it with the software renderer.

However, now I found one way to run the program normally, by forcing Windows 11 to use the GPU, this way: (https://www.addictivetips.com/windows-tips/force-app-to-use-dedicated-gpu-windows/)

So, in the Graphic Settings, I added 'offline-chess-puzzles.exe' and choose the use the GPU (High performance)..

Hope that helps, just wanted to give this feedback as well. Thanks for all the work with this new version! I loved the possibility to export the puzzles as PDF as well.

brianch commented 7 months ago

Oh, thanks a lot for the update, it's very helpful!

That's quite interesting, then I assume it was trying to use openGL or Vulkan in the integrated graphics and failing, I've seem a couple cases like that in other apps that use the same graphics library that I use.

I'm not familiar with Windows, so I didn't even knew it was possible to set it that way 😅 I know that if I turn on anti-aliasing for the app it would do the same and be guaranteed to request the dedicated GPU, but that feels a bit hacky.

But it's great to hear that the performance is good even with the software renderer! And I'm happy you liked the PDF export :)