aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/test/wx_xtra_SUITE.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2013-11-06 14:00:16 +0100
committerDan Gudmundsson <[email protected]>2013-11-14 09:00:59 +0100
commit76b4def27cf893cf25a7e72e7871180bd4bfd003 (patch)
treed0d9da8111ef1d3165ea3035fe6501b714de3806 /lib/wx/test/wx_xtra_SUITE.erl
parent4a4540ecfd111af7703055b513b259cace49464c (diff)
downloadotp-76b4def27cf893cf25a7e72e7871180bd4bfd003.tar.gz
otp-76b4def27cf893cf25a7e72e7871180bd4bfd003.tar.bz2
otp-76b4def27cf893cf25a7e72e7871180bd4bfd003.zip
wx: Fix crash in wxe_server cleanup
Do not use disconnect event listener when we are exiting the port, it may interfere with window destructions and cause a crash.
Diffstat (limited to 'lib/wx/test/wx_xtra_SUITE.erl')
-rw-r--r--lib/wx/test/wx_xtra_SUITE.erl16
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/wx/test/wx_xtra_SUITE.erl b/lib/wx/test/wx_xtra_SUITE.erl
index a2d4c26319..8d5d7ddb6a 100644
--- a/lib/wx/test/wx_xtra_SUITE.erl
+++ b/lib/wx/test/wx_xtra_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -129,15 +129,19 @@ app_dies(_Config) ->
app_dies2(Test, N) ->
spawn_link(fun() -> Test(N) end),
- receive
- {'EXIT', _, {oops, last}} -> ok;
- {'EXIT', _, {oops, _}} -> app_dies2(Test, N+1)
+ receive
+ {'EXIT', _, {oops, Server, What}} ->
+ Ref = erlang:monitor(process, Server),
+ receive {'DOWN', Ref, _, _, _} -> ok end,
+ timer:sleep(100),
+ What =/= last andalso app_dies2(Test, N+1)
end.
oops(Die, Line) when (Die =:= last) orelse (Die =< Line) ->
- timer:sleep(300),
+ timer:sleep(200),
?log(" Exits at line ~p~n",[Line]),
- exit({oops, Die});
+ Server = element(3, wx:get_env()),
+ exit({oops, Server, Die});
oops(_,_) -> ok.