elixir_agent
elixir_agent copied to clipboard
Fix bug in top_process.ex when complex args are in use
Hi,
I ran into a bug when spawning supervised tasks via Task.async_stream_nolink/6
. When spawning tasks with MFA, the TopProcess GenServer will crash when trying to parse the spawned Tasks info if the args passed to it cannot be simply converted to a string during interpolation.
In my case, this occured when passing [[String.t()], map()]
, which resulted in the following error:
(ArgumentError) cannot convert the given list to a string.
To be converted to a string, a list must either be empty or only
contain the following elements:
* strings
* integers representing Unicode code points
* a list containing one of these three elements
Please check the given list or call inspect/1 to get the list representation, got:
This fix simply adds an inspect call within the string interpolation which prevents this issue. I have tested this and it resolves the issue.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.
:white_check_mark: edds
:x: Cgboal
You have signed the CLA already but the status is still pending? Let us recheck it.