huiqing / percept2

Concurrent profiling tool for Erlang
135 stars 34 forks source link

Percept Internal Error #19

Open chrizkiran opened 6 years ago

chrizkiran commented 6 years ago

Whenever I try to check the detail of a process, I see the below error on the webpage. Percept Internal Error [{lists,foldl, [#Fun,[],error], [{file,"lists.erl"},{line,1262}]}, {percept2_analyzer,waiting_activities,1, [{file,"src/percept2_analyzer.erl"},{line,190}]}, {percept2_html,process_info_content_1,2, [{file,"src/percept2_html.erl"},{line,1348}]}, {percept2_html,process_info_page,3, [{file,"src/percept2_html.erl"},{line,270}]}, {mod_esi,'-erl_scheme_webpage_chunk/5-fun-0-',5, [{file,"mod_esi.erl"},{line,369}]

I resolved it by adding a case clause in percept2_analyzer.erl for handling inactive state

[#activity{timestamp=Time2, id = Pid, state=inactive} | _ ] -> waiting_activities_mfa_list(Activities, ListedMfas);

Am just ignoring the inactive state and doing nothing else. I hope there should be a reason for not adding a clause to handle inactive state, I want to know ignoring it the way I did will lead to any wrong metrics and lead me in a wrong direction or is it fine to do so.