flutter / flutter/flutter-intellij

Cannot invoke "String.hashCode()" because "value" is null upon copy/paste sample code into new dart file

Open
#6,738 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2k
Forks
356
Avg merge
1d 11h
Merged PRs (30d)
27

Description

--

## What happened
copy/paste sample code into new dart file after comments; ide offered to have me report bug and gave me this in a file

## Version information

IntelliJ IDEA `2023.1.1` • Flutter plugin `io.flutter 73.0.4` • Dart plugin `231.8770.15`

Flutter 3.7.12 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 4d9e56e694 (2 weeks ago) • 2023-04-17 21:47:46 -0400
Engine • revision 1a65d409c7
Tools • Dart 2.19.6 • DevTools 2.20.1

## Exception

During querying provider Run line marker (class com.intellij.execution.lineMarker.RunLineMarkerProvider)

```
java.lang.RuntimeException: java.lang.NullPointerException: Cannot invoke "String.hashCode()" because "value" is null
at com.intellij.util.io.PersistentEnumeratorBase.catchCorruption(PersistentEnumeratorBase.java:646)
at com.intellij.util.io.PersistentEnumeratorBase.doEnumerate(PersistentEnumeratorBase.java:259)
at com.intellij.util.io.PersistentEnumeratorBase.tryEnumerate(PersistentEnumeratorBase.java:250)
at com.intellij.util.io.PersistentMapImpl.doGet(PersistentMapImpl.java:656)
at com.intellij.util.io.PersistentMapImpl.get(PersistentMapImpl.java:613)
at com.intellij.util.io.PersistentHashMap.get(PersistentHashMap.java:197)
at com.intellij.execution.TestStateStorage.lambda$getRecentTests$1(TestStateStorage.java:162)
at com.intellij.util.io.PersistentEnumeratorBase$1.process(PersistentEnumeratorBase.java:324)
at com.intellij.util.io.PersistentBTreeEnumerator$3.process(PersistentBTreeEnumerator.java:378)
at com.intellij.util.io.IntToIntBtree$BtreeIndexNodeView.lambda$processMappings$1(IntToIntBtree.java:629)
at com.intellij.util.io.IntToIntBtree$BtreeIndexNodeView.processMappings(IntToIntBtree.java:632)
at com.intellij.util.io.IntToIntBtree.processLeafPages(IntToIntBtree.java:1045)
at com.intellij.util.io.IntToIntBtree.processMappings(IntToIntBtree.java:1040)
at com.intellij.util.io.PersistentBTreeEnumerator.traverseAllRecords(PersistentBTreeEnumerator.java:372)
at com.intellij.util.io.PersistentEnumeratorBase.processAllDataObject(PersistentEnumeratorBase.java:320)
at com.intellij.util.io.PersistentBTreeEnumerator.processAllDataObject(PersistentBTreeEnumerator.java:363)
at com.intellij.util.io.PersistentMapImpl.processExistingKeys(PersistentMapImpl.java:590)
at com.intellij.util.io.PersistentHashMap.processKeysWithExistingMapping(PersistentHashMap.java:192)
at com.intellij.execution.TestStateStorage.getRecentTests(TestStateStorage.java:159)
at io.flutter.run.common.TestLineMarkerContributor.getTestStateIcon(TestLineMarkerContributor.java:125)
at io.flutter.run.common.TestLineMarkerContributor.getInfo(TestLineMarkerContributor.java:85)
at io.flutter.run.bazelTest.FlutterBazelTestLineMarkerContributor.getInfo(FlutterBazelTestLineMarkerContributor.java:25)
at com.intellij.execution.lineMarker.RunLineMarkerProvider.getLineMarkerInfo(RunLineMarkerProvider.java:63)
at com.intellij.codeInsight.daemon.impl.LineMarkersPass.queryProviders(LineMarkersPass.java:183)
at com.intellij.codeInsight.daemon.impl.LineMarkersPass.lambda$doCollectInformation$3(LineMarkersPass.java:114)
at com.intellij.codeInsight.daemon.impl.Divider.divideInsideAndOutsideInOneRoot(Divider.java:95)
at com.intellij.codeInsight.daemon.impl.LineMarkersPass.doCollectInformation(LineMarkersPass.java:99)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:57)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:382)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1102)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:374)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:373)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:349)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:229)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:187)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:347)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:181)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: java.lang.NullPointerException: Cannot invoke "String.hashCode()" because "value" is null
at com.intellij.util.io.EnumeratorStringDescriptor.getHashCode(EnumeratorStringDescriptor.java:25)
at com.intellij.util.io.EnumeratorStringDescriptor$EnumeratorStringDescriptorImpl.getHashCode(EnumeratorStringDescriptor.java:16)
at com.intellij.util.io.PersistentBTreeEnumerator.enumerateImpl(PersistentBTreeEnumerator.java:542)
at com.intellij.util.io.PersistentEnumeratorBase.lambda$doEnumerate$0(PersistentEnumeratorBase.java:260)
at com.intellij.util.io.PersistentEnumeratorBase.catchCorruption(PersistentEnumeratorBase.java:621)
... 46 more
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.