ikvmnet / ikvm

A Java Virtual Machine and Bytecode-to-IL Converter for .NET
Other
1.28k stars 121 forks source link

Segmentation fault ImageJ on Mac x64, IKVM 8.9.1. #570

Open BiologyTools opened 3 months ago

BiologyTools commented 3 months ago

I can't seem to get ImageJ to fully work on MacOS. On windows and Linux the following works but on MacOS it crashes on IJ.runMacro giving an error: "zsh: segmentation fault ./BioGTKApp"

ImagePlus ip = ImageJ.GetImagePlus(ImageView.SelectedImage);
WindowManager.setTempCurrentImage(ip);
IJ.runMacro(con);
BiologyTools commented 3 months ago

Here is a repro project: ImageJMac.zip

wasabii commented 3 months ago

Seems to fail for other reasons for me. Missing text files in my home directory.

Also, is there a converted IKVM DLL uploaded to NuGet.org? Bad mojo.

BiologyTools commented 3 months ago

Yea I did add it to NuGet makes it a tad easier to get started I think especially for beginners. I guess for Mac I'll just use ImageJ without IKVM like I used to do.

wasabii commented 3 months ago

Well, our guidance is definately to not do so. You will conflict with other usages of IKVM, and the produced DLL that you are distributing is not guarenteed to work with any version other than the one it was built with (and pretty much every minor IKVM version in fact changes something in the assemblies). Which means package conflicts that unify up will cause your assembly to fail.

https://github.com/ikvmnet/ikvm?tab=readme-ov-file#notice-to-project-owners

BiologyTools commented 2 weeks ago

Seems to fail for other reasons for me. Missing text files in my home directory.

Also, is there a converted IKVM DLL uploaded to NuGet.org? Bad mojo.

I'm still trying to get this to work. How did you manage to debug it to know that the issue is "missing files in your home directory"? I've tried debugging it on MacOS but all I can get on the command line is "zsh: segmentation fault ./BioGTKApp" even though I have try & catch blocks for catching the error & printing the stack trace.