unibas-gravis / basel-face-pipeline

Apache License 2.0
229 stars 34 forks source link

crash (line ending issue and crash) #8

Closed dongwonoh closed 3 years ago

dongwonoh commented 4 years ago

OS: macOS 10.14.6 (Mojave)

java version "12.0.2" 2019-07-16 Java(TM) SE Runtime Environment (build 12.0.2+10) Java HotSpot(TM) 64-Bit Server VM (build 12.0.2+10, mixed mode, sharing)

sbt version in this project: 1.3.12 sbt script version: 1.3.12

  1. When I run an individual pipeline scala script, (e.g., sbt -mem 5000 "fitting.experiments.QualitativeLFW" or sbt "run-main preprocessing.ConvertBu3DRawData" I get [error] Expected ';' aka it expects a selmicolon at the end of the command, e.g.,:

$ sbt -mem 5000 "fitting.experiments.QualitativeLFW" [info] Loading settings for project basel-face-pipeline from build.sbt ... [info] Set current project to basel-face-pipeline (in build file:/.../basel-face-pipeline/) [error] Expected ';' [error] fitting.experiments.QualitativeLFW [error] ^

Or,

$ sbt "run-main preprocessing.ConvertBu3DRawData" [info] Loading project definition from /.../project [info] Loading settings for project basel-face-pipeline from build.sbt ... [info] Set current project to basel-face-pipeline (in build file:/.../basel-face-pipeline/) [error] Expected ';' [error] run-main preprocessing.ConvertBu3DRawData [error] ^

I learned that this is a known scala issue (I'm new to scala) where scala needs a semicolon at the end of every line if line endings in the file are \r (like in an old Mac) (as opposed to\n or \r\n). REFs: https://stackoverflow.com/questions/5748451/why-do-i-need-semicolons-after-these-imports; https://stackoverflow.com/questions/21355908/scala-semicolon-inconsistency

I changed all line ending to \n in all scala files in Basel Face Pipeline's subdirectories. The same error persists. Any clue/suggestions?

I also tried sbt -mem 5000 "fitting.experiments.QualitativeLFW;"Same error.

  1. Alternatively when I run the pipeline via sbt run, I get the following error:

WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.jogamp.common.os.NativeLibrary$3 (file:/var/folders/31/n5c0nh4j3v39m_f2rst6jxj00000gn/T/sbt_7621b066/target/3604376f/513389d3/scalismo-native-stub-4.0.0.jar) to method java.lang.ClassLoader.findLibrary(java.lang.String) WARNING: Please consider reporting this to the maintainers of com.jogamp.common.os.NativeLibrary$3 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release 2020-06-08 03:21:29.386 java[55582:12237943] Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow drag regions should only be invalidated on the Main Thread!' First throw call stack: ( 0 CoreFoundation 0x00007fff5162e9a9 __exceptionPreprocess + 256 1 libobjc.A.dylib 0x00007fff7bd36a17 objc_exception_throw + 48 2 CoreFoundation 0x00007fff51648509 -[NSException raise] + 9 3 AppKit 0x00007fff4ebed5ca -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 317 4 AppKit 0x00007fff4ebea9f7 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1479 5 AppKit 0x00007fff4ebea42a -[NSWindow initWithContentRect:styleMask:backing:defer:] + 45 6 libnativewindow_macosx.dylib 0x0000000109a0ef9e Java_jogamp_nativewindow_macosx_OSXUtil_CreateNSWindow0 + 398 7 ??? 0x0000000112363b70 0x0 + 4600511344 ) libc++abi.dylib: terminating with uncaught exception of type NSException Abort trap: 6

I know this is not specifically related to the pipeline but I'm new to scala and would appreciate any input. Thanks a lot for your time

wenx-guo commented 4 years ago

Hey, I am also new to scala and desperately need help. I have the same errors. Were you able to find out how to resolve it? Thanks!

xiaozhi-alan-zhu commented 4 years ago

Hi, I am also new to scala and was trying to use scalismo package. I have the same errors. Do you have the solution to this now? Thanks a lot!

wenx-guo commented 4 years ago

Hey so I contacted the scalismo team. Here's their response:

Unfortunately, there are issues with the combination MacOS, OpenGL and Java, as the latter two are poorly supported on MacOS. We managed to run it on Catalina (and also previous versions) with openjdk 11.

As OpenGL is officially deprecated on MacOS, we currently take no action and wait how other libraries such as vtk (on which we depend for visualization) will address that issue.

marcelluethi commented 3 years ago

A late addition to this issue:

I finally got my hands on a Mac and played with Scalismo on MacOS. It seems what is causing the crash is an issue in many versions of openjdk (see this issue. It turns out that the zulu builds of openjdk are not affected by this issue. Hence the solution is to use a zulu build of openJDK.

I updated the documentation on the scalismo website to include details on how to set this up properly.