Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE in constructor of DefaultHelpFormatter #19

Closed
wadoon opened this issue Jun 12, 2017 · 3 comments
Closed

NPE in constructor of DefaultHelpFormatter #19

wadoon opened this issue Jun 12, 2017 · 3 comments
Assignees
Labels
Milestone

Comments

@wadoon
Copy link

wadoon commented Jun 12, 2017

Following line:

    var hf = DefaultHelpFormatter()

leads to a NullPointerException:

Exception in thread "main" kotlin.KotlinNullPointerException
	at kotlin.coroutines.experimental.SequenceBuilderIterator.yield(SequenceBuilder.kt:163)
	at com.xenomachina.text.TextKt$codePointSequence$1.doResume(Text.kt:33)
	at kotlin.coroutines.experimental.jvm.internal.CoroutineImpl.resume(CoroutineImpl.kt:54)
	at kotlin.coroutines.experimental.SequenceBuilderIterator.hasNext(SequenceBuilder.kt:128)
	at com.xenomachina.text.term.TextTermKt.codePointWidth(TextTerm.kt:180)
	at com.xenomachina.argparser.DefaultHelpFormatter.<init>(DefaultHelpFormatter.kt:66)
	at edu.kit.iti.formal.automation.rvt.HelloKt.main(Hello.kt:16)
  • kotlin-argparser version: com.xenomachina : kotlin-argparser : 2.0.1
    • version 2.0.0 also effected
    • version 1.1.0 not effected
  • Kotlin version: 1.1.2-4
@xenomachina
Copy link
Owner

Can you try this with Kotlin version: 1.1.2-5? I am getting NPEs with 1.1.2-4 that I'm not seeing with 1.1.2-3 or 1.1.2-5, which makes me suspect that 1.1.2-4 has some weird bug in SequenceBuilderIterator.

@xenomachina xenomachina self-assigned this Jun 12, 2017
@xenomachina
Copy link
Owner

I've changed xenocom (the underlying lib that used SequenceBuilder) to not use SequenceBuilder anymore, and this seems to stop the NPEs with 1.1.2-4. I should have a release of kotlin-argparser with this fix out shortly, but if you want to confirm that it solves the issue for you, you can temporarily add a direct dependency to xenocom 0.0.5.

@xenomachina xenomachina added this to the 2.0.2 milestone Jun 12, 2017
@xenomachina
Copy link
Owner

I just released kotlin-argparser 2.0.2, which I believe fixes this issue.

If you are still seeing this problem after upgrading to that release, then please reopen this issue.

Thanks for the report, and especially for including the version numbers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants