gephi/gephi

Mac OS Freeze/Hang

Simounawind opened this issue · 73 comments

EDIT: If you're experiencing a hang/freeze on Mac OS, please fill this short questionnaire. Thank you!

Expected Behavior

I'm using the Gephi 0.95 and 0.96, but after trying these two versions, I found that sometimes it may go crashing with the rainbow circle running all the time, so I have to reopen it. Il doesn't hit me all the time but occasionally. Also, there is always nothing showing in "preview" even if i have tried to presse the refresh bottom.

Current Behavior

Crash

Possible Solution

Maybe the version is not compatible with the new MacOS monterey 12.4 ?
Idk too

Steps to Reproduce

  1. Open the software
  2. Load a existing program
  3. Crash

Context

These 2 issues existes ever since i start using this software, about 7 days before.

Your Environment

  • Version used: Gephi 0.9.5
  • Operating System: MacOS Monterey 12.4

Here is the report :
report.txt

I got the same problem, I tried the older version but still got rainbel circle

Hi, thanks for the report. There is no known problem on Monterey 12.4. I'm curious if you're running M1 processors by any chance?

Hi, yes I'm actually running on M1Pro. Btw thanks for this amazing software, we talked a lot about it on class !

When strat Gephi, I need to open another window above it. And the rainbow circle never come back. I'm running on M1Pro too.

what exactly do you mean - open another window above it?? I'm running OS 12.4, M1, 16G ram, and Gephi 9.5

when you launch Gephi, you open About this Mac and let About this Mac window above the Gephi launch interface.

Hello. I'm having the same issue on 12.4 on an M1 Mac, though I was able to run Gephi on this M1 Mac in the past without issue.

Hi, unfortunately so far I'm not able to reproduce this issue. The report provided says that it hang but not much other details. I would need some more help to investigate, potentially even having a Zoom call with someone so I can see it "live". Otherwise, any clues on the following would help:

  1. When does it hang exactly? After the spash screen? When the graph window is initatializing?
  2. Has this issue appeared when you moved from Mac OS 12.3 to 12.4?
  3. Does version 0.9.3 work? and 0.9.2?
  4. Attach the content of the messages.log so I can see the application logs
  5. Try launching it from a terminal /Applications/Gephi.app/Contents/MacOS/gephi and provide any logs if any
  6. Open the Applications > Console and see if you have any gephi/netbeans/java crash or spin reports. Attach those as well.

Much appreciated

I'd be happy to do a Zoom meeting with you! In the meanwhile, I'll try to answer the questions you've asked.

  1. I make it through the splash screen and it seems to hang when the Graph window is initializing.
  2. It's hard to say exactly when this issue started occurring, but I was able to successfully use Gephi in the past and this issue is new. It might have been after the upgrade from 12.3 to 12.4 as I don't think I've used Gephi after that upgrade, but I can't say for certain.
  3. 0.9.3 seems to have the same issue. 0.9.2 DOES seem to load correctly.
  4. messages.log
  5. Starting from the terminal did not provide any stderr output.
  6. Not seeing anything in crash or spin reports.

Edit: I know the messages.log file says I'm on x86_64, but I'm assuming that's because it is running through Rosetta. I am running on an M1 Mac.

I seem to have same problem, 12.3, M1 Pro, Gephi 0.9.6

I had the same problem, but I found @jumingKaigua 's comment is a work around.

When strat Gephi, I need to open another window above it. And the rainbow circle never come back. I'm running on M1Pro too.
#2546 (comment)

  1. Launch Gphi.
  2. Quickly launch "About this Mac" from Apple icon in the Mac menu bar.
  3. If the "About this Mac" window overlay the Gephi launch splash, Gephi will work.

OS: macOS 12.4
CPU: M1 Max
Gephi version: 0.9.5, 0.9.6

I encountered the rotating beachball crash problem this morning and found a fix / work-around.

I navigated to the user config files at /Users/username/Library/Application\ Support/gephi and I deleted them.

Gephi then launched fine.

(My config: Mac OSX, macOS Big Sur, intel CPU).
I had both 0.92 and 0.9 folders in there.

@mbastian - Mathieu, I think it must be something to do with these configs getting a bit messed up. Possibly the look-and-feel settings or something to do with handling of the separate little graph windows etc. It was hanging this morning before being able to render the small graph window that invites you to open a recent file etc etc. Obviously this will be hard to re-produce without knowing what's in a person's config files.

[For gephi 0.92 I had been using the "Metal" look-and-feel in order to get around the bug in 0.92 which would lead to hanging in certain circumstances with "OS-X" look-and-feel. When I first installed 0.96 it ran fine and invited me to bring in settings from 0.92 - I note that "Metal" no longer exists as a look-and-feel so am speculating as to whether that caused a problem.]

Once the beachball hang was created, both re-installing 0.96 or installing 0.93 didn't fix it. 0.92 re-installed and ran fine. As mentioned above, deleting user configs fixed the problem for an installed version of 0.96

Thanks @jeremyreffin that's helpful. It's an interesting hypothesis this could be caused by 0.9.2 configuration being imported. I'll see if I can reproduce that. In the meantime, if you still have these two user folders in your Bin I would love to have them for investigation!

0.9.zip
0.9.2.zip

Hi @mbastian - Sorry for the slow reply (annual holiday and email backlog indigestion). I attach those user folders in case they are useful! All best, Jeremy

I used @jeremyreffin's suggestion, but still have a hang on load and exit. The workaround mentioned by @sudame continues to work for me. Force quitting brings up a netbeans error reporting tool. Gephi 0.9.7 on Mac OS 12.5.1 + M1.

Hi I was wondering if there is an update on the problems with Macos Monterrey, or a consensus on how to solve them. In my case, the freezing happens when switching from overview to data lab. I tried deleting the user settings folder, but the problem persists. @mbastian I'm happy to send all necessary logs or make a video recording of the issue if it can be helpful. Thanks! (For info, this is my setup Mac M1 Max, 32GB RAM, Macos Monterrey 12.5.1.)

Hi @francescoragazzi no despite by efforts I've never being able to reproduce this issue locally. Root cause is unknown.

Given the issue being not systematic, it could be related to some threading issue. When the application is freezing, could someone run this command to obtain a dump of the application's thread:

jcmd PID Thread.print

The PID can be found in the Activity Monitor. Just search for Gephi and find the PID column. That's the number you put instead of PID in the command above. For instance,
Screenshot 2022-10-28 at 20 26 06

Attach the output here so I can investigate. Thanks!

@mbastian Sorry for the long delay, had a crazy week. Here is the file with the thread info. Very curious to see what you find!

Frozen GEPHI PID Thread.txt

Thanks @francescoragazzi the thread dump helped provide some leads on what might be happening. Still, not an issue I've been able to reproduce myself yet.

In order to confirm some hypothesis I would need some help if you don't mind (you, or anyone else on this thread).

Here is a patched version where I disabled some initialization code that might be causing the trouble.

Please let me know if that changes anything.

Hi @mbastian sorry again for the delayed response. I will try this asap and let you know what happens. Thanks!!

Hi @mbastian no luck I'm afraid. Here is the new dump. As soon as I opened a file it froze again. (Also, I promise to be more responsive from now on! :)
Full thread dump OpenJDK.txt

Thanks @francescoragazzi much appreciated. Let's try something else, what about this version: https://oss.sonatype.org/content/repositories/snapshots/org/gephi/gephi/0.9.8-SNAPSHOT/gephi-0.9.8-20221121.201741-14-macos-x64.dmg

This version has a patched version for JOGL, the OpenGL library we use. This patch is quite experimental and comes from the community, but seem to address some "hanging" issue on similar applications. I haven't investigated very deeply but it could be the same issue.

Hi @mbastian thanks for all your efforts! Still no luck I'm afraid :( Gephi still hanging. - dump attached.
2022-11-25 Thread Dump.txt

Thanks @francescoragazzi I continue my investigation. The attached dumps help as I can see whether it's the same issue everytime or some variation of it. Can you try this one? https://oss.sonatype.org/content/repositories/snapshots/org/gephi/gephi/0.9.8-SNAPSHOT/gephi-0.9.8-20221125.203902-16-macos-x64.dmg

Here the perspective control is disabled so Gephi will open blank. You'll need to go to the Window Menu and then Graph to open the graph window. I would like to know when things would freeze. Thanks!

Hi @mbastian - still hanging. 2022-11-25 Thread Dump v2.txt

@francescoragazzi At start or when you opened the graph window? Thx

Hi all, this back-n-forth is not doing much progress. As often, without the ability to reproduce a bug and inspect it's almost impossible to fix it. So let's try a different approach and try for me to understand on what exact environment this bug appears. Once I have that information, I will be able to make progress again (hopefully).

To all: Please please please, fill this questionnaire about this issue. Much appreciated!

@mbastian Makes sense! Thanks for all the work and for the exchange.

Hi, I am having the same issue - came out of nowhere and used to work fine before the weekend. Just filled the questionaire.

Hi, I am having the same issue - came out of nowhere and used to work fine before the weekend. Just filled the questionaire.

Interesting @kl-thamm. Just in case that might be interesting could you zip and send me the content of your /Users/username/Library/Application\ Support/gephi/0.9 folder? At mathieu.bastian [at] gephi.org. Thank you!

I just did. Thank you very much.

kunau commented

#2714: my ticket may be a duplication of this issue on an M1 Mac running Ventura 13.1.

Hi, I compiled the form some time ago and I'll also say that the behaviour is unpredictable.

Sometimes I can switch freely between the tabs, sometimes it crashes on a single tab switch just after launch, even on consecutive relaunches.

(which by the way is happening right now, I'm attaching some auto-generated crash reports over consecutive crashes)

If I can help in any way, I'm more than available.
Best
Carlo

gephi_dump_2.txt

gephi_dump.txt

gephi_dump_3.txt

Hi folks, I have some updates to report

  • I have been able to reproduce this issue locally and investigate further.
  • The root cause is internal to JOGL, the OpenGL rendering library we use. I can't directly fix this so I tried to work around it and remove the conditions in which the hang typically appear. I have made some changes that I think help. It fixed it on my computer but I doubt this would work universally.

Please try the following development versions and let me know whether this provides a fix for you:

More on the issue itself:

  • In JOGL, it's unclear exactly what is causing it but the interlocking between the Java AWT thread and the AppKit thread is notoriously fragile and dangerous. It's possible that at some point Apple introduces some changes in the OS that is now causing this issue. Or simply, more powerful machines with M1 processors are triggering a threading issue that was until then undiscovered.
  • For reference, the JOGL issue is always the AWT-EventQueue thread being blocked, waiting for the Mac OS AppKit thread, for instance:
"AWT-EventQueue-0" #23 prio=6 os_prio=31 cpu=37673.03ms elapsed=157.79s tid=0x00007f81dd05d800 nid=0x12603 in Object.wait()  [0x0000000307e06000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(java.base@11.0.16.1/Native Method)
	- waiting on <no object reference available>
	at java.lang.Object.wait(java.base@11.0.16.1/Object.java:328)
	at jogamp.nativewindow.macosx.OSXUtil.RunOnMainThread(OSXUtil.java:318)
	- waiting to re-lock in wait() <0x0000000615febfd8> (a java.lang.Object)
	at jogamp.nativewindow.macosx.OSXUtil.CreateNSWindow(OSXUtil.java:161)
	at jogamp.nativewindow.jawt.macosx.MacOSXJAWTWindow.lockSurfaceImpl(MacOSXJAWTWindow.java:319)
	at com.jogamp.nativewindow.awt.JAWTWindow.lockSurface(JAWTWindow.java:677)
	at com.jogamp.opengl.awt.GLCanvas.createJAWTDrawableAndContext(GLCanvas.java:718)
	at com.jogamp.opengl.awt.GLCanvas.addNotify(GLCanvas.java:621)
	at java.awt.Container.addNotify(java.desktop@11.0.16.1/Container.java:2800)
  • The component persistence files used by Netbeans Platform and stored in the user folder are somehow related to this issue but I haven't found a direct cause. Cleaning-up the user folder might fix it temporarily as the initialisation runtime code differs but at the end it doesn't prevent the issue to happen again.
  • One weird condition that I discovered is that it seems to trigger the hang more often when the WindowManager.wswmgr file has some conditions. That files is part of the NB Platform window persistence folder in the user folder. When the main window's width (in joined-properties) is larger than the screen's width it can trigger the issue. No idea why this might be the case but it could explain that somehow the hang seems to appear suddenly for users without prior issues. I certainly observed different behaviours with and without that width being equal or 1 pixel above the screen width.
  • JOGL itselfs runs a lot of init code when Java calls the addNotify, especially on the first time. The hang typically happens there. There are a lot of situations when this is called in Gephi, such as at startup or when changing perspective. Therefore, it explains why certain users hang at startup, others when changing perspective etc. As it's a threading issue it doesn't always happen and not similarly between users that have different hardware, background tasks etc.

And the fix:

  • I cleaned up the NB Platform modes.
  • When the GraphTopComponent is closed I'm now releasing all the JOGL resources. This should help when switching perspectives so that JOGL is executing a slightly different path when initialised again.
kunau commented

gephi-0.10.0-SNAPSHOT-macos-aarch64.dmg, produced the same beachball-of-death event.

image

on this

image
on 13.1

thanks @mbastian for your work.

I can confirm that the issue persists using gephi-0.10.0-SNAPSHOT-macos-aarch64.dmg on M1 Max.
Happens at random when switching panes after loading a graph file.

I removed the old application before installing the new version, and did not import previous settings.

Attaching the dump generated when force quitting, if of any interest.
gephi.dump.log

Of course I'm more than available for anything that could help.
Thank you again
Carlo

EDIT: with this version it also manages to insistently beachball-hang right after the splash screen, a behaviour that I never experienced before. Before, I had some hundreds of hang events, but exclusively when switching panes and randomly.
But in this case I am able to reproduce the startup beachball-hang event: it becomes permanent if I maximize the Gephi window size (could this be related to the width issue?). Maximizing + switching pane causes hang, and then permanent hang on program load.
Deleting "~/Library/Application\ Support/gephi" ostensibly "fixed" it - of course I'm not sure, but it restores the "unmaximized" windows size and Gephi loads then. I guess it is related to the persistence behaviour highlighted in the latest update.

jcmd output attached for the startup hang
jcmd.startup.log

On one occasion I also got this message in the shell:
/Applications/Gephi.app/Contents/MacOS/gephi WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.gephi.desktop.preview.PreviewTopComponent (jar:file:/Applications/Gephi.app/Contents/Resources/gephi/gephi/modules/org-gephi-desktop-preview.jar!/) to field sun.awt.CGraphicsDevice.scale

Hi again folks and thanks for your continued patience! I've been continuing my investigations. This time, I'm setting up our JOGL initialisation code in a separate thread and with a delay of 1s. I also make sure that during perspective switch the new window is fully initialised before we add the GL canvas. Based on my research and local tests, this may solve the issue.

Please try the following development versions and let me know whether this provides a fix for you:

I would recommend to clean-up your userfolder ahead of trying each new development version. You can do so by deleting the /Users/username/Library/Application\ Support/gephi/0.10-SNAPSHOT folder.

kunau commented

This appears to work as expected.
image

hi @mbastian, I guess it's many people thanking you for your continued patience...

Did clean install and noticed that:

  1. the program loading does not fail anymore when Gephi windows is fullscreen (which in my case was a regression introduced by the previous development version)

  2. switching between data view and graph view looks way more stable with the delay - i.e. it does not crash often - yet I experienced the beachball three times: once when just switching tabs, once when maximizing gephi (double click on top bar), once when minimizing gephi (again double click on top bar) while the graph tab was loading
    attaching jcmp output for the second case (maximization):
    gephi.dump.txt

(3. don't know if it's worth mentioning, but in this last version the workspaces look off: the *.gephi files are loaded outside any workspace, and are visible only when closing the workspace that was opened when loading the file...)

I remain available!
Thank you again and all the best
Carlo

Thanks @carloalbertobono! Looks like it's going in the right direction but still experiencing the same issue. It's what I expected actually :)

(3. don't know if it's worth mentioning, but in this last version the workspaces look off: the *.gephi files are loaded outside any workspace, and are visible only when closing the workspace that was opened when loading the file...)

That is new to me and sounds quite strange. Would you mind creating a separate issue with instructions to reproduce? In case of any regressions it would be great to catch them ahead of the 0.10.0 release and now is the time!

Hi @mbastian , great to hear that!

I've reported the issue in #2717
Also uploaded the *.gephi file itself, since it occurred to me that something could have gotten wrong in the file itself, among the many crashes.

Hope this helps.

Of course more than available for any testing on the originating issue.
I'd send you the machine itself, but I'm currently using it...

Best
Carlo

Not sure if it has any additional value, I'm attaching the thread dump for beachball in both 0.10.0 (maven built) and the most recent snapshot gephi-0.10.0-SNAPSHOT-macos-aarch64.dmg

Both hangs happened while furiously switching between graph and data tabs.

gephi_built.dump.txt
gephi_snapshot.dump.txt

Hi again folks and thanks for your continued patience! I've been continuing my investigations. This time, I'm setting up our JOGL initialisation code in a separate thread and with a delay of 1s. I also make sure that during perspective switch the new window is fully initialised before we add the GL canvas. Based on my research and local tests, this may solve the issue.

Please try the following development versions and let me know whether this provides a fix for you:

I would recommend to clean-up your userfolder ahead of trying each new development version. You can do so by deleting the /Users/username/Library/Application\ Support/gephi/0.10-SNAPSHOT folder.

It worked for me

I have this exact problem in my iMac (24-inch, M1, 2021). I tried with different versions: 0.9.7 for x64, 0.1.0 and 0.1.0 snapshot (the last in this thread) for M1, and all freeze with the rainbow circle after the splash screen. I fill the questionnaire and attached the messages.log. Thanks.
messages.log

Hi again folks and thanks for your continued patience! I've been continuing my investigations. This time, I'm setting up our JOGL initialisation code in a separate thread and with a delay of 1s. I also make sure that during perspective switch the new window is fully initialised before we add the GL canvas. Based on my research and local tests, this may solve the issue.
Please try the following development versions and let me know whether this provides a fix for you:

I would recommend to clean-up your userfolder ahead of trying each new development version. You can do so by deleting the /Users/username/Library/Application\ Support/gephi/0.10-SNAPSHOT folder.

It worked for me

Worked for me as well. More or less. I deleted also the 0.10 folder.
Performance on M1 is incredible.

Hi,

Thanks for all the work done on this issue. I've tried 0.10.0-Spanshot and it didn't solved the problem for me so I switched back to the normal 0.10.0. However, I might have found a workaround which so far worked for me (MacBook Pro 15" - 2018):

  1. Open Gephi
  2. Don’t interact with Gephi until the “Initialising..” message from the top left corner of the Graph window disappears (this takes a few seconds)
  3. Close the welcome dialog once the init message disappears (the Graph window is white - which probably is the background colour)
  4. Switch to the Data Laboratory tab
  5. Open your project and wait until the data appears in the table
  6. Switch to the Overview tab and it should work.

This works for me with Gephi 0.10 and tried it several times.

Maybe a potential quick fix will be to always show first the Data Laboratory tab regardless of the user's previous state?

Similar hanging problem here (v0.10.1, Mac M1).

I've found that I can consistently trigger a hang by interacting with Gephi on boot (e.g. attempting to open a recent project) while the "Initialising..." message shows on the Graph window.

Yeah I'm on a Mac M1 and I tried your snapshots and the latest on the site, and I tried them on my older intel silicon mac as well, but nothing worked, still froze on startup.

Hi folks, I've got an update to share

JOGL, the OpenGL library we use got updated to the 2.4.0 version. This might be a game changer with regard to this issue as I was able to switch to NEWT on Mac OS as well (this is the default on Windows and Linux). NEWT has a different (and better) threading model than the default GLCanvas we were using previosuly. The 2.4.0 release fixed a number of issues that preventing us to use NEWT in the past.

My hope is that using NEWT completely eliminates this issue. And doesn't create new ones of course. I would love to hear from you on whether you still experience this issue and/or other crashes.

Please download/install the snapshot versions for testing:

@mbastian I'm trying your snapshot now and as soon as I open Gephi I get the rainbow beachball, still. On a Mac Intel with Ventura.

@mbastian I'm trying your snapshot now and as soon as I open Gephi I get the rainbow beachball, still. On a Mac Intel with Ventura.

Same here, with an iMac M1, Monterey.

@mbastian It kinda works for me. I opened an older project, and close&open Gephi x3 with the Overview as the last tab used and Gephi didn't freeze. However, if I interact with Gephi while the Overview tab still says "Initialising..." the application freezes.

As I stated in the comment above I experienced less problems if I switch to a different mode from "Overview" to "Data Laboratory" when closing Gephi. Somehow, this helps the initialisation of the "Overview"

It also feels faster. Thank you for the hard work!

My config: MacBook Pro Intel (2018), Ventura 13.12.1.

Hi,

Thanks for all the work done on this issue. I've tried 0.10.0-Spanshot and it didn't solved the problem for me so I switched back to the normal 0.10.0. However, I might have found a workaround which so far worked for me (MacBook Pro 15" - 2018):

  1. Open Gephi
  2. Don’t interact with Gephi until the “Initialising..” message from the top left corner of the Graph window disappears (this takes a few seconds)
  3. Close the welcome dialog once the init message disappears (the Graph window is white - which probably is the background colour)
  4. Switch to the Data Laboratory tab
  5. Open your project and wait until the data appears in the table
  6. Switch to the Overview tab and it should work.

This works for me with Gephi 0.10 and tried it several times.

Maybe a potential quick fix will be to always show first the Data Laboratory tab regardless of the user's previous state?

hi @mbastian and thank you

I can confirm a beachball on opening Gephi (M1 Max, Ventura) when trying to interact with the splash screen (eg. load file) while the pane in the background shows "Initializing..."

Not getting the beachball while switching panes (overview / data) for now!
Now it looks like it's briefly "redrawing" the whole application window when switching.

But I did get an unseen behaviour in which the application: it basically gets stuck redrawing again and again the graph in overview. It seems to me that it occurs when closing a tab (eg. a GEXF file) when multiple tabs are opened.

Hi @mbastian and thanks for all of your hard work on this. I'm having the same problem as everyone else: spinning beachball of death on launch in 0.10.1 on a MacBook Pro M1Pro running Monterey 12.6.3 (filled out the questionnaire). I tried deleting ~/Application Support/gephi/0.10 but no joy. And then I tried something else: I disconnected my external monitor and ran from the built-in screen. Eureka! Gephi launches just fine. I can even plug the external monitor back in once Gephi is launched and it continues to work. But I'm still having frequent hangs while working in the program (e.g., clicking the Preview tab), so this is by no means a full workaround — but it's another piece of the puzzle I though I should share.

Hi folks,

I've discovered that the hang might be mitigated by calling revalidate() right after we add the graph canvas to the panel. It would be great if I could get feedback based on the development version. Has anything changed compared to previous versions?

Please download/install the snapshot versions for testing:

gephi-0.10.2-SNAPSHOT-macos-x64.dmg (Mac OS X)

gephi-0.10.2-SNAPSHOT-macos-aarch64.dmg (Mac OS X Silicon)

hi @mbastian,

kudos as always.

previous version and also this one look stable, about the issue of beachball while switching panes.
just did quick tests on this one but still looks good (M1 Max, Ventura)

in my case they still both suffer from the "beachball hang if opening a file on program load, when the 'Initializing' message is still on screen"

but apart from this, it is working fine also with "big" graphs.

Hi @mbastian, about the same result here: cleared out the Application Support files and the snapshot version launched just fine, no hang; open a project, fiddled a bit, quit Gephi; on relaunch, spinning beachball of death with "Initializing," as before.

@mbastian I'm trying your snapshot now and as soon as I open Gephi I get the rainbow beachball, still. On a Mac Intel with Ventura.

I just tried Gephi again, I'm on 0.10.2 snapshot and now it works normally without any issue. I haven't done anything special except keep my OS up to date.

M1 Max Pro here. I am not able to go past the welcome screen even after deleted Application support files and using the 0.10.2 version.

@mbastian I'm trying your snapshot now and as soon as I open Gephi I get the rainbow beachball, still. On a Mac Intel with Ventura.

I just tried Gephi again, I'm on 0.10.2 snapshot and now it works normally without any issue. I haven't done anything special except keep my OS up to date.

And now again I haven't updated, still using the snapshot, and i get initializing forever... :( I did install some plugins and they worked but the next time opening Gephi and all subsequent times I get stuck on initializing.