Erlang and wxWidgets: how to help to improve the stability of wx (on Ubuntu)?!?!

Boris Mühmer <>
Thu Jan 27 22:28:52 CET 2011

After some time of other work I wanted to do some tests with Erlang
and wxWidgets again on my linux box at home, but my system failed on
"wx:demo()" with a core dump.

=== output: begin ===

$ /opt/erlang-otp/bin/erl
Erlang R14B01 (erts-5.8.2) [source] [64-bit] [smp:2:2] [rq:2]
[async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.8.2  (abort with ^G)
1> wx:demo().
beam.smp: malloc.c:3096: sYSMALLOc: Assertion `(old_top == (((mbinptr)
(((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct
malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size)
>= (unsigned long)((((__builtin_offsetof (struct malloc_chunk,
fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t)))
- 1))) && ((old_top)->size & 0x1) && ((unsigned long)old_end &
pagemask) == 0)' failed.

=== output: end ===

This sort of behaviour (with erl core dumping) was already discussed
two or three months ago ("Debugger fault at startup." and "wx and the
problem that won't go away." by Michael Richter, end of September

I had a brief look with gdb at the core dump, but it didn't give me a
clue what went wrong. I even recompiled my erlang installation from
the official tarball (R14B01) and the git repository, but all my
builds core dumped on my home system.

When I tried this at work, I could not reproduce this error.

The main difference between those systems is the Ubuntu version installed:
- home: 10.10
- work: 10.04

But I believe "wx:demo/()" worked with Ubuntu 10.10 last year, but I
am not 100% sure, because reading "Erlang and OTP in Action" (for the
last weeks) didn't involve any UI/wx programming.

So what can I (or we) do to improve the stability of the wx
environment? Is this just a problem with Ubuntu or do other (Linux,
*BSD, Windows, etc.) systems/environments have the same or similar
problem(s)? Is anyone interested in the core dump?

  - boris

More information about the erlang-questions mailing list