<?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>1238</bug_id>
          
          <creation_ts>2015-09-29 11:43:05 +0200</creation_ts>
          <short_desc>Fix NPE for Window-Icon&apos;s PNGPixelRect for unresolved location, i.e. null URLConnections</short_desc>
          <delta_ts>2015-10-03 12:09:08 +0200</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Newt</product>
          <component>core</component>
          <version>2.3.2</version>
          <rep_platform>pc_x86_64</rep_platform>
          <op_sys>linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>---</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>1237</dependson>
          <blocked>1199</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Xerxes Rånby">xerxes</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          
          
          <cf_type>DEFECT</cf_type>
          <cf_scm_refs>24d30eec425ca6c62f72e7c218a9149777dbec52</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>5295</commentid>
    <comment_count>0</comment_count>
    <who name="Xerxes Rånby">xerxes</who>
    <bug_when>2015-09-29 11:43:05 +0200</bug_when>
    <thetext>(11:37:22) xranby_f22: concrete example: i open gluegen, joal and jogl sourcetrees in eclipse
(11:37:30) xranby_f22: eclipse compiles all thre eprojects
(11:38:19) sgothel: I only use it for editing and maybe run a unit test, setup using JAR files
(11:38:28) xranby_f22: i select  jogamp.newt.driver.x11.X11UnderlayTracker and right click to &quot;run as&quot; a &quot;java application&quot;
(11:38:31) xranby_f22: then i hit  java.lang.NullPointerException
(11:38:31) xranby_f22: 	at jogamp.newt.driver.opengl.JoglUtilPNGIcon.arrayToX11BGRAImages(JoglUtilPNGIcon.java:49)
(11:38:31) xranby_f22: 	at jogamp.newt.driver.PNGIcon.arrayToX11BGRAImages(PNGIcon.java:76)
(11:38:31) xranby_f22: 	at jogamp.newt.driver.x11.WindowDriver.&lt;clinit&gt;(WindowDriver.java:80)
(11:38:31) xranby_f22: 	at jogamp.newt.driver.x11.DisplayDriver.initIDs0(Native Method)
(11:38:31) xranby_f22: 	at jogamp.newt.driver.x11.DisplayDriver.&lt;clinit&gt;(DisplayDriver.java:55)
(11:38:31) xranby_f22: 	at java.lang.Class.forName0(Native Method)
(11:38:31) xranby_f22: 	at java.lang.Class.forName(Class.java:264)
(11:38:31) xranby_f22: 	at com.jogamp.newt.NewtFactory.getCustomClass(NewtFactory.java:111)
(11:38:31) xranby_f22: 	at jogamp.newt.DisplayImpl.getDisplayClass(DisplayImpl.java:275)
(11:38:31) xranby_f22: 	at jogamp.newt.DisplayImpl.create(DisplayImpl.java:285)
(11:38:31) xranby_f22: 	at com.jogamp.newt.NewtFactory.createDisplay(NewtFactory.java:203)
(11:38:31) xranby_f22: 	at jogamp.newt.driver.x11.X11UnderlayTracker.&lt;init&gt;(X11UnderlayTracker.java:107)
(11:38:32) sgothel: but yes, I can check commandline w/ CLASSPATH instead of jars
(11:39:44) xranby_f22: hence JoglUtilPNGIcon can return a null resouce despite the checks currently placed
(11:40:20) xranby_f22: PNGIcon.java:76 have a check that the resouces should be avail
(11:40:24) xranby_f22: avail is true
(11:40:28) xranby_f22: but the resource is still null
(11:40:49) sgothel: not so nice :)
(11:41:10) sgothel: make it 2.3.2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5296</commentid>
    <comment_count>1</comment_count>
    <who name="Xerxes Rånby">xerxes</who>
    <bug_when>2015-09-29 11:51:33 +0200</bug_when>
    <thetext>it is the line
            final URLConnection urlConn = resources.resolve(i);
in JoglUtilPNGIcon.java:48
that returns a null urlConn

resources is com.jogamp.common.util.IOUtil$ClassResources@5b6f7412
urlConn is null</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5326</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2015-10-03 12:00:52 +0200</bug_when>
    <thetext>Testing w/ jogl/make/scripts/tests.sh USE_BUILDDIR=1,
discloses this issue - since the icons are available in jar only.

Handling all unresolved resources, i.e. null URLConnection,
is required.

Further more, the icon list passed via property &apos;newt.window.icons&apos; 
shall be separated by comma as well.
This allows passing the list via scripts more conveniently.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5327</commentid>
    <comment_count>3</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2015-10-03 12:07:41 +0200</bug_when>
    <thetext>commit 24d30eec425ca6c62f72e7c218a9149777dbec52

    Bug 1238 - Fix NPE for Window-Icon&apos;s PNGPixelRect for unresolved location; Bug 1199 - Add setting to disable default window icons
    
    Bug 1238 - Fix NPE for Window-Icon&apos;s PNGPixelRect for unresolved location, i.e. null URLConnections
    
    Testing w/ jogl/make/scripts/tests.sh USE_BUILDDIR=1,
    discloses this issue - since the icons are available in jar only.
    
    Handling all unresolved resources, i.e. null URLConnection,
    is required.
    
    Further more, the icon list passed via property &apos;newt.window.icons&apos;
    shall be separated by comma as well.
    This allows passing the list via scripts more conveniently.
      -Dnewt.window.icons=&quot;newt/data/jogamp-16x16.png,newt/data/jogamp-32x32.png&quot;
    
    +++
    
    Bug 1199 - Add setting to disable default window icons
    
    This patch also allows disabling JogAmp&apos;s own window icons
    by simply defining a non-existing location, i.e.
      -Dnewt.window.icons=&quot;null,null&quot;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>