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
{{ message }}
Repository navigation
Deserialization crashes when DATATYPE-DEFINITION-STRING/@MAX-LENGTH is UInt32.Max #60
I have verified that I am running the latest version of the reqifsharp
I have searched open and closed issues to ensure it has not already been reported
Description
Deserialization crashes in DatatypeDefinitionString::ReadXml with the following fragment in the ReqIF file:
<DATATYPE-DEFINITION-STRING DESC="Any string without formatting."
IDENTIFIER="_U62Ck58zEeqqT_YuDrpRtg"
LAST-CHANGE="2020-05-26T11:28:58.424+02:00"
LONG-NAME="T_String"
MAX-LENGTH="4294967295"/>
This happens because ReadXml parses the length as a 32 bit integer but the value is too large to store. A reasonable work around might be to catch the System.OverflowException and just store int.MaxValue in MaxLength.
Steps to Reproduce
System Configuration
reqifsharp version: 9.2.4
Environment (Operating system, version and so on):
Apologies for the tardy reply; its been a crazy week & thanks @samatstariongroup for addressing this so quickly. Much appreciated. Agree it resolves the issue I hit.
@PaulMartinsen new nugets have been released that fix this issue. The release notes provide an overview of what has been fixed in this version, a bit more than just this issue :-)
Activity
[Refactor] reading xml attributes, set properties to a default value …
samatstariongroup commentedon Nov 9, 2025
@PaulMartinsen please have a look at PR #61, i think this implements your suggestion
PaulMartinsen commentedon Nov 12, 2025
Apologies for the tardy reply; its been a crazy week & thanks @samatstariongroup for addressing this so quickly. Much appreciated. Agree it resolves the issue I hit.
[Refactor] reading xml attributes, set properties to a default value …
samatstariongroup commentedon Nov 12, 2025
@PaulMartinsen new nugets have been released that fix this issue. The release notes provide an overview of what has been fixed in this version, a bit more than just this issue :-)
https://github.com/STARIONGROUP/reqifsharp/releases/tag/10.0.0