# P2D renderer time out

**URL:** <https://discourse.processing.org/t/p2d-renderer-time-out/14205>\
**Category:** Processing\
**Created:** [September 25, 2019, 5:13pm UTC](https://discourse.processing.org/t/p2d-renderer-time-out/14205 "2019-09-25T17:13:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Haxorouse](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/haxorouse/32/2776_2.png) [@Haxorouse](https://discourse.processing.org/u/Haxorouse)\
**Post date:** [September 25, 2019, 5:13pm UTC](https://discourse.processing.org/t/p2d-renderer-time-out/14205/1 "2019-09-25T17:13:18Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [September 25, 2019, 8:55pm UTC](https://discourse.processing.org/t/p2d-renderer-time-out/14205/2 "2019-09-25T20:55:56Z")

</div>

> [@Haxorouse](#):
>
> , 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…

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

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

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [September 26, 2019, 1:59am UTC](https://discourse.processing.org/t/p2d-renderer-time-out/14205/3 "2019-09-26T01:59:25Z")

</div>

in every draw you call ONE levelx,  
inthere at the end call same HUD();  
inthere create a FONT by reading a file  
`HUDFont=createFont("Monotxt_IV50-15.vlw",15);`

shouldn’t that be in setup only once?

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

---

<div class="post-metadata">

**Author:** ![Haxorouse](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/haxorouse/32/2776_2.png) [@Haxorouse](https://discourse.processing.org/u/Haxorouse)\
**Post date:** [September 26, 2019, 10:36am UTC](https://discourse.processing.org/t/p2d-renderer-time-out/14205/4 "2019-09-26T10:36:06Z")

</div>

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