<?xml version="1.0" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.jacorb.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://www.jacorb.org/bugzilla/"
          
          maintainer="jacorb@goots.org"
>

    <bug>
          <bug_id>994</bug_id>
          
          <creation_ts>2014-10-01 08:59:53 +0000</creation_ts>
          <short_desc>NullPointerException during ORB initialization</short_desc>
          <delta_ts>2014-11-06 18:10:02 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>JacORB</product>
          <component>ORB</component>
          <version>3.5</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>franky.bugzilla</reporter>
          <assigned_to name="Mailinglist to track bugs">jacorb-bugs</assigned_to>
          <cc>jacorb</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>3206</commentid>
    <comment_count>0</comment_count>
    <who name="">franky.bugzilla</who>
    <bug_when>2014-10-01 08:59:53 +0000</bug_when>
    <thetext>I&apos;m running multiple ORB instances (each with different properties) within a single JVM. The differnt ORB instances are initialized in parallel on multiple threads. All goes well until today where I got a NullPointerException during orb initialization:
java.lang.NullPointerException
at org.omg.CONV_FRAME.CodeSetComponentHelper.write(CodeSetComponentHelper.java:68)
at org.omg.CONV_FRAME.CodeSetComponentInfoHelper.write(CodeSetComponentInfoHelper.java:68)
at org.jacorb.orb.standardInterceptors.CodeSetInfoInterceptor.&lt;init&gt;(CodeSetInfoInterceptor.java:57)
at org.jacorb.orb.standardInterceptors.IORInterceptorInitializer.post_init(IORInterceptorInitializer.java:61)
at org.jacorb.orb.ORB.interceptorPostInit(ORB.java:2147)
at org.jacorb.orb.ORB.internalInit(ORB.java:2005)
at org.jacorb.orb.ORB.set_parameters(ORB.java:1953)
at org.omg.CORBA.ORB.init(ORB.java:251)

After some digging in the code, I&apos;ve found out that the problem lies in org.jacorb.orb.giop.CodeSet&apos;s method &quot;getLocalCodeSetComponentInfo&quot; which is not correctly implemented for concurrent access: In this method a first thread can have created &quot;localCodeSetComponentInfo&quot; but not filled in the field &quot;ForCharData&quot; yet and a second thread can then return this half initialized &quot;localCodeSetComponentInfo&quot; object as the first check on &quot;localCodeSetComponentInfo&quot; being null is not within the synchronized block.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3207</commentid>
    <comment_count>1</comment_count>
    <who name="Nick Cross">jacorb</who>
    <bug_when>2014-10-01 10:18:09 +0000</bug_when>
    <thetext>Yes this does look possible. Are you able to reproduce it easily as a test case?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3213</commentid>
    <comment_count>2</comment_count>
    <who name="Nick Cross">jacorb</who>
    <bug_when>2014-11-06 18:10:02 +0000</bug_when>
    <thetext>Hopefully fixed by SHA 1a0a0c8a3fa9cc27d5c2929ff86101d5f06187e2</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>