<p dir="ltr">This is a long shot, but... you don't happen to have a module called 'user' or 'group' lying around in your app, do you?<br>
/Erik</p>
<div class="gmail_quote">Den 03/07/2014 09.42 skrev "Calle Dybedahl" <<a href="mailto:calle@init.se">calle@init.se</a>>:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi there.<div><br></div><div>I've just run into a bit of behavior that I do not understand: if I have an io:format() in a handle_call, I get a timeout instead of a return from gen_server:call(), but only if the gen_server module was started as part of an application. I ran into it while trying to do something real, but it's easy enough to reproduce in a clean environment.</div>
<div><br></div><div>So. I start with an application created with "rebar create-app appid=wtf" and "rebar create template=simplesrv srvid=wtf", and the wtf module added as a child of the supervisor. If I then do "application:start(wtf)." in a shell, "gen_server:call(wtf,something)." returns "ok" as expected. If I now add the single line "io:format("In handle_call.~n")," at the start of wtf:handle_call(), and try to run the same two commands, instead of "ok" I get a pause followed by:</div>
<div><br></div><div><div><font face="courier new, monospace">** exception exit: {timeout,{gen_server,call,[wtf,something]}}</font></div><div><font face="courier new, monospace"> in function gen_server:call/2 (gen_server.erl, line 182)</font></div>
</div><div><br></div><div><div>I totally don't understand why this happens, and only when it was started with "application:start(wtf)". If I start either the wtf_sup or wtf modules manually, the io:format() runs and prints what it should without problems.</div>
<div><br></div><div>I'm using Erlang 17.1 (installed with Homebrew) under OSX 10.9.</div>-- <br><div dir="ltr">Calle Dybedahl -*- <a href="mailto:calle@init.se" target="_blank">calle@init.se</a></div>
</div></div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div>