[erlang-bugs] erl_interface: badarg on specific inputs

Davide Marquês <>
Mon May 11 13:29:47 CEST 2009


Hi all,

Just wanted to let you know that I found out what was preventing
erl_interface from working on windows! :)
The solution had already been shared on the mailing lists:
    http://erlang.org/pipermail/erlang-questions/2004-April/012097.html
    http://www.erlang.org/ml-archive/erlang-questions/200305/msg00259.html
It's just a matter of setting stdin/out to binary mode and voilá: working code!

We have Serge Aleynikov to thank for figuring out the solution to this
problem and
for a great tutorial on using ei:
  http://www.trapexit.org/How_to_use_ei_to_marshal_binary_terms_in_port_programs
Thanks wherever you are! :)

The erl_interface examples complex/echo
(http://github.com/davide/erl_interface-examples/tree/master)
are now working. :)

Cheers,
:Davide

2009/5/11 Björn-Egil Dahlberg <>:
> Hi Davide,
>
> I want to thank you for taking your time to point out some problems with
> erl_interface and say that I agree with you that its Howto/Tutorial needs
> some sort of overhaul and additions.
>
> I will take a look at your repo and your suggestions.
>
> Regards,
> Björn-Egil
> Erlang/OTP
>
>
>
> Davide Marquês wrote:
>>
>> Hi all,
>>
>> I hope I'm not abusing this mailing list with this email. I posted the
>> problem
>> earlier today on erlang-questions:
>> http://www.erlang.org/pipermail/erlang-questions/2009-May/043577.html
>> but I'm guessing there aren't many erl_interface [on windows] users.
>> Since this might be a bug here goes...
>>
>> Under certain inputs my basic port programs are simply breaking:
>>
>> 4> echo:echo("aaa aaaaaa").
>>
>> sending to port: {echo,{"aaa aaaaaa"}}
>>
>> =ERROR REPORT==== 4-May-2009::16:11:15 ===
>> catch: error:badarg
>>
>> This might be simply due to bad coding on my part but I've tried to keep
>> it
>> simple to rule that out. I was able to replicate the problem with
>> erl_interface-3.6.1
>> (.lib that come with the binary windows distribution; a MSVC build; and a
>> MinGW build)
>> and erl_interface-3.5.9 (MinGW build only).
>>
>> The [failing] code is available here:
>> http://github.com/davide/erl_interface-examples/tree/master
>> A sure way to get the echo program to fail is: echo:echo("New Folder").
>>
>> I'm welcoming any feedback! Even if it's just to point out that I'm doing
>> something
>> really dumb (I can live with that). :)
>>
>> On a side note, on the docs folder I documented my experience of trying
>> (and failing) to build erlang on Windows (using Visual C++ 2008 Express
>> Edition).
>> As the details might be revelant to other users please consider updating
>> README.WIN32 to get it into a step-by-step/How-To style
>> <http://github.com/davide/erl_interface-examples/blob/1443a11bd6aa5aa4b6030c9fec1d6c4ff360dd57/doc/Building%20erlang%20on%20Windows.txt>.
>>
>> Cheers,
>> :Davide
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> erlang-bugs mailing list
>> 
>> http://www.erlang.org/mailman/listinfo/erlang-bugs
>
>



More information about the erlang-bugs mailing list