Error message related to the GMT.jl package

My code was running perfectly fine on my Intel-based MacBook Pro, but it gave me the error below while running on Apple Silicon chips. Does anyone know what is going on? Many thanks.


[6464] signal (11.2): Segmentation fault: 11
in expression starting at /Users/name/folder//A12a1_plotting_GMT_historical.jl:34
jl_gc_pool_alloc_inner at /Applications/Julia-1.9.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.9.dylib (unknown line)
jl_gc_alloc at /Applications/Julia-1.9.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.9.dylib (unknown line)
_new_array_ at /Applications/Julia-1.9.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.9.dylib (unknown line)
_new_array at /Applications/Julia-1.9.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.9.dylib (unknown line)
ijl_alloc_array_1d at /Applications/Julia-1.9.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.9.dylib (unknown line)
Array at ./boot.jl:477 [inlined]
InstructionStream at ./compiler/ssair/ir.jl:197
NewNodeStream at ./compiler/ssair/ir.jl:278 [inlined]
NewNodeStream at ./compiler/ssair/ir.jl:278 [inlined]
IncrementalCompact at ./compiler/ssair/ir.jl:641
IncrementalCompact at ./compiler/ssair/ir.jl:596 [inlined]
sroa_pass! at ./compiler/ssair/passes.jl:846
run_passes at ./compiler/optimize.jl:539
run_passes at ./compiler/optimize.jl:554 [inlined]
optimize at ./compiler/optimize.jl:503 [inlined]
_typeinf at ./compiler/typeinfer.jl:273
typeinf at ./compiler/typeinfer.jl:216
abstract_call_method_with_const_args at ./compiler/abstractinterpretation.jl:1008
abstract_call_method_with_const_args at ./compiler/abstractinterpretation.jl:954
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:160
abstract_call_known at ./compiler/abstractinterpretation.jl:1949
abstract_call_known at ./compiler/abstractinterpretation.jl:1850
abstract_iteration at ./compiler/abstractinterpretation.jl:1434
precise_container_type at ./compiler/abstractinterpretation.jl:1388
abstract_apply at ./compiler/abstractinterpretation.jl:1508
abstract_call_known at ./compiler/abstractinterpretation.jl:1855
abstract_call at ./compiler/abstractinterpretation.jl:2020
abstract_call at ./compiler/abstractinterpretation.jl:1999
abstract_eval_statement_expr at ./compiler/abstractinterpretation.jl:2183
abstract_eval_statement at ./compiler/abstractinterpretation.jl:2396
abstract_eval_basic_statement at ./compiler/abstractinterpretation.jl:2682
typeinf_local at ./compiler/abstractinterpretation.jl:2867
typeinf_nocycle at ./compiler/abstractinterpretation.jl:2955
_typeinf at ./compiler/typeinfer.jl:246
typeinf at ./compiler/typeinfer.jl:216
typeinf_edge at ./compiler/typeinfer.jl:932
abstract_call_method at ./compiler/abstractinterpretation.jl:611
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:152
abstract_call_known at ./compiler/abstractinterpretation.jl:1949
abstract_call at ./compiler/abstractinterpretation.jl:2020
abstract_call at ./compiler/abstractinterpretation.jl:1999
abstract_eval_statement_expr at ./compiler/abstractinterpretation.jl:2183
abstract_eval_statement at ./compiler/abstractinterpretation.jl:2396
abstract_eval_basic_statement at ./compiler/abstractinterpretation.jl:2682
typeinf_local at ./compiler/abstractinterpretation.jl:2867
typeinf_nocycle at ./compiler/abstractinterpretation.jl:2955
_typeinf at ./compiler/typeinfer.jl:246
typeinf at ./compiler/typeinfer.jl:216
typeinf_edge at ./compiler/typeinfer.jl:932
abstract_call_method at ./compiler/abstractinterpretation.jl:611
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:152
abstract_call_known at ./compiler/abstractinterpretation.jl:1949
abstract_call at ./compiler/abstractinterpretation.jl:2020
abstract_call at ./compiler/abstractinterpretation.jl:1999
abstract_eval_statement_expr at ./compiler/abstractinterpretation.jl:2183
abstract_eval_statement at ./compiler/abstractinterpretation.jl:2396
abstract_eval_basic_statement at ./compiler/abstractinterpretation.jl:2682
typeinf_local at ./compiler/abstractinterpretation.jl:2867
typeinf_nocycle at ./compiler/abstractinterpretation.jl:2955
_typeinf at ./compiler/typeinfer.jl:246
typeinf at ./compiler/typeinfer.jl:216
typeinf_edge at ./compiler/typeinfer.jl:932
abstract_call_method at ./compiler/abstractinterpretation.jl:611
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:152
abstract_call_known at ./compiler/abstractinterpretation.jl:1949
abstract_call at ./compiler/abstractinterpretation.jl:2020
abstract_call at ./compiler/abstractinterpretation.jl:1999
abstract_eval_statement_expr at ./compiler/abstractinterpretation.jl:2183
abstract_eval_statement at ./compiler/abstractinterpretation.jl:2396
abstract_eval_basic_statement at ./compiler/abstractinterpretation.jl:2682
typeinf_local at ./compiler/abstractinterpretation.jl:2867
typeinf_nocycle at ./compiler/abstractinterpretation.jl:2955
_typeinf at ./compiler/typeinfer.jl:246
typeinf at ./compiler/typeinfer.jl:216
typeinf_edge at ./compiler/typeinfer.jl:932
abstract_call_method at ./compiler/abstractinterpretation.jl:611
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:152
abstract_call_known at ./compiler/abstractinterpretation.jl:1949
abstract_call at ./compiler/abstractinterpretation.jl:2020
abstract_call at ./compiler/abstractinterpretation.jl:1999
abstract_eval_statement_expr at ./compiler/abstractinterpretation.jl:2183
abstract_eval_statement at ./compiler/abstractinterpretation.jl:2396
abstract_eval_basic_statement at ./compiler/abstractinterpretation.jl:2682
typeinf_local at ./compiler/abstractinterpretation.jl:2867
typeinf_nocycle at ./compiler/abstractinterpretation.jl:2955
_typeinf at ./compiler/typeinfer.jl:246
typeinf at ./compiler/typeinfer.jl:216
typeinf_ext at ./compiler/typeinfer.jl:1057
typeinf_ext_toplevel at ./compiler/typeinfer.jl:1090
typeinf_ext_toplevel at ./compiler/typeinfer.jl:1086
jfptr_typeinf_ext_toplevel_14861 at /Applications/Julia-1.9.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
ijl_apply_generic at /Applications/Julia-1.9.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.9.dylib (unknown line)
jl_type_infer at /Applications/Julia-1.9.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.9.dylib (unknown line)
jl_generate_fptr_impl at /Applications/Julia-1.9.app/Contents/Resources/julia/lib/julia/libjulia-codegen.1.9.dylib (unknown line)
jl_compile_method_internal at /Applications/Julia-1.9.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.9.dylib (unknown line)
ijl_apply_generic at /Applications/Julia-1.9.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.9.dylib (unknown line)
top-level scope at /Users/name/folder//A12a1_plotting_GMT_historical.jl:158
jl_toplevel_eval_flex at /Applications/Julia-1.9.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.9.dylib (unknown line)
jl_toplevel_eval_flex at /Applications/Julia-1.9.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.9.dylib (unknown line)
ijl_toplevel_eval_in at /Applications/Julia-1.9.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.9.dylib (unknown line)
eval at ./boot.jl:370 [inlined]
include_string at ./loading.jl:1903
ijl_apply_generic at /Applications/Julia-1.9.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.9.dylib (unknown line)
_include at ./loading.jl:1963
include at ./Base.jl:457
jfptr_include_29526 at /Applications/Julia-1.9.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
ijl_apply_generic at /Applications/Julia-1.9.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.9.dylib (unknown line)
exec_options at ./client.jl:307
_start at ./client.jl:522
jfptr__start_51456 at /Applications/Julia-1.9.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
ijl_apply_generic at /Applications/Julia-1.9.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.9.dylib (unknown line)
true_main at /Applications/Julia-1.9.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.9.dylib (unknown line)
jl_repl_entrypoint at /Applications/Julia-1.9.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.9.dylib (unknown line)
Allocations: 21880596 (Pool: 21863805; Big: 16791); GC: 29
zsh: segmentation fault  julia A12a1_plotting_GMT_historical.jl

Here is the line the error message mentioned, i.e., Line 158

 colorbar!(color=cpt2, frame=(xlabel="$(VarN)",),
         par=(FONT_ANNOT_PRIMARY="10p,Times-Roman,black", FONT_LABEL="14p,Times-Roman,black"),
         pos=(anchor=:BC, length=(12.5,0.4), offset=(-0.2,0.6)));

I’m not sure if the issue is due to the change of Processors, or a newer version of Julia, or a newer version of GMT.jl.

Any tips would be much appreciated.