[erlang-questions] port_command returns badarg in long binary input

Frederick Grim <>
Wed Jan 28 22:53:45 CET 2009


Hello List,
    So I have been fighting with the following problem.  I have a port
that I feed in data to and most of the time it works fine.  However for
longer data of the form

[ pipeline, { atom(), [ { atom(), string() }, { atom(), string() },...]}]

it dies with the following error:

=ERROR REPORT==== 28-Jan-2009::16:36:29 ===
caught exception {badarg,[{erlang,port_command,
                                  [#Port<0.102>,
                                  
<<131,108,0,0,0,1,100,0,5,114,101,115,101,
                                     116,106>>]},
                          {pipeline_bridge,send_msg,2},
                          {pipeline_bridge,get_response,1},
                          {pipeline_bridge,call_port,2},
                          {pipeline_bridge,handle_call,3},
                          {gen_server,handle_msg,5},
                          {proc_lib,init_p,5}]}
I have attached the pipeline_bridge.erl file.  I am sort of at a loss
here.  The problem is entirely related to the size of the data.  The
bigger it is, past some threshold I for sure get this sort of failure. 
Could it be a character encoding issue?  The strings could, potentially,
be some sort of non-ascii codec.  Thanks for the time.
    Fred


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pipeline_bridge.erl
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090128/bd1308cb/attachment.ksh>


More information about the erlang-questions mailing list