aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/src/crashdump_viewer.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/crashdump_viewer.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/crashdump_viewer.erl')
-rw-r--r--lib/observer/src/crashdump_viewer.erl8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/observer/src/crashdump_viewer.erl b/lib/observer/src/crashdump_viewer.erl
index 0467e808e3..a08d27d070 100644
--- a/lib/observer/src/crashdump_viewer.erl
+++ b/lib/observer/src/crashdump_viewer.erl
@@ -1576,7 +1576,13 @@ get_nodeinfo(Fd,Nod) ->
"Controller" ->
get_nodeinfo(Fd,Nod#nod{controller=val(Fd)});
"Creation" ->
- get_nodeinfo(Fd,Nod#nod{creation=list_to_integer(val(Fd))});
+ %% Throwing away elements like "(refc=1)", which might be
+ %% printed from a debug compiled emulator.
+ Creations = lists:flatmap(fun(C) -> try [list_to_integer(C)]
+ catch error:badarg -> []
+ end
+ end, string:tokens(val(Fd)," ")),
+ get_nodeinfo(Fd,Nod#nod{creation={creations,Creations}});
"Remote link" ->
Procs = val(Fd), % e.g. "<0.31.0> <4322.54.0>"
{Local,Remote} = split(Procs),