# Get this exit code -1073741819 / 3221225477 every couple of runs in the MWE

**URL:** https://discourse.julialang.org/t/get-this-exit-code-1073741819-3221225477-every-couple-of-runs-in-the-mwe/90288
**Category:** General Usage
**Created:** [November 15, 2022, 1:06pm UTC](https://discourse.julialang.org/t/get-this-exit-code-1073741819-3221225477-every-couple-of-runs-in-the-mwe/90288 "2022-11-15T13:06:58Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Impressium](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/impressium/32/19575_2.png) [@Impressium](https://discourse.julialang.org/u/Impressium)
#### Post date: [November 15, 2022, 1:06pm UTC](https://discourse.julialang.org/t/get-this-exit-code-1073741819-3221225477-every-couple-of-runs-in-the-mwe/90288/1 "2022-11-15T13:06:58Z")

</div>

Hi all 🙂

I’ve got a script that runs the whole day, streaming data and calculating stuff every second. But around 3 hours the scripts suddenly stops with no error message, no output. I only got an error code `-1073741819`. (Julia 1.6.1)

What does that mean and how can I see the error?

Thanks a lot

Edit: Just get this error every 100th time. Created a MWE here:  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/7/5/7563223cc6d3ecd064d6cda687b82c83244c1063.png)

> **[Google Drive: Sign-in](https://accounts.google.com/v3/signin/identifier?continue=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F1-TqfAfEF7vnG5EH1ZLJ7n-5oh-VY4LsX%2Fview%3Fusp%3Ddrivesdk&followup=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F1-TqfAfEF7vnG5EH1ZLJ7n-5oh-VY4LsX%2Fview%3Fusp%3Ddrivesdk&ifkv=AYZoVhcAmz9vhqsWKAQsmzZ19MjiUNprcK8yx4Hz927IXgFash7tRfXO2uyjXv-aiz3R2gZNTcOUWg&osid=1&passive=1209600&service=wise&flowName=GlifWebSignIn&flowEntry=ServiceLogin&dsh=S-1257502821%3A1695884401377848&theme=glif)**
>
> Access Google Drive with a Google account (for personal use) or Google Workspace account (for business use).

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [November 15, 2022, 1:29pm UTC](https://discourse.julialang.org/t/get-this-exit-code-1073741819-3221225477-every-couple-of-runs-in-the-mwe/90288/2 "2022-11-15T13:29:56Z")

</div>

```julia
julia> -1073741819 % UInt32
0xc0000005

```

Looking at [[MS-ERREF]: NTSTATUS Values | Microsoft Learn](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/596a1078-e883-4972-9bbc-49e60bebca55), this is a “STATUS\_ACCESS\_VIOLATION” so something might have tried access memory it wasn’t allowed.

---

<div class="post-metadata">

### Author: ![lklein](https://avatars.discourse-cdn.com/v4/letter/l/839c29/32.png) [@lklein](https://discourse.julialang.org/u/lklein)
#### Post date: [November 16, 2022, 2:36pm UTC](https://discourse.julialang.org/t/get-this-exit-code-1073741819-3221225477-every-couple-of-runs-in-the-mwe/90288/3 "2022-11-16T14:36:42Z")

</div>

Thanks for your answer!  
I am working on the same problem and have a follow-up question:  
Are there any ways to find out where exactly in the code this problem happens?  
Maybe a tool to find unsafe memory access?

All my usual techniques to find bugs have failed me on this issue as the problem only happens very sporadically and unpredictably and no error logs/stacktraces are printed as the violation crashes the whole program. The only thing to go off of is the exit code.

Thanks in advance!

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [November 16, 2022, 3:17pm UTC](https://discourse.julialang.org/t/get-this-exit-code-1073741819-3221225477-every-couple-of-runs-in-the-mwe/90288/4 "2022-11-16T15:17:34Z")

</div>

Maybe it is possible to run under a debugger.

---

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [November 16, 2022, 5:01pm UTC](https://discourse.julialang.org/t/get-this-exit-code-1073741819-3221225477-every-couple-of-runs-in-the-mwe/90288/5 "2022-11-16T17:01:05Z")

</div>

Is this on Windows? Is the Julia code calling functions from a C# shared library?

---

<div class="post-metadata">

### Author: ![Impressium](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/impressium/32/19575_2.png) [@Impressium](https://discourse.julialang.org/u/Impressium)
#### Post date: [November 16, 2022, 11:04pm UTC](https://discourse.julialang.org/t/get-this-exit-code-1073741819-3221225477-every-couple-of-runs-in-the-mwe/90288/6 "2022-11-16T23:04:03Z")

</div>

It’s on windows.

A Julia process is started via `System.Diagnostics.Process`.

---

<div class="post-metadata">

### Author: ![Impressium](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/impressium/32/19575_2.png) [@Impressium](https://discourse.julialang.org/u/Impressium)
#### Post date: [November 16, 2022, 11:04pm UTC](https://discourse.julialang.org/t/get-this-exit-code-1073741819-3221225477-every-couple-of-runs-in-the-mwe/90288/7 "2022-11-16T23:04:40Z")

</div>

Which debugger are you recommending?

---

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [November 16, 2022, 11:20pm UTC](https://discourse.julialang.org/t/get-this-exit-code-1073741819-3221225477-every-couple-of-runs-in-the-mwe/90288/8 "2022-11-16T23:20:00Z")

</div>

> [@Impressium](#):
>
> A Julia process is started via `System.Diagnostics.Process`.

Hmm, don’t know about that but in VisualStudio (really good debugger) if in

 ![image](https://global.discourse-cdn.com/julialang/original/3X/f/f/fff5d2d717be48a535edb403ac5f3d66b8c0ceab.png)  
the window that appears when you select the above you can find the process that runs Julia, then select it. If the C# was build in debug mode any crash will lead directly to the crashing line.

Well, to e honest I’m extrapolating from my experience with C dlls that are accessed via `ccall`. There, I only have to attach to Julia process itself, lunch the code and voilá.  
And while I’m at this I have to say that this experience degraded a lot since a couple years because now steeping in the debugger takes almost 20 seconds for each step. One more reason to dream with a Julia version compiled natively on Windows.

---

<div class="post-metadata">

### Author: ![Impressium](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/impressium/32/19575_2.png) [@Impressium](https://discourse.julialang.org/u/Impressium)
#### Post date: [November 21, 2022, 11:01am UTC](https://discourse.julialang.org/t/get-this-exit-code-1073741819-3221225477-every-couple-of-runs-in-the-mwe/90288/9 "2022-11-21T11:01:25Z")

</div>

I narrowed down the error and got now a MWE. It happens like 1% of the time. I use 1.6.1 on Windows 10. I don’t know how test it further or debug.  
I can’t add a zip here so I put it on my google drive.

> **[Google Drive: Sign-in](https://accounts.google.com/v3/signin/identifier?dsh=S84537732%3A1669028442048738&continue=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F1-TqfAfEF7vnG5EH1ZLJ7n-5oh-VY4LsX%2Fview%3Fusp%3Ddrivesdk&followup=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F1-TqfAfEF7vnG5EH1ZLJ7n-5oh-VY4LsX%2Fview%3Fusp%3Ddrivesdk&passive=1209600&service=wise&flowName=GlifWebSignIn&flowEntry=ServiceLogin&ifkv=ARgdvAtt8YRrdeNR7zRSZAQ4obC2h4Xk960WYXrTAP7J31eE_R3IzsTsyGnQiFj3TEMrGp07U1KJ)**
>
> Access Google Drive with a Google account (for personal use) or Google Workspace account (for business use).

ty

---

<div class="post-metadata">

### Author: ![Impressium](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/impressium/32/19575_2.png) [@Impressium](https://discourse.julialang.org/u/Impressium)
#### Post date: [November 25, 2022, 10:11am UTC](https://discourse.julialang.org/t/get-this-exit-code-1073741819-3221225477-every-couple-of-runs-in-the-mwe/90288/11 "2022-11-25T10:11:48Z")

</div>

> <https://github.com/JuliaLang/julia/issues/47649>
>
> https://discourse.julialang.org/t/get-this-exit-code-1073741819-3221225477-every…-couple-of-runs-in-the-mwe/90288
