<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Sorry, adding a subject now.<br>
</p>
<div class="moz-cite-prefix">On 13/11/2018 16:57, Russell Brown
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAGyevpySc20U9ubNName569_r2ZGDfR9AR+s4+p3cUN5agNRoA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">Hi,</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">I have a something I don't understand with
redbug, if anyone can shed</div>
<div dir="ltr">light, I'd be grateful.</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Start two nodes</div>
<div dir="ltr"><br>
</div>
<div dir="ltr"> erl -name <a href="mailto:trc@127.0.0.1"
moz-do-not-send="true">trc@127.0.0.1</a> -setcookie trc
-pa PATH_TO_EPER_BIN</div>
<div dir="ltr"> erl -name <a href="mailto:rpc@127.0.0.1"
moz-do-not-send="true">rpc@127.0.0.1</a> -setcookie trc</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">in the second node (<a
href="mailto:rpc@127.0.0.1" moz-do-not-send="true">rpc@127.0.0.1</a>)
I run the following:</div>
<div dir="ltr"><br>
</div>
<div dir="ltr"> (<a href="mailto:rpc@127.0.0.1"
moz-do-not-send="true">rpc@127.0.0.1</a>)3>
net_kernel:hidden_connect('<a href="mailto:trc@127.0.0.1"
moz-do-not-send="true">trc@127.0.0.1</a>').</div>
<div dir="ltr"> true</div>
<div dir="ltr"> (<a href="mailto:rpc@127.0.0.1"
moz-do-not-send="true">rpc@127.0.0.1</a>)4>
rpc:call('<a href="mailto:trc@127.0.0.1"
moz-do-not-send="true">trc@127.0.0.1</a>', redbug,
start, ["erlang:term_to_binary", [{arity, true},
{print_file, "/home/russell/t2btrc"}]]).</div>
<div dir="ltr"> {40,2}</div>
<div dir="ltr"> (<a href="mailto:rpc@127.0.0.1"
moz-do-not-send="true">rpc@127.0.0.1</a>)5>
rpc:call('<a href="mailto:trc@127.0.0.1"
moz-do-not-send="true">trc@127.0.0.1</a>', erlang,
term_to_binary, [{my_tuple, is, boss}]).</div>
<div dir="ltr">
<<131,104,3,100,0,8,109,121,95,116,117,112,108,101,100,0,</div>
<div dir="ltr"> 2,105,115,100,0,4,98,111,115,115>></div>
<div dir="ltr"> (<a href="mailto:rpc@127.0.0.1"
moz-do-not-send="true">rpc@127.0.0.1</a>)6></div>
<div dir="ltr">=ERROR REPORT==== 13-Nov-2018::16:48:17 ===</div>
<div dir="ltr">Error in process <0.46.0> on node '<a
href="mailto:trc@127.0.0.1" moz-do-not-send="true">trc@127.0.0.1</a>'
with exit value:
{terminated,[{io,format,[<0.44.0>,"~s~n",["\n16:48:17
<0.52.0>(dead)
{erlang,term_to_binary,1}"]],[]},{redbug,'-mk_outer/1-fun-2-',5,[{file,"src/redbug.erl"},{line,343}]},{redbug,'-wrap_print_fun/1-fun-0-',3,[{file,"src/redbug.erl"},{line...</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">redbug done, terminated - [{io,format,</div>
<div dir="ltr">
[<5930.44.0>,"~s~n",</div>
<div dir="ltr"> ["\n16:48:17
<0.52.0>(dead) {erlang,term_to_binary,1}"]],</div>
<div dir="ltr"> []},</div>
<div dir="ltr">
{redbug,'-mk_outer/1-fun-2-',5,</div>
<div dir="ltr">
[{file,"src/redbug.erl"},{line,343}]},</div>
<div dir="ltr">
{redbug,'-wrap_print_fun/1-fun-0-',3,</div>
<div dir="ltr">
[{file,"src/redbug.erl"},{line,329}]},</div>
<div dir="ltr">
{lists,foldl,3,[{file,"lists.erl"},{line,1248}]},</div>
<div dir="ltr">
{redbug,print_loop,2,</div>
<div dir="ltr">
[{file,"src/redbug.erl"},{line,519}]}]</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">AND the file "/home/russell/t2btrc" is empty,
but created.</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">However, if I run</div>
<div dir="ltr"><br>
</div>
<div dir="ltr"> (<a href="mailto:trc@127.0.0.1"
moz-do-not-send="true">trc@127.0.0.1</a>)1>
redbug:start("erlang:term_to_binary", [{arity, true},
{print_file, "/home/russell/t2btrc"}]).</div>
<div dir="ltr"> {38,2}</div>
<div dir="ltr"> (<a href="mailto:trc@127.0.0.1"
moz-do-not-send="true">trc@127.0.0.1</a>)2>
erlang:term_to_binary({my_tuple, is, boss}).</div>
<div dir="ltr">
<<131,104,3,100,0,8,109,121,95,116,117,112,108,101,100,0,</div>
<div dir="ltr">
2,105,115,100,0,4,98,111,115,115>></div>
<div dir="ltr"> redbug done, timeout - 1</div>
<div dir="ltr"> (<a href="mailto:trc@127.0.0.1"
moz-do-not-send="true">trc@127.0.0.1</a>)3></div>
<div dir="ltr"><br>
</div>
<div dir="ltr">In the node (<a href="mailto:trc@127.0.0.1"
moz-do-not-send="true">trc@127.0.0.1</a>) the file is
created and contains</div>
<div dir="ltr"><br>
</div>
<div dir="ltr"> 16:49:39 <0.39.0>({erlang,apply,2})
{erlang,term_to_binary,1}</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">What is up with that?</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Thanks in advance if you can explain that to
me at all. I did try</div>
<div dir="ltr">reading the redbug code to figure out what
was happening, but it wasn't</div>
<div dir="ltr">so easy to follow for me.</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Cheers</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Russell</div>
<div dir="ltr"><br>
</div>
<div dir="ltr"><br>
</div>
<div dir="ltr"><br>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
erlang-questions mailing list
<a class="moz-txt-link-abbreviated" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a>
<a class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a>
</pre>
</blockquote>
</body>
</html>