<?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>1482</bug_id>
          
          <creation_ts>2023-12-06 14:25:40 +0100</creation_ts>
          <short_desc>JavaCallback can throw NPE during invocation</short_desc>
          <delta_ts>2024-01-06 04:03:48 +0100</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Gluegen</product>
          <component>core</component>
          <version>2.6.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>all</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P4</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mathieu Féry (MathiusD)">mfery</reporter>
          <assigned_to name="Mathieu Féry (MathiusD)">mfery</assigned_to>
          <cc>rmanzini</cc>
    
    <cc>sgothel</cc>
          
          <cf_type>DEFECT</cf_type>
          <cf_scm_refs>d56cd13883c2af1f42906a5327c78b1a7c684012
dccb9a85e39cf82bd32ef28cb0202e2d486328ec</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>6977</commentid>
    <comment_count>0</comment_count>
    <who name="Mathieu Féry (MathiusD)">mfery</who>
    <bug_when>2023-12-06 14:25:40 +0100</bug_when>
    <thetext>When callback from native api are invoked, Gluegen dispatch event to JavaCallback registered and convert CompoundType into CompoundTypeWrapper related, but if native callback can pass NULL pointer, wrapping fail with NPE.

(Example : JOAL with ALC_SOFT_system_events, atm device parameter are always NULL)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6978</commentid>
    <comment_count>1</comment_count>
    <who name="Mathieu Féry (MathiusD)">mfery</who>
    <bug_when>2023-12-06 14:28:54 +0100</bug_when>
    <thetext>I&apos;ve made a patch available here : https://github.com/MathiusD/gluegen in 1482-npe-on-java-callback-call-with-native-null-ptr

Comparison link : https://github.com/JogAmp/gluegen/compare/master...MathiusD:gluegen:1482-npe-on-java-callback-call-with-native-null-ptr</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>7014</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2024-01-06 04:03:48 +0100</bug_when>
    <thetext>Merged, thx</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>