Erlang/Windows stabilty - a newbie question.

kaslist kaslist@REDACTED
Sun Mar 26 19:53:46 CEST 2006


This is my first post to the the list - I've been coding for about 
twenty-five years... but currently I'm an Erlang newbie :) 

At the moment, I'm having a bit of a problem with program stability 
using Erlang and I wondered if anyone here could help.  I'm using 
R10B-10 on WinXP (2GHz/1GbRAM) and I've narrowed the issue to the 
following code which I've wrapped in a simple module to demonstrate:



start() ->
    FILENAME = "test.txt",
    case file:read_file(FILENAME) of
        {ok, Data}    ->
            TESTSTRING = binary_to_list(Data);
        {error, Reason}    ->
            TESTSTRING = ""

    string:tokens(TESTSTRING, " "),

The code is intended to load a file, convert it to a string and then 
split the loaded string.  To test Erlang under pressure - I made 
'test.txt' - 14Mb large.  When I run it repeatedly... this is what 

Erlang (BEAM) emulator version 5.4.13 [threads:0]

Eshell V5.4.13  (abort with ^G)
1> c(testtokens).
./testtokens.erl:11: Warning: variable 'Reason' is unused
2> testtokens:start().
3> testtokens:start().
4> testtokens:start().
5> testtokens:start().
6> testtokens:start().

Abnormal termination

Every time it crashes.  Thus my question is... am I doing something 
intrinsically dumb/non-erlang here.... or is it a bug?  I know Erlang 
doesn't pretend to be an efficient sequential processor... but I didn't 
expect this.

If you've got any advice I'd really appreciate it.



More information about the erlang-questions mailing list