:observer.start() crashes in ASDF Elixir

When I do :observer.start() from inside an iex session, erlang crashes with segmentation fault. I tried brew install wxmac to deal with the errors described here Elixir with ASDF: troubleshooting :observer.start - #2 by l00ker
But that’s when the crashes started. The log is very long has many lines:

./src/common/object.cpp(251): assert "classTable->Get(m_className) == NULL" failed in Register(): Class "wxXmlResourceHandler" already in RTTI table - have you used IMPLEMENT_DYNAMIC_CLASS() multiple times or linked some object file twice)?

I have these versions:

asdf install erlang 23.1.2
asdf install elixir 1.11.2-otp-23

running on OS X 11.2.1 Big Sur.

Does anyone have ideas what I should try? Thank you!

2 Likes

had similar issue not too long ago

did u try just reinstalling elixir via asdf and if that doesnt work reinstalling asdf itself?

I tried uninstalling/installing erlang via asdf… I didn’t do that with Elixir or with asdf itself yet

wxmac has to be installed when/before Erlang is compiled. Observer runs in Erlang, not Elixir, so reinstalling Elixir alone will not help you. Remove your Erlang installation and reinstall, now that you have wxmac installed and it should work for you.

(PS…check the ASDF Erlang plugin readme for any other dependencies you may need before compiling Erlang again. It’s pretty well detailed).

6 Likes

I have tried uninstalling Elixir, Erlang, and ASDF itself, but the observer doesn’t work yet. I don’t know which compile options to test

As mentionned in the previous post, You need wxmac. Did You install it?

yes, I did brew install wxmac before re-installing and re-compiling erlang.

It seems that most of the errors are about there being wxmac files in 2 locations. But maybe this is normal for how brew installs this?

iex(1)> :observer.start
objc[58568]: Class wxNSAppController is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x5d2e5c50) and /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.dylib (0x5b324c50). One of the two will be used. Which one is undefined.

I would probably uninstall the oldest, it should be something like brew unistall, but I am not on Mac anymore.

There is a similar thread here with a marked solution, maybe it can help: `:observer.start` crashes Erlang VM - #19 by michaelwm

I followed this: segmentation fault when starting observer (macOS Big Sur) · Issue #183 · asdf-vm/asdf-erlang · GitHub

it worked for me running

asdf install erlang 23.1.2
asdf install elixir 1.11.2-otp-23

on BigSur

Thank you!

1 Like