aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/src/cdv_dist_cb.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2014-03-17 15:48:17 +0100
committerSiri Hansen <[email protected]>2014-03-25 11:34:35 +0100
commit6a5b206e984ed28d257c6ab518b3ecbe5c6033d7 (patch)
tree4072150ad363c5d5459a3154954c5a7a8eb8ff82 /lib/observer/src/cdv_dist_cb.erl
parentf6bb3dc325e686375b1dee283bd91c3068b682a1 (diff)
downloadotp-6a5b206e984ed28d257c6ab518b3ecbe5c6033d7.tar.gz
otp-6a5b206e984ed28d257c6ab518b3ecbe5c6033d7.tar.bz2
otp-6a5b206e984ed28d257c6ab518b3ecbe5c6033d7.zip
Fix crash in crashdump_viewer when node has multiple creations
A node to which we have references to multiple instances (creations) will have an information line in the crashdump like this: Creation: 1 2 ... This would earlier crash because crashdump_viewer would try to do list_to_integer on the value after "Creation: ". This is now corrected. This correction also helps the case when the emulator is debug compiled, since the line could then be Creation: 1 (refc=1)
Diffstat (limited to 'lib/observer/src/cdv_dist_cb.erl')
-rw-r--r--lib/observer/src/cdv_dist_cb.erl12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/observer/src/cdv_dist_cb.erl b/lib/observer/src/cdv_dist_cb.erl
index 3860324d6f..f7e6c9aded 100644
--- a/lib/observer/src/cdv_dist_cb.erl
+++ b/lib/observer/src/cdv_dist_cb.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. 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
@@ -22,7 +22,8 @@
get_info/1,
get_detail_cols/1,
get_details/1,
- detail_pages/0]).
+ detail_pages/0,
+ format/1]).
-include_lib("wx/include/wx.hrl").
-include("crashdump_viewer.hrl").
@@ -75,6 +76,11 @@ init_gen_page(Parent, Info) ->
Fields = info_fields(),
cdv_info_wx:start_link(Parent,{Fields,Info,[]}).
+format({creations,Creations}) ->
+ string:join([integer_to_list(C) || C <- Creations],",");
+format(D) ->
+ D.
+
%%%-----------------------------------------------------------------
%%% Internal
info_fields() ->
@@ -83,7 +89,7 @@ info_fields() ->
{"Type", conn_type},
{"Channel", channel},
{"Controller", {click,controller}},
- {"Creation", creation},
+ {"Creation", {{format,fun format/1},creation}},
{"Extra Info", error}]},
{scroll_boxes,
[{"Remote Links",1,{click,remote_links}},