NullPointerException (error de referencia nula)

Open
#1,217 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
58/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
kotlin

Research direction

Start with ee.carlrobert.codegpt.toolwindow.chat.structure.data.PsiStructureRepository.kt at line 200, where the NullPointerException occurs in update. Trace the nullable values used by the suspending update logic and identify the missing guard. Reproduce the failure in the IntelliJ plugin and confirm that the update completes without an unhandled null-reference exception.

Written by the indexing model from the issue text.

Description

bug
What happened?

ProxyAI (también conocido como CodeGPT) para IntelliJ.

Image
Relevant log output or stack trace
Unhandled exception in Dispatchers.IO

com.intellij.openapi.diagnostic.UnhandledException
	at com.intellij.openapi.application.impl.ExceptionsKt.processUnhandledException(exceptions.kt:55)
	at com.intellij.openapi.application.impl.CoroutineExceptionHandlerImpl.handleException(CoroutineExceptionHandlerImpl.kt:27)
	at kotlinx.coroutines.internal.CoroutineExceptionHandlerImpl_commonKt.handleUncaughtCoroutineException(CoroutineExceptionHandlerImpl.common.kt:34)
	at kotlinx.coroutines.CoroutineExceptionHandlerKt.handleCoroutineException(CoroutineExceptionHandler.kt:31)
	at kotlinx.coroutines.StandaloneCoroutine.handleJobException(Builders.common.kt:192)
	at kotlinx.coroutines.JobSupport.finalizeFinishingState(JobSupport.kt:229)
	at kotlinx.coroutines.JobSupport.tryMakeCompletingSlowPath(JobSupport.kt:953)
	at kotlinx.coroutines.JobSupport.tryMakeCompleting(JobSupport.kt:901)
	at kotlinx.coroutines.JobSupport.makeCompletingOnce$kotlinx_coroutines_core(JobSupport.kt:866)
	at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:99)
	at kotlinx.coroutines.debug.internal.DebugProbesImpl$CoroutineOwner.resumeWith(DebugProbesImpl.kt:545)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:47)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
	at kotlinx.coroutines.internal.SoftLimitedDispatcher$Worker.run(SoftLimitedDispatcher.kt:130)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:610)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:1188)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:775)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:762)
Caused by: java.lang.NullPointerException
	at ee.carlrobert.codegpt.toolwindow.chat.structure.data.PsiStructureRepository$update$1.invokeSuspend(PsiStructureRepository.kt:200)
	at ee.carlrobert.codegpt.toolwindow.chat.structure.data.PsiStructureRepository$update$1.invoke(PsiStructureRepository.kt)
	at ee.carlrobert.codegpt.toolwindow.chat.structure.data.PsiStructureRepository$update$1.invoke(PsiStructureRepository.kt)
	at ee.carlrobert.codegpt.util.coroutines.DisposableCoroutineScope$launch$1.invokeSuspend(DisposableCoroutineScope.kt:14)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
	... 7 more
	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelled}@63cdf9ba, Dispatchers.IO]
Steps to reproduce

No response

CodeGPT version

3.8.0-241.1

Operating System

Linux

Dominant language
Kotlin
Stars
1.9k
Forks
401
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from carlrobertoh/ProxyAI

All issues in carlrobertoh/ProxyAI

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.