Elixir: Application process tree doesn't get updated in :observer

Created on 29 Apr 2020  路  6Comments  路  Source: elixir-lang/elixir

Environment

  • Elixir & Erlang/OTP versions (elixir --version):
Erlang/OTP 22 [erts-10.7.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe] [dtrace]

Elixir 1.10.3 (compiled with Erlang/OTP 22)
  • Operating system:
$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.14.6
BuildVersion:   18G95

Current behavior

I can successfully start observer by :observer.start(). But when I click the application name on the Applications tab, the right section doesn't get updated.

For some application, like kernel, the right side did get updated. But for many applications, it remains what it was before.

It seems not the loading problem, because I tried to wait a long time and it still didn't get updated.

I use hexpm project for testing.

2020-04-29 18 51 34

Expected behavior

When I click the application name, the right side should get updated immediately.

Erlang bug

Most helpful comment

So I was having similar issues in OSX:

  • Applications tab wouldn't show/update unless window resizes
  • observer font color is unusable in OSX dark mode

Now I knew something was wrong but didn't know what exactly. So Observer bug you say? Hmmm I go search those issues and I find the following:
https://bugs.erlang.org/browse/ERL-835

And it looks like an outdated dependency issue on wxWidgets - and wxWidgets-3.1.3 seems to work.

Now I don't know how most people install Elixir on MacOS but I'm guessing a fair amount use asdf or Homebrew. I use Homebrew. So what version of wxWidgets am I running?

$brew info wxmac
wxmac: stable 3.0.4_2 (bottled), HEAD
Cross-platform C++ GUI toolkit (wxWidgets for macOS)
$brew update
$ brew upgrade wxmac
==> Upgrading 1 outdated package:
wxmac 3.0.4_2 -> 3.0.5
$ brew info wxmac
wxmac: stable 3.0.5 (bottled), HEAD

So same problem. Bummer. How do I install the latest wxWidgets version using Homebrew??? They've got stale issues - https://github.com/Homebrew/homebrew-core/pull/52177

Then I saw this link:
https://discourse.brew.sh/t/brew-install-wxwidgets-devel-3-1-1/3453/3 - So it doesn't look like Homebrew actually supports that version currently. Hmmm

The instructions say to manually update the formula. After much fussing around I found this https://github.com/asdf-vm/asdf-erlang/issues/95#issuecomment-593923921 by @eproxus which shows exactly what to do. The most important part I couldn't figure out on my own was the all important --enable-compat28 flag! It was also mentioned in the erlang ticket. Also I haven't tried to use asdf - but that fact that the issue appear in that repo makes me assume that is a current problem for that install process as well.

OK, let's get it working.

brew edit wxmac # see diff below

Change the wxmac formula to look like this:

diff --git a/Formula/wxmac.rb b/Formula/wxmac.rb
index d80b02f9e..9c68e7363 100644
--- a/Formula/wxmac.rb
+++ b/Formula/wxmac.rb
@@ -1,8 +1,8 @@
 class Wxmac < Formula
   desc "Cross-platform C++ GUI toolkit (wxWidgets for macOS)"
   homepage "https://www.wxwidgets.org"
-  url "https://github.com/wxWidgets/wxWidgets/releases/download/v3.0.5/wxWidgets-3.0.5.tar.bz2"
-  sha256 "8aacd56b462f42fb6e33b4d8f5d40be5abc3d3b41348ea968aa515cc8285d813"
+  url "https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.3/wxWidgets-3.1.3.tar.bz2"
+  sha256 "fffc1d34dac54ff7008df327907984b156c50cff5a2f36ee3da6052744ab554a"
   head "https://github.com/wxWidgets/wxWidgets.git"

   bottle do
@@ -19,6 +19,7 @@ class Wxmac < Formula
   def install
     args = [
       "--prefix=#{prefix}",
+      "--enable-compat28",
       "--enable-clipboard",
       "--enable-controls",
       "--enable-dataviewctrl",

With the formula now updated, we need to make sure to install wxmac and erlang with --build-form-source options in homebrew.

brew uninstall elixir
brew uninstall erlang
brew uninstall wxmac

brew install --build-from-source wxmac
brew install --build-from-source erlang
brew install elixir

....now observer works without resizing all the time AND dark mode works for me. Many thanks!!! @eproxus

All 6 comments

Hi @cj1128.

observer is part of erlang so issues with it should be reported to the erlang issue tracker: https://bugs.erlang.org/secure/Dashboard.jspa.

@cj1128 On my machine (macos 10.15.4, otp 22.3.2) resizing observer window forces it to redraw application process tree.

@lukaszsamson Thank you it works for me too!

IIRC, this issue was related to the wx version. Bumping the version installed in your system will most likely fix the issue.

I'm on wxmac 3.0.4 installed by brew (latest currently available). I can see 3.0.5 was released 2 days ago and there is also 3.1 branch marked as unstable.

So I was having similar issues in OSX:

  • Applications tab wouldn't show/update unless window resizes
  • observer font color is unusable in OSX dark mode

Now I knew something was wrong but didn't know what exactly. So Observer bug you say? Hmmm I go search those issues and I find the following:
https://bugs.erlang.org/browse/ERL-835

And it looks like an outdated dependency issue on wxWidgets - and wxWidgets-3.1.3 seems to work.

Now I don't know how most people install Elixir on MacOS but I'm guessing a fair amount use asdf or Homebrew. I use Homebrew. So what version of wxWidgets am I running?

$brew info wxmac
wxmac: stable 3.0.4_2 (bottled), HEAD
Cross-platform C++ GUI toolkit (wxWidgets for macOS)
$brew update
$ brew upgrade wxmac
==> Upgrading 1 outdated package:
wxmac 3.0.4_2 -> 3.0.5
$ brew info wxmac
wxmac: stable 3.0.5 (bottled), HEAD

So same problem. Bummer. How do I install the latest wxWidgets version using Homebrew??? They've got stale issues - https://github.com/Homebrew/homebrew-core/pull/52177

Then I saw this link:
https://discourse.brew.sh/t/brew-install-wxwidgets-devel-3-1-1/3453/3 - So it doesn't look like Homebrew actually supports that version currently. Hmmm

The instructions say to manually update the formula. After much fussing around I found this https://github.com/asdf-vm/asdf-erlang/issues/95#issuecomment-593923921 by @eproxus which shows exactly what to do. The most important part I couldn't figure out on my own was the all important --enable-compat28 flag! It was also mentioned in the erlang ticket. Also I haven't tried to use asdf - but that fact that the issue appear in that repo makes me assume that is a current problem for that install process as well.

OK, let's get it working.

brew edit wxmac # see diff below

Change the wxmac formula to look like this:

diff --git a/Formula/wxmac.rb b/Formula/wxmac.rb
index d80b02f9e..9c68e7363 100644
--- a/Formula/wxmac.rb
+++ b/Formula/wxmac.rb
@@ -1,8 +1,8 @@
 class Wxmac < Formula
   desc "Cross-platform C++ GUI toolkit (wxWidgets for macOS)"
   homepage "https://www.wxwidgets.org"
-  url "https://github.com/wxWidgets/wxWidgets/releases/download/v3.0.5/wxWidgets-3.0.5.tar.bz2"
-  sha256 "8aacd56b462f42fb6e33b4d8f5d40be5abc3d3b41348ea968aa515cc8285d813"
+  url "https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.3/wxWidgets-3.1.3.tar.bz2"
+  sha256 "fffc1d34dac54ff7008df327907984b156c50cff5a2f36ee3da6052744ab554a"
   head "https://github.com/wxWidgets/wxWidgets.git"

   bottle do
@@ -19,6 +19,7 @@ class Wxmac < Formula
   def install
     args = [
       "--prefix=#{prefix}",
+      "--enable-compat28",
       "--enable-clipboard",
       "--enable-controls",
       "--enable-dataviewctrl",

With the formula now updated, we need to make sure to install wxmac and erlang with --build-form-source options in homebrew.

brew uninstall elixir
brew uninstall erlang
brew uninstall wxmac

brew install --build-from-source wxmac
brew install --build-from-source erlang
brew install elixir

....now observer works without resizing all the time AND dark mode works for me. Many thanks!!! @eproxus

Was this page helpful?
0 / 5 - 0 ratings

Related issues

GianFF picture GianFF  路  3Comments

andrewcottage picture andrewcottage  路  3Comments

sashaafm picture sashaafm  路  3Comments

cmeiklejohn picture cmeiklejohn  路  3Comments

whitepaperclip picture whitepaperclip  路  3Comments