# fullScreen() crashes with P2D in Python mode

**URL:** <https://discourse.processing.org/t/fullscreen-crashes-with-p2d-in-python-mode/11975>\
**Category:** Processing.py\
**Created:** [June 10, 2019, 5:32pm UTC](https://discourse.processing.org/t/fullscreen-crashes-with-p2d-in-python-mode/11975 "2019-06-10T17:32:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![data-arts](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/data-arts/32/5498_2.png) [@data-arts](https://discourse.processing.org/u/data-arts)\
**Post date:** [June 10, 2019, 5:32pm UTC](https://discourse.processing.org/t/fullscreen-crashes-with-p2d-in-python-mode/11975/1 "2019-06-10T17:32:23Z")

</div>

Hello all,

Can anyone help me understand why `fullScreen(P2D)` crashes in Python mode? I’ve included a sketch below that demonstrates the problem, although for me this happens with all sketches.

In my environment (Processing 3.53, MacOS Mojave (10.14.5), MacBook Pro / Retina), any sketch that calls `fullScreen(P2D)` reliably crashes in Python mode. There’s no error message in Processing’s console, but eventually I will get a dialog box from the OS that says, “Processing quit unexpectedly. Ignore / Report… / Reopen.”

I’ve discovered an awkward workaround that I’m hoping may also be a clue to what’s causing this: **If I run the sketch once using the default renderer (by removing `P2D` from the `fullScreen()` call below), then afterwards, I can replace `P2D` in the call, and the sketch will run in P2D mode with no problem.**

Interestingly, the sketch does not crash if I call `size(h,w,P2D)` instead of `fullScreen(P2D)`. And just as with the default renderer, after I’ve run the sketch once using `size(h,w,P2D)`, I can then change that line to `fullScreen(P2D)`, and from that point forward, the sketch will behave perfectly.

After I close the sketch file, the next time I reopen it, I will need to repeat the same procedure:

1. Remove `P2D` from the `fullScreen()` call (or replace it with a `size()` call)
2. Run the sketch once
3. Restore the `fullScreen(P2D)` call
4. Run the sketch again

Other testing and info:

- The scenario is the same whether I call `fullScreen()` in `settings()` or in `setup()`.
- I’m using Processing 3.53 and running on MacOS Mojave (10.14.5).
- This problem persists across all members of our team using different MacBooks and MacPro machines – all are running the same OS and Processing versions. I have not collected details yet, but I’ve also tested this briefly under Windows 10 (same Processing version, 3.5.3) and it appears to behave similarly.

```auto
def setup():
    global k
    fullScreen(P2D)
    fill(0,200,0,80)
    stroke(0,255,0,127)
    strokeWeight(4)
    k = 0

def draw():
    global k
    background(0)
    k += .06
    if k > TWO_PI:
        k = 0
    arc(width/2, height/2, 200, 200, HALF_PI, k+HALF_PI)

```

Has anyone else experienced similar crashes or related issues? I’m new to the .py side of Processing – has anyone noticed this problem previously? Any and all help / advice / etc. greatly appreciated!

-br

---

<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:** [June 10, 2019, 6:12pm UTC](https://discourse.processing.org/t/fullscreen-crashes-with-p2d-in-python-mode/11975/2 "2019-06-10T18:12:05Z")

</div>

- It doesn’t crash for me on my 64-bit Win8.1 AMD laptop.
- However, if I hit ESC to exit while still on fullscreen, I have to press the famous CTRL + ALT + DEL combo and select Task Manager.
- Once I do that, I can see my OS’ desktop again.
- And funnily, the Python sketch had already exited normally.
- It’s just I’ve got stuck in fullscreen!

---

<div class="post-metadata">

**Author:** ![data-arts](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/data-arts/32/5498_2.png) [@data-arts](https://discourse.processing.org/u/data-arts)\
**Post date:** [June 10, 2019, 6:13pm UTC](https://discourse.processing.org/t/fullscreen-crashes-with-p2d-in-python-mode/11975/3 "2019-06-10T18:13:43Z")

</div>

Interesting – thanks for trying it. Are you running Processing 3.5.3?

---

<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:** [June 10, 2019, 6:16pm UTC](https://discourse.processing.org/t/fullscreen-crashes-with-p2d-in-python-mode/11975/4 "2019-06-10T18:16:13Z")

</div>

Yup! Running current PDE v3.5.3 + Python Mode build 3056. 🐍

---

<div class="post-metadata">

**Author:** ![data-arts](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/data-arts/32/5498_2.png) [@data-arts](https://discourse.processing.org/u/data-arts)\
**Post date:** [June 10, 2019, 6:17pm UTC](https://discourse.processing.org/t/fullscreen-crashes-with-p2d-in-python-mode/11975/5 "2019-06-10T18:17:12Z")

</div>

Good to know; so maybe it’s a Mac thing.

---

<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:** [June 10, 2019, 6:23pm UTC](https://discourse.processing.org/t/fullscreen-crashes-with-p2d-in-python-mode/11975/6 "2019-06-10T18:23:24Z")

</div>

Seems like it’s hard for the devs to create code that works consistently for 3 OSes and all of its incarnations. 😬

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [June 12, 2019, 6:38pm UTC](https://discourse.processing.org/t/fullscreen-crashes-with-p2d-in-python-mode/11975/7 "2019-06-12T18:38:34Z")

</div>

Have you reported the issue?:

- [https://github.com/jdf/processing.py/issues](https://github.com/jdf/processing.py/issues)
- [https://github.com/processing/processing/issues](https://github.com/processing/processing/issues)

---

<div class="post-metadata">

**Author:** ![data-arts](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/data-arts/32/5498_2.png) [@data-arts](https://discourse.processing.org/u/data-arts)\
**Post date:** [June 13, 2019, 7:07pm UTC](https://discourse.processing.org/t/fullscreen-crashes-with-p2d-in-python-mode/11975/8 "2019-06-13T19:07:45Z")

</div>

Yes, [I just posted it](https://github.com/processing/processing/issues/5879) – thanks.
