Ottodix / Eole-foobar-theme

Eole blows gently into your ear his nicest melodies.
1.29k stars 85 forks source link

Getting error when clicking in the library #298

Open JadeTank opened 1 month ago

JadeTank commented 1 month ago
Getting this error now when I right click in the middle where all the albums are listed 

Error: Spider Monkey Panel v1.6.1 (GraphicBrowser: GraphicBrowser v1.2.3b22 by Ottodix)
AppendMenuItem failed:
WinAPI error:
  AppendMenu failed with error (0x0):
    Function failed, but returned a `SUCCESS` error code, which is usually caused by a bugged WinAPI. One such case is when process runs out of GDI handles and can't create a new GDI object.

File: JStheme_common.js
Line: 1919, Column: 58
Stack trace:
  createGenrePopupMenu@JStheme_common.js:1919:58
  on_mouse_rbtn_down@WSHgraphicbrowser_trackinfos.js:6487:25

Originally posted by @zananashi in https://github.com/Ottodix/Eole-foobar-theme/issues/292#issuecomment-2075184804

JadeTank commented 1 month ago

@zananashi The issue appears to come from the fact that you just have too many combinations of genres in your library. Im not sure if theres a great way to fix this without rewriting the way the 'Edit Genre' menu is handled as a whole, but as a stopgap measure for now you should be able to fix the issue for now like this:

Replace line 1917 for (var i = 0; i < g_genre_cache.genreList.length; i++) { With this for (var i = 0; i < g_genre_cache.genreList.length && i < 100; i++) {

This means you probably won't see all the genres, and you can try increasing the number from 100 if you need to see more, but it ll stop the WinAPI from running out of handles

zananashi commented 2 weeks ago

@zananashi The issue appears to come from the fact that you just have too many combinations of genres in your library. Im not sure if theres a great way to fix this without rewriting the way the 'Edit Genre' menu is handled as a whole, but as a stopgap measure for now you should be able to fix the issue for now like this:

Replace line 1917 for (var i = 0; i < g_genre_cache.genreList.length; i++) { With this for (var i = 0; i < g_genre_cache.genreList.length && i < 100; i++) {

This means you probably won't see all the genres, and you can try increasing the number from 100 if you need to see more, but it ll stop the WinAPI from running out of handles

Sorry for the late reply, I've totally forgotten to. This totally fixed it!