This project has moved and is read-only. For the latest updates, please go here.

Parsing EDI crashes with null delimiters when running under mono


When running on Linux using mono I get a crash trying to parse any EDI document. For example the below results in the attached error.log.

mono --debug src/OopFactory.X12.X12Parser/bin/Debug/X12Parser.exe tests/OopFactory.X12.Tests.Unit/Parsing/_SampleEdiFiles/FIN/_811/WayneBrantley.txt

This is caused by the no argument Interchange constructor not providing a X12DelimiterSet and then DetachedSegment trying to use the delimiters. This can be fixed in two ways, both attached. Either provide some dummy delimiters or check to see if we have delimiters before trying to use them.

file attachments


kjurka wrote Feb 10, 2017 at 12:06 AM

Patch option 1: provide dummy delimiters.

wrote Feb 10, 2017 at 12:06 AM

kjurka wrote Feb 10, 2017 at 12:06 AM

Patch option 2: check for delimiters before using.