wx and the problem that won't go away.
Thu Sep 30 06:35:49 CEST 2010
I have now tested Erlang/OTP R14B on (literally) a dozen different Windows
XP machines as well as my Ubuntu 10.04 system. For the Windows machines,
ten of which were 100% Erlang-clean (i.e. had never even once had Erlang
installed), I followed this procedure:
1. Install Erlang/OTP R14B from the supplied binaries without touching a
single option in the installer.
2. Reboot the machine.
3. Open a command line prompt.
4. Run *werl*.
5. At the shell prompt execute wx:demo().
The result, as reported before: on 12 out of the 12 machines werl crashes
hard and Windows pops up a dialog box asking if I want to send Microsoft
information on the crash so they can ignore it in perpetuity. (Seriously:
has ANYBODY ever seen ANYTHING out of Microsoft from one of these crash
For the Ubuntu 10.04 system I followed this procedure:
1. *rm -fR /usr/local/lib/erlang.*
2. Delete all of the items in /usr/local/bin that point to anything
3. *find / -name "*erl*"*
4. Found out that 10.04 installs Erlang/OTP for some of the desktop
5. *sudo aptitude purge* *<insert (longish) list of everything
Erlang-related and anything relying on the Erlang-related packages>*
6. *sudo aptitude purge **<insert (longish) list of everything
7. *sudo aptitude install* *<insert (longish) list of everything
8. *tar xvf otp_src_R14B.tar.gz*
9. *cd otp_src_R14B*
10. *./configure* (no errors here)
11. *make* (no errors here)
12. *sudo make install* (no errors here)
13. Reboot the system.
14. Open up a command prompt.
The result, as before:
Erlang R14B (erts-5.8.1) [source] [64-bit] [smp:2:2] [rq:2]
> [async-threads:0] [hipe] [kernel-poll:true]
> Eshell V5.8.1 (abort with ^G)
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.
I'm completely at wit's end here. I have done nothing unusual on any of the
machines I've tested this on. Out of the 12 Windows XP machines, 3 were
brand new installs -- Windows XP SP3 + downloaded security updates *and
nothing else*. On my Ubuntu machine I've tried my best to ensure there was
nothing unusual lurking in any dark corners, but I'm not in a position to do
a full-on, ground-up reinstallation. The result in all cases has been
unqualified failure: Windows crashes the VM hard, Linux prints that
assertion failure and then crashes the VM hard.
Can anybody -- preferably someone who knows about wx and its implementation
-- provide me with some clues as to which direction I should be stepping now
to get this working? (This means "it works for me" is specifically
unless it's paired with some feasible tips to investigate, incidentally.)
Is there anybody who can look at that above assertion and get a feel for
what may have got wrong where and how to perhaps fix it?
As things stand now, there's a number of tools in the Erlang/OT distribution
that are 100% useless to me because they rely on wx. This includes the
debugger. I'd kind of like to see this situation end.
"Perhaps people don't believe this, but throughout all of the discussions of
entering China our focus has really been what's best for the Chinese people.
It's not been about our revenue or profit or whatnot."
--Sergey Brin, demonstrating the emptiness of the "don't be evil" mantra.
More information about the erlang-questions