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

IntelliJ IDEA hangs on indexing forever when TeXiFy IDEA is enabled #3675

Open
audio-engineer opened this issue Oct 3, 2024 · 5 comments
Open
Labels
enhancement New feature or (non bug related) change to the program.

Comments

@audio-engineer
Copy link

audio-engineer commented Oct 3, 2024

Type of JetBrains IDE (IntelliJ, PyCharm, etc.) and version

IntelliJ IDEA 2024.2.3 (Ultimate Edition)
Build #IU-242.23339.11, built on September 25, 2024
Licensed to Martin Kedmenec
Subscription is active until August 5, 2025.
For educational use only.
Runtime version: 21.0.4+13-b509.17 x86_64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.lwawt.macosx.LWCToolkit
macOS 15.0
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 2048M
Cores: 12
Metal Rendering is ON
Registry:
  ide.experimental.ui=true
  cache.folding.model.on.disk=false
  i18n.locale=
  terminal.new.ui=true
  terminal.new.ui.show.promotion=false
Non-Bundled Plugins:
  MatlabSupport (0.8.5)
  com.jetbrains.space (242.23339.11)
  google-java-format (1.23.0.0)
  org.jetbrains.plugins.spotbugs (1.2.8)
  CheckStyle-IDEA (5.95.0)
  me.lensvol.blackconnect (0.6.2)
  com.intellij.ml.llm (242.23339.40)
  com.intellij.grazie.pro (0.3.336)
  nl.rubensten.texifyidea (0.9.7)
  PMDPlugin (2.0.2)
  com.jetbrains.plugins.jade (242.20224.159)
  ru.adelf.idea.dotenv (2024.2.1)
  mobi.hsz.idea.gitignore (4.5.3)
  com.firsttimeinforever.intellij.pdf.viewer.intellij-pdf-viewer (0.16.1)
Kotlin: 242.23339.11-IJ

Operating System

macOS 15.0

TeXiFy IDEA version

0.9.7

What I did (steps to reproduce)

Open any IntelliJ IDEA project, i.e. Java or LaTeX.

Minimal example to reproduce the problem

Really any kind of example project should work in this case.

Expected behavior

Indexing is performed by the IDE quickly and without any freezing.

Actual behavior

The IDE hangs on indexing forever, as can be seen on the screenshot below:

SCR-20241003-tkvb

This is the case for any kind of IntelliJ IDEA project, even Java related projects. When disabling the TeXiFy IDEA plugin, the issue disappears, which points to the fact that it's an issue with the plugin.

(if applicable) The full stacktrace of the exception thrown

I can provide you with thread dumps, logs, or whatever you might require, if needed.

@audio-engineer audio-engineer added bug Deficiencies in TeXiFy behaviour. untriaged Issue type still needs to be triaged or verified. labels Oct 3, 2024
@audio-engineer
Copy link
Author

The issue goes away when the Enable indexing of MiKTeX/TeX Live package files (requires restart) checkbox is unchecked.

@PHPirates
Copy link
Collaborator

Thanks for reporting this! I see you already found the workaround. I cannot reproduce the issue at the moment, what LaTeX installation are you using, and what version?
Does the problem remain when updating all packages?

@audio-engineer
Copy link
Author

Newest MacTeX version installed using Homebrew. I keep all my packages updated using tlmgr.

I just tested it again and it seems to work normally again.

The issue might/must have arisen after running tlmgr update --self --all before opening this issue, so it could also be related to some package, but it's impossible to say since the only symptom was that this plugin stopped indexing properly.
It's also impossible to say if updating packages since opening this issue fixed it, or something else. I can only say that IntelliJ IDEA hasn't gotten any updates since before this issue.

@PHPirates
Copy link
Collaborator

Yes, most likely the cause is that some package contains some code that messes with the TeXiFy parser when it is indexing files. That also means that this issue can appear or disappear any time packages are upgraded, for example #2687
I will think about if it is possible to enable more detailed logging so we know the root cause next time this happens.

@PHPirates PHPirates added enhancement New feature or (non bug related) change to the program. and removed bug Deficiencies in TeXiFy behaviour. untriaged Issue type still needs to be triaged or verified. labels Oct 12, 2024
@audio-engineer
Copy link
Author

Yeah, #2687 seems to be pretty much the same issue as the one I had.

More detailed logging seems like a great idea. I am not sure how much logging there is implemented now, but maybe a log could be written before every new package index. That way you if indexing is stuck, you would just need to look at the last written indexing log to find the package that's causing the freeze.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or (non bug related) change to the program.
Projects
None yet
Development

No branches or pull requests

2 participants