# LayeredLayouts.jl: solve\_positions crashes Julia process with malloc error

**URL:** <https://discourse.julialang.org/t/layeredlayouts-jl-solve-positions-crashes-julia-process-with-malloc-error/92335>\
**Category:** General Usage\
**Created:** [December 30, 2022, 8:34pm UTC](https://discourse.julialang.org/t/layeredlayouts-jl-solve-positions-crashes-julia-process-with-malloc-error/92335 "2022-12-30T20:34:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![roh\_codeur](https://avatars.discourse-cdn.com/v4/letter/r/ce73a5/32.png) [@roh\_codeur](https://discourse.julialang.org/u/roh_codeur)\
**Post date:** [December 30, 2022, 8:34pm UTC](https://discourse.julialang.org/t/layeredlayouts-jl-solve-positions-crashes-julia-process-with-malloc-error/92335/1 "2022-12-30T20:34:58Z")

</div>

Hi

I was using the awesome Julia package LayeredLayouts with the below code example:

```julia
using LayeredLayouts, Graphs

tiny_depgraph = SimpleDiGraph(Edge.([
           1 => 2;
           2 .=> [4, 5, 6];
           3 .=> [2, 4, 5, 6, 7, 8];
           4 .=> [9, 10, 11];
       ]))

xs, ys, paths = solve_positions(Zarate(), tiny_depgraph);

```

Unfortunately, the solve\_positions call crashes the Julia process

```julia
julia(56536,0x104578580) malloc: *** error for object 0xe00000000000000: pointer being freed was not allocated
julia(56536,0x104578580) malloc: *** set a breakpoint in malloc_error_break to debug

signal (6): Abort trap: 6
__pthread_kill at /usr/lib/system/libsystem_kernel.dylib (unknown line)
Allocations: 70447737 (Pool: 70431292; Big: 16445); GC: 29

```

Please note I am on a M1 mac. this only seems to happen with the Julia release for M series processors, the x86 build seems to work fine. I suspect this is a language related error  
**Julia version** : 1.8.4  
**LayeredLayouts** v0.2.5

thanks for your help in this

> <https://github.com/oxinabox/LayeredLayouts.jl/issues/27>
>
> hi 
> 
> this is quite an awesome package. I am facing the below issue with the co…de:
> 
> \`\`\`julia
> using LayeredLayouts, Graphs
> 
> tiny\_depgraph = SimpleDiGraph(Edge.(\[
> 1 =\> 2;
> 2 .=\> \[4, 5, 6\];
> 3 .=\> \[2, 4, 5, 6, 7, 8\];
> 4 .=\> \[9, 10, 11\];
> \]))
> 
> xs, ys, paths = solve\_positions(Zarate(), tiny\_depgraph);
> 
> \`\`\`
> 
> 
> \`\`\`
> julia(56536,0x104578580) malloc: \*\*\* error for object 0xe00000000000000: pointer being freed was not allocated
> julia(56536,0x104578580) malloc: \*\*\* set a breakpoint in malloc\_error\_break to debug
> 
> signal (6): Abort trap: 6
> \_\_pthread\_kill at /usr/lib/system/libsystem\_kernel.dylib (unknown line)
> Allocations: 70447737 (Pool: 70431292; Big: 16445); GC: 29
> 
> \`\`\`
> Julia process crashes after this. I am on a M1 Mac. 
> \*\*Julia version\*\*: 1.8.3
> \[f4a74d36\] \*\*LayeredLayouts\*\* v0.2.5
> 
> thanks for your help in this
> 
> ta!

ta!
