GS application

Klacke <>
Wed Oct 25 11:37:52 CEST 2000

> you have an error in your code. What happens is that a new process is
> spawned, but it crashes when executing .
> gs:draw_line(Win, solid, 2, Path) 
> Which does not exist.
> The error is not detected at compile time because Erlang modules are
> compiled on a stand alone basis and not linked to each other. 
> You can easily find the error by calling internal/0 directly from the
> shell
> 6> line2:internal().
> ** exited: {undef,{gs,draw_line,

It can be a bit confusing for newbies with processes that silently crash.
If we first start sasl ( application:start(sasl) ), and then instead 
of spawn call, proc_lib:spaw/3, we get a nice error printout on the tty.

=CRASH REPORT==== 25-Oct-2000::11:33:59 ===
    pid: <0.61.0>
    registered_name: []
    error_info: {undef,[{gs,draw_line,
    initial_call: {line2,internal,[]}
    ancestors: [<0.22.0>]
    messages: []
    links: [<0.31.0>]
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 377
    stack_size: 21
    reductions: 120

Then it's pretty clear what goes on.


More information about the erlang-questions mailing list