question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NullPointerException on File indexing (IgnoreFilesIndex), infinite loop of failing re-indexes.

See original GitHub issue

Prerequisites

  • Plugin is in the latest version
  • Issue was not reported yet
  • Stack trace (if provided) contains mobi.hsz.idea.gitignore package name

Description

Infinite loops of index runs (every ~10 sec), each accompanied with the following log entries:

2018-04-04 10:02:51,358 [ 165995] INFO - il.indexing.FileBasedIndexImpl - Rebuild requested for index IgnoreFilesIndex
java.lang.NullPointerException
at com.intellij.util.indexing.impl.ValueContainerImpl.saveTo(ValueContainerImpl.java:410)
at com.intellij.util.indexing.impl.ChangeTrackingValueContainer.saveTo(ChangeTrackingValueContainer.java:174)
at com.intellij.util.indexing.impl.ValueContainerMap$1.append(ValueContainerMap.java:58)
at com.intellij.util.io.PersistentHashMap.doAppendData(PersistentHashMap.java:481)
at com.intellij.util.io.PersistentHashMap.appendData(PersistentHashMap.java:458)
at com.intellij.util.indexing.impl.ValueContainerMap.doPut(ValueContainerMap.java:55)
at com.intellij.util.indexing.impl.ValueContainerMap.doPut(ValueContainerMap.java:28)
at com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:377)
at com.intellij.util.indexing.impl.MapIndexStorage$3.onDropFromCache(MapIndexStorage.java:132)
at com.intellij.util.indexing.impl.MapIndexStorage$3.onDropFromCache(MapIndexStorage.java:99)
at com.intellij.util.containers.SLRUMap.clear(SLRUMap.java:148)
at com.intellij.util.indexing.impl.MapIndexStorage.flush(MapIndexStorage.java:156)
at com.intellij.util.indexing.VfsAwareMapIndexStorage.flush(VfsAwareMapIndexStorage.java:106)
at com.intellij.util.indexing.MemoryIndexStorage.flush(MemoryIndexStorage.java:127)
at com.intellij.util.indexing.impl.MapReduceIndex.doFlush(MapReduceIndex.java:148)
at com.intellij.util.indexing.VfsAwareMapReduceIndex.doFlush(VfsAwareMapReduceIndex.java:192)
at com.intellij.util.indexing.impl.MapReduceIndex.flush(MapReduceIndex.java:127)
at com.intellij.util.indexing.FileBasedIndexImpl.a(FileBasedIndexImpl.java:600)
at com.intellij.util.indexing.FileBasedIndexImpl.access$4600(FileBasedIndexImpl.java:117)
at com.intellij.util.indexing.FileBasedIndexImpl$FileIndexDataInitialization$1.run(FileBasedIndexImpl.java:2443)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:230)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Steps to Reproduce

  1. Update .ignore Plugin to latest version (2.5)
  2. Open any Project in PHPStorm

Expected behavior: Index runs once, then finishes, as nothing changed

Actual behavior: Infinite index reruns (every ~10 sec)

Reproduces how often: 100%

Versions

Plugin: 2.5

IDE: PHPStorm 2018.1 / 2017.3.6

OS: macOS 10.13.3 / 10.13.4

Additional Information

Removing .ignore Plugin and manual reinstall of version 2.4 fixed the index problem. does not fix the problem completely, but the NullPointerException with subsequent index rebuild occurs only occasionally.

idea.log

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:9
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
hszcommented, Apr 10, 2018

@nicity Thanks for this summary. I’ve made a few changes - available in separated branch: https://github.com/hsz/idea-gitignore/commit/24d0b061f4c83624e1815c8435b8185ee5bb5281

I’d also appreciate if someone would install following package and verify if issues are resolved. idea-gitignore-2.6.0-RC.1.zip

1reaction
hszcommented, Apr 13, 2018

All right - everything is resolved, refactored and tesed.

v2.6.0 is built and released. Thanks @nicity !

Read more comments on GitHub >

github_iconTop Results From Across the Web

Indexing fails due to NullPointerException | Jira
Reindexing fails due to a NullPointerException, due to the JIRA Enhancer Plugin. The following error appears in the logs:.
Read more >
CoffeeBytes code folding gives nullpointerexception on eclipse
I got the inspiration from the last answer to: eclipse: 'failed to create the part's controls' error, StringIndexOutOfBoundsException.
Read more >
A null pointer exception is encountered with full-text indexing ...
NullPointerException ) occurs when content is being full-text indexed ... request queue failed on object store: OS3, attempt #0\njava.lang.
Read more >
Java NullPointerException - Detect, Fix, and Best Practices
Some of the common reasons for NullPointerException in java programs ... Message Request processing failed; nested exception is java.lang.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found