interedition / collatex

CollateX – Software for Collating Textual Sources
http://collatex.net/
GNU General Public License v3.0
88 stars 38 forks source link

CollateX crashes with «Unexpected error null» #22

Open gioele opened 9 years ago

gioele commented 9 years ago

CollateX will crash with the following error

Unexpected error
null

when run with the following JSON input file:

{
    "witnesses" : [
        {
            "id" : "base",
            "tokens" : [
                { "t" : "id " },
                { "t" : "est " },
                { "t" : "sexaginta ", "n": "[num]" },
                { "t" : "solidos " }
            ]
        },
        {
            "id" : "w1",
            "tokens" : [
                { "t" : "solidos " },
                { "t" : "triplo " }
            ]
        },
        {
            "id" : "w2",
            "tokens" : [
                { "t" : "nostrum " },
                { "t" : "cogatur " },
                { "t" : "id " },
                { "t" : "xl ", "n": "[num]" },
                { "t" : "solidos " },
                { "t" : "in " }
            ]
        },
        {
            "id" : "w3",
            "tokens" : [
                { "t" : "nostrum " },
                { "t" : "in " },
                { "t" : "triplo " },
                { "t" : "conpon " },
                { "t" : ". " },
                { "t" : ". " },
                { "t" : "id " },
                { "t" : "lx ", "n": "[num]" }
            ]
        },
        {
            "id" : "w4",
            "tokens" : [
                { "t" : "est " },
                { "t" : ". " },
                { "t" : ". " },
                { "t" : ". " },
                { "t" : "solidos " },
                { "t" : "in " }
            ]
        }
    ]
}

The error started appearing after we normalized the token sexaginta to [num].

Please note that this JSON file is a reduced minimal test case, the original was much longer and very different.

tla commented 2 years ago

Hi all - it seems this problem is still around. I tried to introduce CollateX in my seminar on Monday and three of the four students (both Mac and Windows) had this error when trying to collate plaintext files... Is there any idea meanwhile what is causing it?

rhdekker commented 2 years ago

Hi Tara, I was never able to find the origin of this bug. The mistake is not in the location where the error is thrown, but happens much earlier. I suspect it happens in the processing of the input. The earliest I could take a look at it is in December.

There is a workaround that you can use in the meantime and that is to switch to the Needlemann Wunsch algorithm by setting the option "algorithm" to "needleman-wunsch". That algorithm has no transposition detection however, which may not care about in all use cases.

tla commented 2 years ago

Hi Ronald, thanks for the tip! For what it's worth, all three of the affected students got it working when I asked them to downgrade to Java 11 from Java 17…

On Tue, 16 Nov 2021 at 20:49, Ronald Haentjens Dekker < @.***> wrote:

Hi Tara, I was never able to find the origin of this bug. The mistake is not in the location where the error is thrown, but happens much earlier. I suspect it happens in the processing of the input. The earliest I could take a look at it is in December.

There is a workaround that you can use in the meantime and that is to switch to the Needlemann Wunsch algorithm by setting the option "algorithm" to "needleman-wunsch". That algorithm has no transposition detection however, which may not care about in all use cases.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/interedition/collatex/issues/22#issuecomment-970624015, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADHBJGVKNUY523YS67LEDLUMKYS3ANCNFSM4BMES5XQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

skurzinz commented 1 year ago

Just confirming: The command line interface demands an earlier Java version. I got it to work using Java 8…