[Bug] Clion crashes when a header file contains a function named Initialize()

 The following code will result a crash in Clion.

To reproduce the bug, please copy the code into an header file, then include the header file in a project. Then try to write some code.

Further, I notice that simply renaming the function "Initialize" to anything else would solve the situation.

typedef struct node{char ch; struct node *next;} node_t;

node_t *Initialize(char ch);

My Clion version and environment is

CLion 2016.1.3
Build #CL-145.1617, built on June 7, 2016
JRE: 1.8.0_77-b03 amd64
JVM: Java HotSpot(TM) 64-Bit Server VM by Oracle Corporation

Comment actions Permalink

Hi Yao.

It correctly works in my environment. Could you please specify which OS you are using? Also please give us more details about the crash. What kind of crash? Are there any traces/dumps left after the crash? Could you please try using CLion 2016.2 RC? Does that help?

Comment actions Permalink

I didn't have a chance to use the 2016.2 RC. I'm currently using 2016.1 on windows 10 x64. 

Copy the code above into the editor and let the code inspection run. it quickly consumes all memory allowed for the JVM (4GB by default), while the GUI stopped responding.  You have to force close Clion thus I do not know how to get a trace/dump.

It has been confirmed by multiple people using different versions of windows (Mac and Linux not tested) that this problem exists. The fix is simply renaming the function.

It seems has something to do with code inspection. If you just copy it in without triggering code inspection everything will be fine.


Please sign in to leave a comment.