You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unsure how this can happen as we use Helper.cutString before:
Caused by: java.lang.IllegalArgumentException: bytes.length cannot be > 255 but was 257
at com.graphhopper.search.EdgeKVStorage.getBytesForValue(EdgeKVStorage.java:340)
at com.graphhopper.search.EdgeKVStorage.add(EdgeKVStorage.java:178)
at com.graphhopper.storage.BaseGraph.setName(BaseGraph.java:467)
at com.graphhopper.storage.BaseGraph.access$200(BaseGraph.java:45)
at com.graphhopper.storage.BaseGraph$EdgeIteratorStateImpl.setName(BaseGraph.java:967)
at com.graphhopper.reader.osm.OSMReader.addEdge(OSMReader.java:337)
at com.graphhopper.reader.osm.WaySegmentParser$Pass2Handler.handleSegment(WaySegmentParser.java:365)
at com.graphhopper.reader.osm.WaySegmentParser$Pass2Handler.splitSegmentAtSplitNodes(WaySegmentParser.java:338)
at com.graphhopper.reader.osm.WaySegmentParser$Pass2Handler.splitLoopSegments(WaySegmentParser.java:299)
at com.graphhopper.reader.osm.WaySegmentParser$Pass2Handler.splitWayAtJunctionsAndEmptySections(WaySegmentParser.java:274)
at com.graphhopper.reader.osm.WaySegmentParser$Pass2Handler.handleWay(WaySegmentParser.java:256)
at com.graphhopper.reader.osm.WaySegmentParser$ReaderElementHandler.handleElement(WaySegmentParser.java:520)
at com.graphhopper.reader.osm.WaySegmentParser.readOSM(WaySegmentParser.java:396
I do not yet fully understand if this is a correcting procedure of the String constructor or if this is due to length bits of the char (didn't find an indication here). But reducing the length further to 250 should always help. (still the method shouldn't be used as a generic cut method and so I renamed it and removed the parameter)
Activity
easbar commentedon Jun 23, 2022
thanks for the quick fix!
karussell commentedon Jun 23, 2022
I do not yet fully understand if this is a correcting procedure of the String constructor or if this is due to length bits of the char (didn't find an indication here). But reducing the length further to 250 should always help. (still the method shouldn't be used as a generic cut method and so I renamed it and removed the parameter)
otbutz commentedon Jun 23, 2022
Is it really valid to simply cut UTF8 strings after x bytes?
https://joernhees.de/blog/2010/12/14/how-to-restrict-the-length-of-a-unicode-string/
karussell commentedon Jun 23, 2022
We do not just split the string at the byte length. See the used String constructor.
Or a bit is used as "char uses more bytes" marker ... this might be the case according to some code in the String constructor:
Helper.cutString should be only for KVStorage and reduce length to 25…
RSPS_673_Matrix_SBI_Algo (#15)