This project has moved. For the latest updates, please go here.
1
Vote

Parsing EDI crashes with null delimiters when running under mono

description

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

comments

kjurka wrote Feb 10 at 12:06 AM

Patch option 1: provide dummy delimiters.

wrote Feb 10 at 12:06 AM

kjurka wrote Feb 10 at 12:06 AM

Patch option 2: check for delimiters before using.