<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>1370</bug_id>
          
          <creation_ts>2019-04-04 17:10:23 +0200</creation_ts>
          <short_desc>NSWindow drag regions should only be invalidated on the Main Thread!</short_desc>
          <delta_ts>2019-09-09 09:52:01 +0200</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Nativewindow</product>
          <component>macosx</component>
          <version>2.4.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>macosx</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>1372</blocked>
    
    <blocked>1393</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Sven Gothel">sgothel</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          
          
          <cf_type>DEFECT</cf_type>
          <cf_scm_refs>jogl 1c697274a3c1e976bd9c9b089d6583edf4f346ae</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>6194</commentid>
    <comment_count>0</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2019-04-04 17:10:23 +0200</bug_when>
    <thetext>On OSX 10.14.3 Mojave, we get the following warning:

+++
2019-04-04 17:01:23.778 java[4098:282573] WARNING: NSWindow drag regions should only be invalidated on the Main Thread! This will throw an exception in the future. Called from (
    0   AppKit                              0x00007fff4139cccc -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 386
    1   AppKit                              0x00007fff4139a07c -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1488
    2   AppKit                              0x00007fff41399aa6 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 45
    3   libnativewindow_macosx.dylib        0x0000000119da7509 Java_jogamp_nativewindow_macosx_OSXUtil_CreateNSWindow0 + 377
    4   ???                                 0x000000011aff1667 0x0 + 4747892327
)
+++

Investigate and resolve this issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6201</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2019-04-05 00:46:54 +0200</bug_when>
    <thetext>We may consider this tool here https://developer.apple.com/documentation/code_diagnostics/main_thread_checker

as found in a comment on this SDL thread: https://discourse.libsdl.org/t/crash-on-macos-10-14-mojave-with-sdl-showmessagebox/25100

+++

The Jaamsim group has also encountered this issues, which I found by duck duck go&apos;ing the warning ;-)
https://groups.google.com/d/topic/jaamsim-users/JGqmj9CRXcU/discussion</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6202</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2019-04-05 05:56:49 +0200</bug_when>
    <thetext>Call from Main-Thread: NW&apos;s OSXUtil.CreateNSWindow0(..) and NEWT&apos;s WindowDriver.createWindow0(..)
    
OSX 10.14.3 Mojave issues a WARNING: NSWindow drag regions should only be invalidated on the Main Thread! This will throw an exception in the future.
    
The complaint about NativeWindow (NW)&apos;s OSXUtil.CreateNSWindow0(..)
might be valid, which does create a NS Window instance w/ NSView and framebuffer initialized.
    
However, the complaint about NEWT&apos;s WindowDriver.createWindow0(..)
is not, since the initialization incl framebuffer happened later
on the main thread.
    
Regardless, encapsulated both construction fully to run on the Main-Thread.
    
+++
    
Originally the Main-Thread design spec was like:
Must run on Main-Thread when or after making visible.
    
+++

Locally run all test on OSX 10.14.4 (another Mojave update)
with jdk1.8.0_192.jdk: all tests passed.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>