<div>Hi Manuel!</div><div><br></div><div>I think the problem is that ets tables are not deleted before the cover server is unregistered when cover:stop() is called (and cover:stop() does not wait for the cover server to fully terminate either). This means that if you call cover:start() directly after cover:stop() then a new cover server is started, attempting to create new (named) ets tables while the old ones could still be alive. The probability of this happening increases with the amount of cover data in the ets tables, since it then will take longer to delete the tables.</div>
<div><br></div><div>This is a bug in cover. To confirm it you could call ets:delete(Table) for each ets table just before</div><div><br></div><div>unregister(?SERVER) </div><div><br></div><div>in cover:main_process_loop/1.</div>
<div><br></div><div>Regards</div><div>/siri</div><div><br></div><div><br><br><div class="gmail_quote">2013/3/21 Manuel A. Rubio "Bombadil" <span dir="ltr"><<a href="mailto:bombadil@bosqueviejo.net" target="_blank">bombadil@bosqueviejo.net</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I forgo inform that the error occurs with R15B02 and R16B.<br>
<br>
El 2013-03-21 13:50, Manuel A. Rubio "Bombadil" escribió:<div class="HOEnZb"><div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi!<br>
<br>
I was developing a lot of projects with rebar and, when I put only<br>
one app in the apps directory and use eunit and cover, it works well,<br>
but when I create several apps in this directory I often see this<br>
message:<br>
<br>
<br>
------------------------------<u></u>------------------------------<u></u>-----------------------------<br>
ERROR: eunit failed while processing<br>
/home/manuel/Proyectos/<u></u>myproject/apps/app2: {'EXIT',<br>
    {{badmatch,<br>
         {error,<br>
             {badarg,<br>
                 [{ets,new,<br>
                      [cover_internal_data_table,<br>
                       [set,public,named_table,{<u></u>write_concurrency,true}]],<br>
                      []},<br>
                  {cover,init_main,1,[{file,"<u></u>cover.erl"},{line,565}]}]}}},<br>
     [{rebar_eunit,cover_init,2,[{<u></u>file,"src/rebar_eunit.erl"},{<u></u>line,445}]},<br>
      {rebar_eunit,run_eunit,3,[{<u></u>file,"src/rebar_eunit.erl"},{<u></u>line,127}]},<br>
      {rebar_core,run_modules,4,[{<u></u>file,"src/rebar_core.erl"},{<u></u>line,405}]},<br>
      {rebar_core,execute,5,[{file,"<u></u>src/rebar_core.erl"},{line,<u></u>334}]},<br>
      {rebar_core,process_dir1,6,[{<u></u>file,"src/rebar_core.erl"},{<u></u>line,197}]},<br>
      {rebar_core,process_each,5,[{<u></u>file,"src/rebar_core.erl"},{<u></u>line,268}]},<br>
      {rebar_core,process_dir1,6,[{<u></u>file,"src/rebar_core.erl"},{<u></u>line,173}]},<br>
      {rebar_core,process_commands,<u></u>2,<br>
          [{file,"src/rebar_core.erl"},{<u></u>line,61}]}]}}<br>
<br>
------------------------------<u></u>------------------------------<u></u>-----------------------------<br>
<br>
I think that can be due to a race condition, because the eunit<br>
execution between apps is continuous... but I'm not sure :-/<br>
<br>
Any idea?<br>
<br>
Thanks.<br>
Manuel Rubio.<br>
______________________________<u></u>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/<u></u>listinfo/erlang-questions</a><br>
</blockquote>
<br>
______________________________<u></u>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/<u></u>listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br></div>