IfcPlugins icon indicating copy to clipboard operation
IfcPlugins copied to clipboard

Bug report, Error on line 13334: No right parenthesis found in line

Open yanzhenxing opened this issue 8 years ago • 1 comments

Hi, Ruben,

I find another bug.

When I use IfcStepStreamingDeserializer to process data, It throws exception "Error on line 13334: No right parenthesis found in line". I debug the code, find that (line 239 to 248):

				if (line.length() > 0 && line.charAt(0) == '#') {
					while (line.endsWith("*/")) {
						line = line.substring(0, line.lastIndexOf("/*")).trim();
					}
					if (line.endsWith(";")) {
						processRecord(line);
					} else {
						return false;
					}
				}

while the line ends with ";", it will be considered as the end of one item. But I found a special ifc file, which contains an item as follow:

#13430 = IFCPROPERTYSINGLEVALUE ('970', '', IFCLABEL ('970;1;Einbauventil;;ZYLI;0;0;0;1;0;0;0;1;0;44;10;
'), $);

In this case, the line will be parsed as "#13430 = IFCPROPERTYSINGLEVALUE ('970', '', IFCLABEL ('970;1;Einbauventil;;ZYLI;0;0;0;1;0;0;0;1;0;44;10;". And an exception is thrown.

yanzhenxing avatar Feb 27 '17 12:02 yanzhenxing

Do you have a line break after the last semicolon in the label string? Then this is the cause of failure and might have to be removed. Should be doublechecked with ISO 1030-21, whether it is allowed.

hlg avatar Aug 22 '17 07:08 hlg