Yes, the record definition should have been<br><br>-record(collection, {id, values :: [property()]}).<br><br>and yes, correcting the record definition also solved the hang problem.<br><br>-Garret Smith<br><br><div class="gmail_quote">
On Fri, Jul 29, 2011 at 12:16 PM, Tuncer Ayaz <span dir="ltr"><<a href="mailto:tuncer.ayaz@gmail.com">tuncer.ayaz@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On Fri, Jul 29, 2011 at 3:30 AM, Garret Smith wrote:<br>
> I created a small code example, distilled from a couple files in a<br>
> larger project, that will cause dialyzer to hang indefinitely.<br>
> At least, in the larger project I left dialyzer running for 42 hours<br>
> before giving up.  I have only left it running for a few minutes on<br>
> this small code example before deciding that more time would not help.<br>
><br>
> I am running R14B03 on FreeBSD, amd64 architecture:<br>
> Erlang R14B03 (erts-5.8.4) [source] [64-bit] [smp:6:6] [rq:6]<br>
> [async-threads:0] [hipe] [kernel-poll:false]<br>
><br>
> Steps to reproduce:<br>
> erlc +debug_info test.erl<br>
> dialyzer --build_plt --output_plt test.plt test.beam<br>
><br>
> test.erl:<br>
> -module(test).<br>
><br>
> -compile(export_all).<br>
><br>
><br>
> -record(property, {name, value}).<br>
> -opaque property() :: #property{}.<br>
><br>
> -record(collection, {id, values :: [#property{}]}).<br>
><br>
> as_proplist(#collection{values = Values}) -><br>
>         [{Name, Value} || #property{name = Name, value = Value} <- Values] .<br>
><br>
> If I can provide any more details that will help, please let me know!<br>
<br>
</div></div>Are you sure the record definition<br>
<div class="im">-record(collection, {id, values :: [#property{}]}).<br>
</div>is correct and wasn't meant to be<br>
-record(collection, {id, values :: [property()]}).<br>
or<br>
<div class="im">-record(collection, {id, values :: list(property())}).<br>
</div>?<br>
<br>
Only the first definition triggers a hang.<br>
</blockquote></div><br>