[erlang-questions] Question on Diagraph module
Balu Balasubramanian
avbalu@REDACTED
Sat Feb 2 02:46:23 CET 2008
Thanks, Bengt.
Makes sense. Yes, the shell did crash and got recreated with new process id. But I see that the variable binding for G is still valid.
That raises one more question (not really related to digraph)
When the shell (and in general any process) crashes won't it automatically forget the variable bindings as well?
----------------------------------------
> From: bengt.kleberg@REDACTED
> CC: erlang-questions@REDACTED
> Date: Tue, 29 Jan 2008 09:52:55 +0100
> Subject: Re: [erlang-questions] Question on Diagraph module
>
> Greeteings,
>
> Presumably you are getting the error because G is gone.
>
> I have never used digraphs but the manual page
> (http://erlang.org/doc/man/digraph.html) says:
>
> "The digraph will, however, be deleted if the process that created the
> digraph terminates."
>
> Your shell process, that created G, has just crashed.
>
>
> bengt
>
> On Tue, 2008-01-29 at 08:16 +0000, Balu Balasubramanian wrote:
>> Hi,
>>
>> I am new to Erlang!
>>
>> Can some one explain why I am getting the last error message (badarith) that I get with digraph module in stdlib.
>>
>> Erlang (BEAM) emulator version 5.5.4 [source] [64-bit] [async-threads:0] [kernel -poll:false]
>>
>> Eshell V5.5.4 (abort with ^G)
>> 1> G=digraph:new().
>> {graph,14,15,16,true}
>> 2> digraph:info(G).
>> [{cyclicity,cyclic},{memory,847},{protection,protected}]
>> 3> digraph:info().
>>
>> =ERROR REPORT==== 8-Jan-2008::22:02:06 ===
>> Error in process with exit value: {undef,[{digraph,info,[]},{erl_eval,d o_apply,5},{shell,exprs,6},{shell,eval_loop,3}]}
>>
>> ** exited: {undef,[{digraph,info,[]},
>> {erl_eval,do_apply,5},
>> {shell,exprs,6},
>> {shell,eval_loop,3}]} **
>>
>> % the above error is obvious as digraph:info/0 is udnefined. But now,
>>
>> 4> digraph:info(G).
>>
>> =ERROR REPORT==== 8-Jan-2008::22:02:08 ===
>> Error in process with exit value: {badarith,[{digraph,info,1},{erl_eval ,do_apply,5},{shell,exprs,6},{shell,eval_loop,3}]}
>>
>> ** exited: {badarith,[{digraph,info,1},
>> {erl_eval,do_apply,5},
>> {shell,exprs,6},
>> {shell,eval_loop,3}]} **
>>
>> % Can some one please explain the above badarith error? Are there known issues with the digraph module?
>>
>> 5> init:script_id().
>> {"OTP APN 181 01","R11B"}
>> 6>
>>
>>
>> Thanks
>> Balu
>>
>>
>> _________________________________________________________________
>> Connect and share in new ways with Windows Live.
>> http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_012008
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://www.erlang.org/mailman/listinfo/erlang-questions
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
_________________________________________________________________
Need to know the score, the latest news, or you need your Hotmail®-get your "fix".
http://www.msnmobilefix.com/Default.aspx
More information about the erlang-questions
mailing list