# Can't run Julia on mid-2012 MacBook Air, macOS 10.14.3: malloc: \*\*\* error for object 0x1079269e8: pointer being freed was not allocated

**URL:** https://discourse.julialang.org/t/cant-run-julia-on-mid-2012-macbook-air-macos-10-14-3-malloc-error-for-object-0x1079269e8-pointer-being-freed-was-not-allocated/20630
**Category:** General Usage
**Created:** [February 10, 2019, 9:55pm UTC](https://discourse.julialang.org/t/cant-run-julia-on-mid-2012-macbook-air-macos-10-14-3-malloc-error-for-object-0x1079269e8-pointer-being-freed-was-not-allocated/20630 "2019-02-10T21:55:32Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![samgreen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/samgreen/32/7042_2.png) [@samgreen](https://discourse.julialang.org/u/samgreen)
#### Post date: [February 10, 2019, 9:55pm UTC](https://discourse.julialang.org/t/cant-run-julia-on-mid-2012-macbook-air-macos-10-14-3-malloc-error-for-object-0x1079269e8-pointer-being-freed-was-not-allocated/20630/1 "2019-02-10T21:55:32Z")

</div>

Any attempt to run Julia (1.0, 1.1, nightly) fails with a malloc error on my [mid-2012 MacBook Air](https://discourse.julialang.org/uploads/short-url/1dvhNGpigUr33ztlXcDG7F74k18.png):

```julia
$ julia
julia(3402,0x10a9c35c0) malloc: *** error for object 0x1079269e8: pointer being freed was not allocated
julia(3402,0x10a9c35c0) malloc: *** set a breakpoint in malloc_error_break to debug
zsh: abort julia
134

```

---

<div class="post-metadata">

### Author: ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)
#### Post date: [February 10, 2019, 9:57pm UTC](https://discourse.julialang.org/t/cant-run-julia-on-mid-2012-macbook-air-macos-10-14-3-malloc-error-for-object-0x1079269e8-pointer-being-freed-was-not-allocated/20630/2 "2019-02-10T21:57:08Z")

</div>

Do you have any antivirus software installed? Or anything in your `~/.julia/config/startup.jl` file?

---

<div class="post-metadata">

### Author: ![samgreen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/samgreen/32/7042_2.png) [@samgreen](https://discourse.julialang.org/u/samgreen)
#### Post date: [February 11, 2019, 12:00am UTC](https://discourse.julialang.org/t/cant-run-julia-on-mid-2012-macbook-air-macos-10-14-3-malloc-error-for-object-0x1079269e8-pointer-being-freed-was-not-allocated/20630/3 "2019-02-11T00:00:21Z")

</div>

I don’t believe so, and no I have no `~/.julia` directory at all.

---

<div class="post-metadata">

### Author: ![Keno](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/keno/32/285_2.png) [@Keno](https://discourse.julialang.org/u/Keno)
#### Post date: [February 11, 2019, 3:19am UTC](https://discourse.julialang.org/t/cant-run-julia-on-mid-2012-macbook-air-macos-10-14-3-malloc-error-for-object-0x1079269e8-pointer-being-freed-was-not-allocated/20630/4 "2019-02-11T03:19:54Z")

</div>

Do you have an antivirus system enabled? There was recently a similar issue with an overactive AV.

---

<div class="post-metadata">

### Author: ![samgreen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/samgreen/32/7042_2.png) [@samgreen](https://discourse.julialang.org/u/samgreen)
#### Post date: [February 11, 2019, 7:35am UTC](https://discourse.julialang.org/t/cant-run-julia-on-mid-2012-macbook-air-macos-10-14-3-malloc-error-for-object-0x1079269e8-pointer-being-freed-was-not-allocated/20630/5 "2019-02-11T07:35:13Z")

</div>

As far as I can tell I don’t have one installed. Just tried reinstalling macOS to no avail.

**Edit:**

Ok `sudo julia` works but not `julia`.

---

<div class="post-metadata">

### Author: ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)
#### Post date: [February 11, 2019, 2:23pm UTC](https://discourse.julialang.org/t/cant-run-julia-on-mid-2012-macbook-air-macos-10-14-3-malloc-error-for-object-0x1079269e8-pointer-being-freed-was-not-allocated/20630/6 "2019-02-11T14:23:39Z")

</div>

Just wondering how to help - how did you set up the `julia` command to run in the Terminal? If you just download and install the Julia app directly, you have to run it by double-clicking the icon, rather than typing `julia` (which doesn’t work until you make it work). So perhaps you can share the command that starts Julia - perhaps that’s pointing in the wrong place, or something…

---

<div class="post-metadata">

### Author: ![ianfiske](https://avatars.discourse-cdn.com/v4/letter/i/58f4c7/32.png) [@ianfiske](https://discourse.julialang.org/u/ianfiske)
#### Post date: [February 11, 2019, 2:42pm UTC](https://discourse.julialang.org/t/cant-run-julia-on-mid-2012-macbook-air-macos-10-14-3-malloc-error-for-object-0x1079269e8-pointer-being-freed-was-not-allocated/20630/7 "2019-02-11T14:42:46Z")

</div>

Hi there, I’m the user with the overactive antivirus. Even though that may not be the issue for you, the same debugging steps that helped me isolate the issue might help you track down your issue. From [Reporting and analyzing crashes (segfaults) · The Julia Language](https://docs.julialang.org/en/v1/devdocs/backtraces/#Errors-during-Julia-startup-1), do `dtruss -f julia` to get lots of logging info. It can help you see if there are external processes killing your julia process.

---

<div class="post-metadata">

### Author: ![samgreen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/samgreen/32/7042_2.png) [@samgreen](https://discourse.julialang.org/u/samgreen)
#### Post date: [February 11, 2019, 7:36pm UTC](https://discourse.julialang.org/t/cant-run-julia-on-mid-2012-macbook-air-macos-10-14-3-malloc-error-for-object-0x1079269e8-pointer-being-freed-was-not-allocated/20630/8 "2019-02-11T19:36:31Z")

</div>

@cormullion

I’ve tried installing it through `brew cask`, placing the app into `/Applications` or `$HOME/Applications` and running it, symlinking the binary (`Contents/Resources/julia/bin/julia`) into `$HOME/bin` or `/usr/local/bin`. All methods produce the same error.

@ianfiske

I’m unable to run `dtruss -f julia`. I get the error

```julia
$ dtruss -f julia
dtrace: system integrity protection is on, some features will not be available
dtrace: failed to initialize dtrace: DTrace requires additional privileges
1

```

I tried disabling SIP (`csrutil disable` in recovery) but still get the “DTrace requires additional privileges” error, and `julia` still crashes. `sudo dtruss -f julia` works, but as I’ve mentioned, Julia isn’t crashing if I run it with sudo.

---

<div class="post-metadata">

### Author: ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)
#### Post date: [February 11, 2019, 8:14pm UTC](https://discourse.julialang.org/t/cant-run-julia-on-mid-2012-macbook-air-macos-10-14-3-malloc-error-for-object-0x1079269e8-pointer-being-freed-was-not-allocated/20630/9 "2019-02-11T20:14:52Z")

</div>

Ok… So I’ve run out of helpful ideas,… sorry.🙁 I tried installing Julia 1.1 on a mid-2012 MacBook running Mojave as both admin and a non-admin user, and it worked without issues.

---

<div class="post-metadata">

### Author: ![samgreen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/samgreen/32/7042_2.png) [@samgreen](https://discourse.julialang.org/u/samgreen)
#### Post date: [February 12, 2019, 5:43am UTC](https://discourse.julialang.org/t/cant-run-julia-on-mid-2012-macbook-air-macos-10-14-3-malloc-error-for-object-0x1079269e8-pointer-being-freed-was-not-allocated/20630/10 "2019-02-12T05:43:19Z")

</div>

Figured out the problem. Something I installed (but no longer use) had inserted a line into my `.zshrc` setting `DYLD_LIBRARY_PATH`. After removing that it’s working fine.

---

<div class="post-metadata">

### Author: ![ianfiske](https://avatars.discourse-cdn.com/v4/letter/i/58f4c7/32.png) [@ianfiske](https://discourse.julialang.org/u/ianfiske)
#### Post date: [February 12, 2019, 2:10pm UTC](https://discourse.julialang.org/t/cant-run-julia-on-mid-2012-macbook-air-macos-10-14-3-malloc-error-for-object-0x1079269e8-pointer-being-freed-was-not-allocated/20630/11 "2019-02-12T14:10:16Z")

</div>

@samgreen Any chance you can share with us which addition to your DYLD\_LIBRARY\_PATH caused the error? Might help other users and maybe we can put together a debugging tutorial for these types of issues at some point.

---

<div class="post-metadata">

### Author: ![samgreen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/samgreen/32/7042_2.png) [@samgreen](https://discourse.julialang.org/u/samgreen)
#### Post date: [February 26, 2019, 9:16pm UTC](https://discourse.julialang.org/t/cant-run-julia-on-mid-2012-macbook-air-macos-10-14-3-malloc-error-for-object-0x1079269e8-pointer-being-freed-was-not-allocated/20630/12 "2019-02-26T21:16:58Z")

</div>

I think it was a really old version of the Rust plugin for VS Code. At one point it was necessary to add `$RUSTUP_HOME/toolchains/nightly-x86_64-apple-darwin/lib` to `DYLD_LIBRARY_PATH` for RLS to work but AFAIK that’s no longer the case.
