Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352861

Summary: object member completion causes eclipse to crash
Product: [Tools] CDT Reporter: Stefan <stefan.klett>
Component: cdt-editorAssignee: Project Inbox <cdt-editor-inbox>
Status: CLOSED INVALID QA Contact: Anton Leherbauer <aleherb+eclipse>
Severity: critical    
Priority: P3 CC: cdtdoug, malaperle, yevshif, zellermester
Version: 8.0   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Stefan CLA 2011-07-22 09:43:12 EDT
Build Identifier: Version: Indigo Release Build id: 20110615-0604 

The error (probably a segfault) occurs when entering a classname (in most cases) from a external library - for example boost - while typing boost::(thread) - the call to the member completion causes eclipse to crash -most likely when typing the :: - the error  occurs reproducibly in the same situation - but not at all times - what means that the completion might work some times and then eclipse freezes again without an error message. After killing the process (Marked as  unresponsive in Activity Monitor) and restarting eclipse the code between the last save and the crash is lost.  This bug is not restricted on the version mentioned in Build ID above, but was the reason that I updated this week from Galileo to Indigo. 

Reproducible: Sometimes

Steps to Reproduce:
1.enter a classname which is a  member of a different namespace ie. boost::thread::hardware_concurrency
 the error occurs more like when typing slowly - for example when correcting the input by typing backspace - changing some characters in the classname - but always exactly after typing the scope ::
2. eclipse freezes (MacOS Rainbow Cursor - forever)
Comment 1 Marc-André Laperle CLA 2011-07-22 17:40:45 EDT
If it crashes, you should have a crash log somewhere, look for a file that looks like hs_err_pid1234.log in your eclipse folder (maybe it ends up in the Eclipse.app folder?). Also, can you specify:
-version of Mac OS
-version of Java ('java -version' in Terminal)
-the platform you are using (Carbon, Cocoa, Cocoa 64). See About, Installation Details, Configuration)

The crash might be a manifestation of a common JVM crash with CDT, see Bug 333227 comment 7 for work around.

When it freezes, try to get a stack log, see http://wiki.eclipse.org/How_to_report_a_deadlock
I personally use the jstack method.
Comment 2 david borsodi CLA 2012-04-14 05:01:39 EDT
Noticed something similar with indigo I've got this crash report:
Date/Time:       2012-04-14 10:54:35 +0200
OS Version:      10.6.8 (Build 10K549)
Architecture:    x86_64
Report Version:  7

Command:         Eclipse
Path:            /eclipses/cppeclipse/CppEclipse.app/Contents/MacOS/eclipse
Version:         3.7 (3.7)
Parent:          launchd [100]

PID:             3765
Event:           hang
Duration:        7.67s (sampling started after 2 seconds)
Steps:           37 (100ms sampling interval)

Pageins:         1
Pageouts:        6


Process:         eclipse [3765]
Path:            /eclipses/cppeclipse/CppEclipse.app/Contents/MacOS/eclipse
UID:             501

  Thread 27ec4      DispatchQueue 1
  User stack:
    37 ??? [0x1159da430]
      37 JVM_GetClassInterfaces + 10950 (in libclient64.dylib) [0x1141afa98]
        37 JVM_GetClassInterfaces + 11586 (in libclient64.dylib) [0x1141afd14]
          37 JVM_GetClassInterfaces + 12219 (in libclient64.dylib) [0x1141aff8d]
            37 jio_snprintf + 32501 (in libclient64.dylib) [0x11400c4ef]
              37 jio_snprintf + 32691 (in libclient64.dylib) [0x11400c5ad]
                37 jio_snprintf + 37160 (in libclient64.dylib) [0x11400d722]
                  37 jio_snprintf + 37321 (in libclient64.dylib) [0x11400d7c3]
                    37 jio_snprintf + 37641 (in libclient64.dylib) [0x11400d903]
                      37 mach_msg_trap + 10 (in libSystem.B.dylib) [0x7fff89dd9d7a]
Comment 3 Marc-André Laperle CLA 2012-04-15 12:08:42 EDT
Hello David. Can you try to get a Java stack while it hangs and before you get the crash report?

http://wiki.eclipse.org/How_to_report_a_deadlock
I find the jstack method the easiest on Mac.
Comment 4 david borsodi CLA 2012-07-30 04:44:34 EDT
Hello,

sorry but I didn't manage to reproduce it since I haven't used CDT in the last several months (not because of the bug...), and I probably won't in the near future. Also since 4.2 is out, I'll switch to that one when I finally got to work on this specific project and check whether that release conserved the bug or not.
Comment 5 Marc-André Laperle CLA 2016-08-12 10:49:38 EDT
No response so I'll close this. Perhaps it was a bug in the JVM.