<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 9.00.8112.16421">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>QuickCheck found another dets bug at Klarna. The
following test makes dets hang:</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>run() -><BR>
dets:stop(),<BR>
file:delete(dets_table),<BR> {ok,dets_table} =
dets:open_file(dets_table,[{type,bag}]),<BR> ok =
dets:insert(dets_table,[{0,21},{0,0},{1,0},{2,0},{2,1}]),<BR>
ok = dets:insert(dets_table,[{1,21}]),<BR> true =
dets:insert_new(dets_table,[{3,0}]),<BR> {[{1,21}],Cont} =
dets:match_object(dets_table,{'$1',21},0),<BR>
{[{0,21}],Cont2} = dets:match_object(Cont),<BR> ok =
dets:match_delete(dets_table,{'$1','$2'}),</FONT><FONT size=2
face=Arial><BR> true =
dets:insert_new(dets_table,[{31,0}]), <BR> ok =
dets:insert(dets_table,[{2,1},{18,0},{31,1}]),<BR> ok =
dets:insert(dets_table,[{1,0},{1,1},{2,0}]),<BR> [] =
dets:match_object(dets_table,{0,0}),<BR> io:format("Here it
comes..."),<BR> %% This call hangs<BR>
dets:match_object(Cont2),<BR>
io:format("now!\n").</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>When I run it:</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>2>
c(dets_stopped).<BR>{ok,dets_stopped}<BR>3> dets_stopped:run().<BR>Here it
comes...</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Make sure to run it in a newly started node... dets
has some state which can change the behaviour.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Maybe it could be simplified some more, but most
changes I make to it cause it to pass.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>John</FONT></DIV></BODY></HTML>