# G4P library crashes with multi-window

**URL:** <https://discourse.processing.org/t/g4p-library-crashes-with-multi-window/3791>\
**Category:** Libraries\
**Created:** [September 24, 2018, 1:02pm UTC](https://discourse.processing.org/t/g4p-library-crashes-with-multi-window/3791 "2018-09-24T13:02:42Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![colouredmirrorball](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/colouredmirrorball/32/234_2.png) [@colouredmirrorball](https://discourse.processing.org/u/colouredmirrorball)\
**Post date:** [October 31, 2024, 9:56pm UTC](https://discourse.processing.org/t/g4p-library-crashes-with-multi-window/3791/23 "2024-10-31T21:56:18Z")

</div>

I’m not using G4P. Sorry for the confusion: the crash is the same, but the situation is not. However I am trying to run two sketches in the same JVM (one starts the other with `PApplet.runSketch()`). Similar to how G4P behaves under the hood.

It seems at the least, the issue is still persistent in 4.3.

Is this a known issue in G4P or has there been a solution? Just grasping at straws here…

---

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [November 1, 2024, 12:38am UTC](https://discourse.processing.org/t/g4p-library-crashes-with-multi-window/3791/24 "2024-11-01T00:38:41Z")

</div>

> [@colouredmirrorball](#):
>
> I’m not using G4P

Is the second sketch exported into an app? If so you can do something like this with launch():

```auto
void setup() {
  size(400, 400);
  surface.setTitle("Default Processing Window");
}

void draw() {
}

void mousePressed() {
  println("Opening App");
  launch("/Users/userName/Documents/Processing/shell/shell.app");
}

```

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [November 1, 2024, 9:49am UTC](https://discourse.processing.org/t/g4p-library-crashes-with-multi-window/3791/25 "2024-11-01T09:49:06Z")

</div>

> [@colouredmirrorball](#):
>
> I’m not using G4P. Sorry for the confusion: the crash is the same, but the situation is not.

Since the whole discussion 6 years ago was all about using G4P and multiple windows 🤔 then perhaps you should have started a new discussion. 🙄

If your problem is about sketches using multiple windows then perhaps you might have described how you created them if not using G4P. I seriously think that might be useful information.

[Previous page](https://discourse.processing.org/t/g4p-library-crashes-with-multi-window/3791.md?page=1)
