[NeXus-code-tickets] [NeXusCode] #159: Writing attributes before data may cause data write to fail

NeXus Data Format Library and Applications noreply at nexusformat.org
Tue Feb 3 22:58:42 GMT 2009


#159: Writing attributes before data may cause data write to fail
--------------------+-------------------------------------------------------
 Reporter:  Mlesha  |       Owner:  Unassigned
     Type:  defect  |      Status:  new       
 Priority:  minor   |   Milestone:            
Component:  napi    |     Version:  trunk     
 Keywords:          |  
--------------------+-------------------------------------------------------
 Calling NXputattr before NXputdata can cause the NXputdata to fail with
 message ‘No dataset open’ and all 0’s are written to the data file instead
 of the data.  Failure depends on the specific combination of attributes
 written, and was observed while writing uncompressed XML files but could
 affect other types.  The problem does not occur if all NXputdata are done
 before NXputattr calls.  There is no indication in the API documentation
 that this order needs to be followed (apart from the example) – either
 this is an API bug or the documentation needs to include a note that this
 order needs to be enforced (it is counter-intuitive since in XML output
 the attributes precede the data).

-- 
Ticket URL: <http://trac.nexusformat.org/code/ticket/159>
NeXus Data Format Library and Applications <http://www.nexusformat.org/>
NeXus Data Format Library and Applications



More information about the NeXus-code-tickets mailing list