Re: [basex-talk] Crash when starting basexgui

2023-11-20 Thread Joe Wicentowski
Thanks, Michael, Christian, and Johan, for your help and ideas!

I finally had the chance to dive in. I couldn't just install temurin (Java
21), since I already had used Homebrew to install temurin@8 (which I need
for eXist). Whenever I've previously needed to switch between two versions
of Java I would use homebrew to uninstall one and install the other. This
takes time, so it wasn't ideal. I would like to run eXist and BaseX
whenever I need them, without this hassle. So this gave me a chance to try
out jenv. I followed a few tutorials. The best one I found was
https://www.baeldung.com/jenv-multiple-jdk.

Hopefully the underlying bug causing the weird error on macOS will be
solved, but in the meantime, this will do the trick.

Below are some of the commands I used, in the hope that this might help
others who need to run multiple versions of Java.

Thanks again!
Joe


# install jenv - and follow the installer's hints to add lines to your
.zshrc or .profile
brew install jenv

# install the versions of java you need
brew install temurin temurin@8

# register these versions
jenv add /Library/Java/JavaVirtualMachines/temurin-8.jdk/Contents/Home
jenv add /Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home

# set the global java to 8 - a good default for me
jenv global 1.8

# set the current shell to 21 - so I can start basexgui in this terminal
without affecting other places
jenv shell 21.0

# check current shell version
jenv versions
  system
  1.8
  1.8.0.392
* 21.0 (set by JENV_VERSION environment variable)
  21.0.1
  temurin64-1.8.0.392
  temurin64-21.0.1

On Wed, Oct 25, 2023 at 9:19 AM Johan Mörén  wrote:
>
> Thanks for the workaround Michael!
>
> It worked for me as well but I installed temurin via homebrew.
> brew install temurin
>
> Regards,
> Johan
>
> On Wed, Oct 25, 2023 at 3:03 PM Johan Mörén  wrote:
>>
>> Hi Michael, my setting for "Allow Applications Downloaded from…" is “App
Store and identified developers”.
>>
>> It's controlled by a central company profile so I can't change it.
>>
>> Thanks for pointing out that the warning is not the cause. I managed to
see the same error report as you posted when i choose "report to apple"
>>
>> Regards,
>> Johan
>>
>> On Wed, Oct 25, 2023 at 2:21 PM Michael Seiferle  wrote:
>>>
>>> Hi Johan,
>>>
>>>
>>>
>>> it works (well worked… see below) on my machine with the very same
setup (basex@10.7 & openjdk@21 via brew, see my previous email), so I am
sure it is an issue for certain setups.
>>>
>>>
>>>
>>> what’s your security settings? Apple Menu -> Privacy & Security ->
Allow Applications Downloaded from… mine is set to “App Store and
identified developers”.
>>> Now if I set it to “App Store” BaseX will not start with the following
error:
>>>
>>>
>>>
>>> BUT: now it won’t start again even if I set it back :-{
>>>
>>> So my motivation to find a fix or workaround is considerably higher now
I will report once I found something.
>>>
>>>
>>>
>>> The warning that is dumped to your console — something something
NSApplicationDelegate.applicationSupportsSecureRestorableState — doesn’t
cause BaseX to crash, as I could see this warning as well.
>>>
>>> Background:
>>>
>>>
https://stackoverflow.com/questions/77283578/sonoma-and-nsapplicationdelegate-applicationsupportssecurerestorablestate
>>>
>>>
>>>
>>> Best
>>>
>>> Michael
>>>
>>>
>>>
>>>
>>>
>>> Von: Christian Grün 
>>> Datum: Mittwoch, 25. Oktober 2023 um 13:09
>>> An: Johan Mörén 
>>> Cc: Michael Seiferle , BaseX <
basex-talk@mailman.uni-konstanz.de>
>>> Betreff: Re: [basex-talk] Crash when starting basexgui
>>>
>>> Thanks. It seems we have to wait for Apple to fix this. Unfortunately,
their bug tracker doesn’t seem to be public [2].
>>>
>>>
>>>
>>> [1]
https://github.com/Homebrew/homebrew-core/issues/150824#issuecomment-1776139189
>>>
>>>
>>>
>>>
>>>
>>> On Wed, Oct 25, 2023 at 1:01 PM Johan Mörén 
wrote:
>>>
>>> Running MacOS Sonoma Apple Silicon M2 processor and ran into the same
problem when homebrew updated my JDK to 21.0.1 today.
>>>
>>>
>>>
>>> According to this article it seems like applications like jmeter and
IntelliJ needs to fix this by implementing a specific interface. I guess
this applies to Basexgui as well?
>>>
>>>
>>>
>>>
https://stackoverflow.com/questions/77283578/sonoma-and-nsapplicationdelegate-applicationsupportssecurerestorablestate
>>>
>>>
>>>
>>> Regards,
>>>
>>> Johan
>>>
>>>

>


Re: [basex-talk] Crash when starting basexgui

2023-10-25 Thread Michael Seiferle
Hi Johan,
Hi Joe,

ok so I made it work again:
I uninstalled the homebrew openjdk:
brew uninstal openjdk --ignore-dependencies
I manually installed: https://adoptium.net
Eclipse Temurin™  Open JDK Version 21.0.1, and it is working again.

Maybe this works for you as well, seems like a pretty annoying issue to say the 
least.



All the best :-)
Michael


Am 25.10.2023 um 14:21 schrieb Michael Seiferle :

Hi Johan,

it works (well worked… see below) on my machine with the very same setup 
(basex@10.7 & openjdk@21 via brew, see my previous email), so I am sure it is 
an issue for certain setups.


  1.  what’s your security settings? Apple Menu -> Privacy & Security -> Allow 
Applications Downloaded from… mine is set to “App Store and identified 
developers”.
  2.  Now if I set it to “App Store” BaseX will not start with the following 
error:



BUT: now it won’t start again even if I set it back :-{
So my motivation to find a fix or workaround is considerably higher now  I 
will report once I found something.

The warning that is dumped to your console — something something 
NSApplicationDelegate.applicationSupportsSecureRestorableState — doesn’t cause 
BaseX to crash, as I could see this warning as well.
Background:
https://stackoverflow.com/questions/77283578/sonoma-and-nsapplicationdelegate-applicationsupportssecurerestorablestate

Best
Michael


Von: Christian Grün 
Datum: Mittwoch, 25. Oktober 2023 um 13:09
An: Johan Mörén 
Cc: Michael Seiferle , BaseX 

Betreff: Re: [basex-talk] Crash when starting basexgui
Thanks. It seems we have to wait for Apple to fix this. Unfortunately, their 
bug tracker doesn’t seem to be public [2].

[1] 
https://github.com/Homebrew/homebrew-core/issues/150824#issuecomment-1776139189


On Wed, Oct 25, 2023 at 1:01 PM Johan Mörén 
mailto:johan.mo...@gmail.com>> wrote:
Running MacOS Sonoma Apple Silicon M2 processor and ran into the same problem 
when homebrew updated my JDK to 21.0.1 today.

According to this article it seems like applications like jmeter and IntelliJ 
needs to fix this by implementing a specific interface. I guess this applies to 
Basexgui as well?

https://stackoverflow.com/questions/77283578/sonoma-and-nsapplicationdelegate-applicationsupportssecurerestorablestate

Regards,
Johan



Re: [basex-talk] Crash when starting basexgui

2023-10-25 Thread Christian Grün
Thanks. It seems we have to wait for Apple to fix this. Unfortunately,
their bug tracker doesn’t seem to be public [2].

[1]
https://github.com/Homebrew/homebrew-core/issues/150824#issuecomment-1776139189


On Wed, Oct 25, 2023 at 1:01 PM Johan Mörén  wrote:

> Running MacOS Sonoma Apple Silicon M2 processor and ran into the same
> problem when homebrew updated my JDK to 21.0.1 today.
>
> According to this article it seems like applications like jmeter and
> IntelliJ needs to fix this by implementing a specific interface. I guess
> this applies to Basexgui as well?
>
>
> https://stackoverflow.com/questions/77283578/sonoma-and-nsapplicationdelegate-applicationsupportssecurerestorablestate
>
> Regards,
> Johan
>
>


Re: [basex-talk] Crash when starting basexgui

2023-10-25 Thread Johan Mörén
Running MacOS Sonoma Apple Silicon M2 processor and ran into the same
problem when homebrew updated my JDK to 21.0.1 today.

According to this article it seems like applications like jmeter and
IntelliJ needs to fix this by implementing a specific interface. I guess
this applies to Basexgui as well?

https://stackoverflow.com/questions/77283578/sonoma-and-nsapplicationdelegate-applicationsupportssecurerestorablestate

Regards,
Johan


Re: [basex-talk] Crash when starting basexgui

2023-10-24 Thread Michael Seiferle
…as  others seem to experience this as well with i.e. jemeter, regardless of 
intel/arm — maybe this workaround can be of help?

https://github.com/apache/jmeter/issues/6083#issuecomment-1765484046


Best
Michael

Von: BaseX-Talk  im Auftrag von 
Michael Seiferle 
Datum: Dienstag, 24. Oktober 2023 um 16:13
An: Joe Wicentowski 
Cc: BaseX 
Betreff: Re: [basex-talk] Crash when starting basexgui
Hi Joe,

Unfortunately, I am unable to reproduce this behavior — I am running the 
following:

❯  brew install basex openjdk
Warning: basex 10.7 is already installed and up-to-date.
To reinstall 10.7, run:
  brew reinstall basex
Warning: openjdk 21 is already installed and up-to-date.
To reinstall 21, run:
  brew reinstall openjdk

❯ java -version
openjdk version "21" 2023-09-19
OpenJDK Runtime Environment Homebrew (build 21)
OpenJDK 64-Bit Server VM Homebrew (build 21, mixed mode, sharing)

Which seems to be identical to your version, the only detail different, seems 
to be that you are on x86_64 while I am running arm.

I also tried to install openjdk 17 — this seemed to work as well, maybe you 
could see if the behavior is any different with 17:

bash-3.2$ brew install openjdk@17
bash-3.2$ export JAVA_HOME=`/usr/libexec/java_home -v 17`
bash-3.2$ java -version
openjdk version "17.0.7" 2023-04-18 LTS
bash-3.2$ basexgui

Maybe someone else running Sonoma on Intel might be able to share their 
experiences; my remaining Intel Mac will not run Sonoma.


Best
Michael


Am 24.10.2023 um 14:28 schrieb Michael Seiferle :

Dear Joe,

Thanks for the report,I haven’t upgraded to Sonoma yet, but will this afternoon 
:)

I will try to reproduce the error and come back to the list. :-)


Best
Michael

Am 24.10.2023 um 13:40 schrieb Joe Wicentowski :

Hi all,

I am experiencing a crash when starting basexgui. The splash screen appears 
briefly, and then the message pasted in below appears, and I've also attached 
the referenced error report file and the crash report that appears in the Mac 
crash dialog. I'm using BaseX 10.7, installed via Homebrew (which installed 
BaseX's openjdk dependency and thus is using openjdk 21), on macOS Sonoma 
(14.0).

I'd be happy to provide any other info that would help in identifying the cause 
of the crash.

Joe


% basexgui
2023-10-24 07:34:22.308 java[69449:3862142] WARNING: Secure coding is 
automatically enabled for restorable state! However, not on all supported macOS 
versions of this application. Opt-in to secure coding explicitly by 
implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:.
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGILL (0x4) at pc=0x7ff80d2b1b73, pid=69449, tid=259
#
# JRE version: OpenJDK Runtime Environment Homebrew (21.0) (build 21)
# Java VM: OpenJDK 64-Bit Server VM Homebrew (21, mixed mode, sharing, tiered, 
compressed oops, compressed class ptrs, g1 gc, bsd-amd64)
# Problematic frame:
# C  [AppKit+0xc8fb73]  _NSCarbonMenuCrashIfNeeded+0x258
#
# No core dump will be written. Core dumps have been disabled. To enable core 
dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/joe/workspace/hsg-project/repos/hsg-shell/hs_err_pid69449.log
#
# If you would like to submit a bug report, please visit:
#   https://github.com/Homebrew/homebrew-core/issues
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
zsh: abort  basexgui







Re: [basex-talk] Crash when starting basexgui

2023-10-24 Thread Michael Seiferle
Hi Joe,

Unfortunately, I am unable to reproduce this behavior — I am running the 
following:

❯  brew install basex openjdk
Warning: basex 10.7 is already installed and up-to-date.
To reinstall 10.7, run:
  brew reinstall basex
Warning: openjdk 21 is already installed and up-to-date.
To reinstall 21, run:
  brew reinstall openjdk

❯ java -version
openjdk version "21" 2023-09-19
OpenJDK Runtime Environment Homebrew (build 21)
OpenJDK 64-Bit Server VM Homebrew (build 21, mixed mode, sharing)

Which seems to be identical to your version, the only detail different, seems 
to be that you are on x86_64 while I am running arm.

I also tried to install openjdk 17 — this seemed to work as well, maybe you 
could see if the behavior is any different with 17:

bash-3.2$ brew install openjdk@17
bash-3.2$ export JAVA_HOME=`/usr/libexec/java_home -v 17`
bash-3.2$ java -version
openjdk version "17.0.7" 2023-04-18 LTS
bash-3.2$ basexgui

Maybe someone else running Sonoma on Intel might be able to share their 
experiences; my remaining Intel Mac will not run Sonoma.


Best
Michael

Am 24.10.2023 um 14:28 schrieb Michael Seiferle :

Dear Joe,

Thanks for the report,I haven’t upgraded to Sonoma yet, but will this afternoon 
:)

I will try to reproduce the error and come back to the list. :-)


Best
Michael

Am 24.10.2023 um 13:40 schrieb Joe Wicentowski :


Hi all,

I am experiencing a crash when starting basexgui. The splash screen appears 
briefly, and then the message pasted in below appears, and I've also attached 
the referenced error report file and the crash report that appears in the Mac 
crash dialog. I'm using BaseX 10.7, installed via Homebrew (which installed 
BaseX's openjdk dependency and thus is using openjdk 21), on macOS Sonoma 
(14.0).

I'd be happy to provide any other info that would help in identifying the cause 
of the crash.

Joe


% basexgui
2023-10-24 07:34:22.308 java[69449:3862142] WARNING: Secure coding is 
automatically enabled for restorable state! However, not on all supported macOS 
versions of this application. Opt-in to secure coding explicitly by 
implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:.
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGILL (0x4) at pc=0x7ff80d2b1b73, pid=69449, tid=259
#
# JRE version: OpenJDK Runtime Environment Homebrew (21.0) (build 21)
# Java VM: OpenJDK 64-Bit Server VM Homebrew (21, mixed mode, sharing, tiered, 
compressed oops, compressed class ptrs, g1 gc, bsd-amd64)
# Problematic frame:
# C  [AppKit+0xc8fb73]  _NSCarbonMenuCrashIfNeeded+0x258
#
# No core dump will be written. Core dumps have been disabled. To enable core 
dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/joe/workspace/hsg-project/repos/hsg-shell/hs_err_pid69449.log
#
# If you would like to submit a bug report, please visit:
#   https://github.com/Homebrew/homebrew-core/issues
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
zsh: abort  basexgui







Re: [basex-talk] Crash when starting basexgui

2023-10-24 Thread Christian Grün
Hi Joe, thanks Michael,

I’m pretty sure this is something that needs to be fixed by Apple or the
OpenJDK guys. A Homebrew issue seems to point to a similar failure [1].

Maybe BaseX can be run with an older version of the JRE?

Best,
Christian

[1] https://github.com/Homebrew/homebrew-core/issues/150965



On Tue, Oct 24, 2023 at 2:28 PM Michael Seiferle  wrote:

> Dear Joe,
>
> Thanks for the report,I haven’t upgraded to Sonoma yet, but will this
> afternoon :)
>
> I will try to reproduce the error and come back to the list. :-)
>
>
> Best
> Michael
>
> Am 24.10.2023 um 13:40 schrieb Joe Wicentowski :
>
> 
> Hi all,
>
> I am experiencing a crash when starting basexgui. The splash screen
> appears briefly, and then the message pasted in below appears, and I've
> also attached the referenced error report file and the crash report that
> appears in the Mac crash dialog. I'm using BaseX 10.7, installed via
> Homebrew (which installed BaseX's openjdk dependency and thus is using
> openjdk 21), on macOS Sonoma (14.0).
>
> I'd be happy to provide any other info that would help in identifying the
> cause of the crash.
>
> Joe
>
>
> % basexgui
> 2023-10-24 07:34:22.308 java[69449:3862142] WARNING: Secure coding is
> automatically enabled for restorable state! However, not on all supported
> macOS versions of this application. Opt-in to secure coding explicitly by
> implementing
> NSApplicationDelegate.applicationSupportsSecureRestorableState:.
> #
> # A fatal error has been detected by the Java Runtime Environment:
> #
> #  SIGILL (0x4) at pc=0x7ff80d2b1b73, pid=69449, tid=259
> #
> # JRE version: OpenJDK Runtime Environment Homebrew (21.0) (build 21)
> # Java VM: OpenJDK 64-Bit Server VM Homebrew (21, mixed mode, sharing,
> tiered, compressed oops, compressed class ptrs, g1 gc, bsd-amd64)
> # Problematic frame:
> # C  [AppKit+0xc8fb73]  _NSCarbonMenuCrashIfNeeded+0x258
> #
> # No core dump will be written. Core dumps have been disabled. To enable
> core dumping, try "ulimit -c unlimited" before starting Java again
> #
> # An error report file with more information is saved as:
> # /Users/joe/workspace/hsg-project/repos/hsg-shell/hs_err_pid69449.log
> #
> # If you would like to submit a bug report, please visit:
> #   https://github.com/Homebrew/homebrew-core/issues
> # The crash happened outside the Java Virtual Machine in native code.
> # See problematic frame for where to report the bug.
> #
> zsh: abort  basexgui
>
>
> 
> 
>
>


Re: [basex-talk] Crash when starting basexgui

2023-10-24 Thread Michael Seiferle
Dear Joe,

Thanks for the report,I haven’t upgraded to Sonoma yet, but will this afternoon 
:)

I will try to reproduce the error and come back to the list. :-)


Best
Michael

Am 24.10.2023 um 13:40 schrieb Joe Wicentowski :


Hi all,

I am experiencing a crash when starting basexgui. The splash screen appears 
briefly, and then the message pasted in below appears, and I've also attached 
the referenced error report file and the crash report that appears in the Mac 
crash dialog. I'm using BaseX 10.7, installed via Homebrew (which installed 
BaseX's openjdk dependency and thus is using openjdk 21), on macOS Sonoma 
(14.0).

I'd be happy to provide any other info that would help in identifying the cause 
of the crash.

Joe


% basexgui
2023-10-24 07:34:22.308 java[69449:3862142] WARNING: Secure coding is 
automatically enabled for restorable state! However, not on all supported macOS 
versions of this application. Opt-in to secure coding explicitly by 
implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:.
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGILL (0x4) at pc=0x7ff80d2b1b73, pid=69449, tid=259
#
# JRE version: OpenJDK Runtime Environment Homebrew (21.0) (build 21)
# Java VM: OpenJDK 64-Bit Server VM Homebrew (21, mixed mode, sharing, tiered, 
compressed oops, compressed class ptrs, g1 gc, bsd-amd64)
# Problematic frame:
# C  [AppKit+0xc8fb73]  _NSCarbonMenuCrashIfNeeded+0x258
#
# No core dump will be written. Core dumps have been disabled. To enable core 
dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/joe/workspace/hsg-project/repos/hsg-shell/hs_err_pid69449.log
#
# If you would like to submit a bug report, please visit:
#   https://github.com/Homebrew/homebrew-core/issues
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
zsh: abort  basexgui






[basex-talk] Crash when starting basexgui

2023-10-24 Thread Joe Wicentowski
Hi all,

I am experiencing a crash when starting basexgui. The splash screen appears
briefly, and then the message pasted in below appears, and I've also
attached the referenced error report file and the crash report that appears
in the Mac crash dialog. I'm using BaseX 10.7, installed via Homebrew
(which installed BaseX's openjdk dependency and thus is using openjdk 21),
on macOS Sonoma (14.0).

I'd be happy to provide any other info that would help in identifying the
cause of the crash.

Joe


% basexgui
2023-10-24 07:34:22.308 java[69449:3862142] WARNING: Secure coding is
automatically enabled for restorable state! However, not on all supported
macOS versions of this application. Opt-in to secure coding explicitly by
implementing
NSApplicationDelegate.applicationSupportsSecureRestorableState:.
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGILL (0x4) at pc=0x7ff80d2b1b73, pid=69449, tid=259
#
# JRE version: OpenJDK Runtime Environment Homebrew (21.0) (build 21)
# Java VM: OpenJDK 64-Bit Server VM Homebrew (21, mixed mode, sharing,
tiered, compressed oops, compressed class ptrs, g1 gc, bsd-amd64)
# Problematic frame:
# C  [AppKit+0xc8fb73]  _NSCarbonMenuCrashIfNeeded+0x258
#
# No core dump will be written. Core dumps have been disabled. To enable
core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/joe/workspace/hsg-project/repos/hsg-shell/hs_err_pid69449.log
#
# If you would like to submit a bug report, please visit:
#   https://github.com/Homebrew/homebrew-core/issues
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
zsh: abort  basexgui
<>
<>