# NSWindow drag regions should only be invalidated on the Main Thread!

**URL:** <https://discourse.processing.org/t/nswindow-drag-regions-should-only-be-invalidated-on-the-main-thread/20233>\
**Category:** Processing\
**Created:** [April 28, 2020, 10:38am UTC](https://discourse.processing.org/t/nswindow-drag-regions-should-only-be-invalidated-on-the-main-thread/20233 "2020-04-28T10:38:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![igormakovsky](https://avatars.discourse-cdn.com/v4/letter/i/a6a055/32.png) [@igormakovsky](https://discourse.processing.org/u/igormakovsky)\
**Post date:** [April 28, 2020, 10:38am UTC](https://discourse.processing.org/t/nswindow-drag-regions-should-only-be-invalidated-on-the-main-thread/20233/1 "2020-04-28T10:38:04Z")

</div>

Hello!

I am new to processing and just learn the basics. I’ve encountered strange problem with initializing P3D. Launching 3d sketch takes almost a minute (p2d launches in a few seconds) + puts this in terminal:

```auto
java[51277:2217989] WARNING: NSWindow drag regions should only be invalidated on the Main Thread! This will throw an exception in the future. Called from (
        0 AppKit 0x00007fff2b7a7289 -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 371
        1 AppKit 0x00007fff2b78ecb2 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1416
        2 AppKit 0x00007fff2b78e723 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 42
        3 libnativewindow_macosx.jnilib 0x0000000132d4e3fe Java_jogamp_nativewindow_macosx_OSXUtil_CreateNSWindow0 + 398
        4 ??? 0x000000011c976a88 0x0 + 4774652552
)
Finished.

Terminal will be reused by tasks, press any key to close it.

```

Have no idea what’s wrong with my system and how to avoid this.

MacOS, Catalina 10.15.4, mbp 2018, everything latest.
