nikhilgupta10 / GridLAB-D

Other
1 stars 0 forks source link

#980 Issues with object names longer than 64 characters, #2706

Open nikhilgupta10 opened 7 years ago

nikhilgupta10 commented 7 years ago

While object names can be 1024 characters, it appears \object references\ seem to break down around 64 characters. It is assumed this is related to some of the functions using object names not parsing the full length, or otherwise having an issue. This may also be due to some individual object properties (e.g., players?).

A simple example is to put an object with a 1024-character name and generate an XML. The name in the XML is clearly being truncated around 64 characters. The same type of behavior occurs if you try to reference a player to that object (via explicit parent, not implicit) - GridLAB-D errors out about not being able to find the object.

Marking as minor since it doesn't seem to pop up often.,

nikhilgupta10 commented 7 years ago

nikhilgupta10 imported these comments from Sourceforge: The user was set to null. Therefore assigning this to afisher1. "dchassin":In older versions of GridLAB-D the object name was limited to 64 characters. But the core now supports arbitrary length names by allocating sufficient space to hold the name given when the object is created.

However, if you look at object.c/object_saveall_xml() it uses char32 for oname, which is evidently not enough. Maybe it should be changed to char1024. There are actually more than one instance of this call using the reduced size buffer that should be fixed.,