ArtsiomCh / CMake

IntelliJ Platform plugin for CMake basic syntax highlight.
https://plugins.jetbrains.com/plugin/10089-cmake-simple-highlighter
GNU General Public License v3.0
44 stars 7 forks source link

Bug: large bracket comment cause [almost] infinite Loading file state. Prev: Can't open .cmake files when Plus is enabled #15

Closed liurui39660 closed 4 years ago

liurui39660 commented 4 years ago

What happened

I have some .cmake files downloaded from CMake's GitHub repo, like FindCUDA.cmake. When I open these files with Plus enabled, the IDE keeps loading the file; while when disabled, those files can be opened immediately.

Whether or not enabling the simple highlighter does not have this issue.

How to reproduce

  1. Download a .cmake file, no matter using curl or copy & paste the content.
  2. Try to open the file in CLion with Plus enabled.

Expected behavior

The file is opened immediately.

Actual behavior

The file keeps loading.

Note

If you create an empty .cmake file, that can be opened. But after pasting the content into it, it no longer can be opened.

Though files can't be opened, it seems they are correctly indexed by the plugin.

System info

CLion 2019.3.4 Build #CL-193.6494.38, built on February 11, 2020 Runtime version: 11.0.5+10-b520.38 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Windows 10 Pro, version 2004, build 19041.84 Plus version: 201.1.1 Simple highlighter version: 201.1.1

ArtsiomCh commented 4 years ago

Thanks for letting me know! Problem happened because of large bracket comment in the beginning of FindCUDA.cmake file (by the way, special THANKS for giving me exact file you had problem with). That create almost infinite loop while parsing those bracket comment. Will try to fix it within nearest days. Thanks again!

ArtsiomCh commented 4 years ago

fixed at 201.1.2