Eclipse Memory Analyzer has no response after starting up
Asked Answered
B

3

6

I downloaded a stand-alone Eclipse Memory Analyzer from the official site, intending to use it to open a hprof file to do some analysis work. However, the application seems to get stuck after starting up. I can do nothing but drag the window, as the figure shows below:enter image description here

The OS I’m using is macOS Sierra, the mat version is 1.6.1, and here is the MemoryAnalyzer.ini:

  -startup
    ../Eclipse/plugins/.    org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
-data
/Users/XXX/eclipse_data
--launcher.library
../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.300.v20150602-1417
-vm
/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/bin/java
-vmargs
-Xmx2g
-Dorg.eclipse.swt.internal.carbon.smallFonts
-XstartOnFirstThread

Can anyone give me some advice? Thanks a lot.

Bandanna answered 29/12, 2017 at 9:3 Comment(12)
The first two lines of MemoryAnalyzer.ini seems to be broken (or maybe copy and paste error). Are you sure you downloaded it from the official site? The current version is 1.7.0.20170613 (released June 2017).Ashwell
@Ashwell It’s a paste error. I also tried 1.7.0 and got the same resultBandanna
Did you mean by "seems to get stuck after starting up" you cannot click on Workbench? What about the heap status that is shown in the status bar at the bottom? Does it change or is it also frozen?Ashwell
@Ashwell Exactly. I can’t click on the workbench, but the heap status increases slowly.Bandanna
In the .ini file, can you try to add -clean as the first line and to change the line after -data to /Users/XXX/eclipse_data_2 (maybe it is caused by your existing workspace)?Ashwell
@Ashwell Do you mean put -startup right under -clean?Bandanna
Yes, -clean as an additional first line. If this and using a new workspace does not help, check the file /Users/XXX/eclipse_data_2/.metadata/.log.Ashwell
Sadly it’s still not working. I tried both 1.6.1 and 1.7 . There has no .log folder but a .plugins folder under the .metadata.Bandanna
.log is not a folder, but a file that is created as soon something will be logged. As long as there is activity on the heap status, I would recommend waiting.Ashwell
@Ashwell I have been waiting for about 1 hour but .log file still hasn’t shown up. I notice that a new folder is added under the .plugins folder, so is it possible that MAT is undergoing the initialization process so it can’t be clicked?Bandanna
Yes, most of it has already been initialized. If it is not this issue, can you run the _Eclipse IDE for Java Developers? If yes, does installing MAT as plug-in work?Ashwell
@Ashwell The former one can’t work, I will try the latter one later.Bandanna
W
1

I had the same issue using jdk1.8.0_161.jdk

Then using an older JVM :

-vm
/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin

now it's working again.

My complete MemoryAnalyzer.ini:

-startup
../Eclipse/plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
--launcher.library
../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.300.v20150602-1417
-vm
/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin
-data 
/Users/German/tmp/workspace_mat
-vmargs
-Xmx5g
-Dorg.eclipse.swt.internal.carbon.smallFonts
-XstartOnFirstThread

PD: I haven't tested it with an older jdk8 version. I remember, it used to work with older than version 161.

Witmer answered 25/1, 2018 at 14:17 Comment(1)
Yes, using older version of JVM solves the issue (in my case jdk1.7.0_111.jdk). However, it worked for me after setting it in Info.plist, not in MemoryAnalyzer.ini.Arboreous
O
1

Same issue here with High Sierra.

I installed a vanilla Eclipse from https://www.eclipse.org/downloads/

And then installed MAT through the update-site at: http://download.eclipse.org/mat/1.7/update-site/

Once you restart eclipse you can select Window / Perspective / Open Perspective / Other / Memory Analysis and you will have a working installation.

Outhaul answered 27/2, 2018 at 12:2 Comment(0)
V
1

I was facing the same problem while opening MAT on my machine. Os Version: MAC Os Siera 10.12.6(16G1212) Java/JDK : jdk-9.0.1.jdk

Somehow it was not reading default Java_home location. I have added Java_home location to the info.plist and it worked. <string>-vm</string><string>/Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home</string>

<array> <string>-vm</string><string>/Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home</string> <!-- to use a specific Java version (instead of the platform's default) uncomment one of the following options, or add a VM found via $/usr/libexec/java_home -V <string>-vm</string><string>/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Commands/java</string> <string>-vm</string><string>/Library/Java/JavaVirtualMachines/1.8.0.jdk/Contents/Home/bin/java</string> --> <string>-keyring</string> <string>~/.eclipse_keyring</string> <string>-showlocation</string> </array>

Vibratory answered 5/4, 2018 at 14:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.