P2D renderer time out

I have a game I have been working on and off on for several years now and I have just now added music to(don’t worry about copyright on the music, this is a personal only project and if I do ever make a public release I will ask the creators before doing so). If I use the default 2d renderer it loads fine(albeit slow) every time but the frame rate is somewhat unplayable so I use P2D, however P2D seems to have a loading timeout where if the program does not load in a certain span of time P2D assumes it has crashed and errors out like this (Waited 5000ms for: <4b737871, 45b48f6f>[count 2, qsz 1, owner <main-FPSAWTAnimator#00-Timer0>] - <main-FPSAWTAnimator#00-Timer0-FPSAWTAnimator#00-Timer1>). It becomes a game of chance if it will load or not (helped by telling Nvidia control panel to favor the dedicated GPU but still not perfect). this error started appearing as I began loading the music into game and my chances of the game loading have decreased as I added more music. the code is located here https://github.com/Haxorouse/Space-shooter-alpha . If anyone knows how to fix it I would appreciate it very much. suggestions and bug reports would also be appreciated.

1 Like

This statement surface.setResizable(true); is very problematic on my 64-bit PDE 3.5.3 under Win 8.1 using the P2D renderer. :face_with_thermometer:

Perhaps move it to the end of setup() or try to load your assets in settings() instead. :thinking:

1 Like

in every draw you call ONE levelx,
inthere at the end call same HUD();
inthere create a FONT by reading a file

shouldn’t that be in setup only once?

( i not test run it or read all … just saw accidentally )

1 Like

Worked, loading them in settings pre-loads them and then the renderer doesn’t assume it has crashed, thank you