Ticket #17 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

XML interface ignores length passed to NXmakedata for NX_CHAR arrays

Reported by: Freddie Akeroyd Owned by: Mark Koennecke
Priority: major Milestone: NeXus 4.1 Ready
Component: applications Version: 4.0.0
Keywords: Cc:

Description

The XML API NXputdata assumes the data passed is NULL terminated and ignores the length previously specified in a call to NXmakedata. This behaviour is different to that of the HDF API and could cause problems.

Change History

comment:1 Changed 5 years ago by Peter Peterson

  • Milestone set to NeXus 4.1

comment:2 Changed 5 years ago by Freddie Akeroyd

  • Component set to applications

A similar propblem existed with NXputattr (#83) and that has now been fixed [944].

comment:3 Changed 5 years ago by Freddie Akeroyd

  • Version set to 4.0.0

Mark, can you see an easy way to fix this? At the moment the array dimensions information for NX_CHAR is not stored anywhere during NXmakedata so NXputdata does not know how many characters to write. If we treated character nodes as custom nodes rather than opaque nodes during a write we could store this information in the node custom data section, but would doing this mess up other things?

Freddie

comment:4 Changed 5 years ago by Mark Koennecke

(In [952]) - Added support for 64 bit ints, refs #87 _ Fixed issue with text length in XML, refs #17

comment:5 Changed 5 years ago by Freddie Akeroyd

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.