# \`StackOverflowError\` with Revise.jl

**URL:** https://discourse.julialang.org/t/stackoverflowerror-with-revise-jl/23947
**Category:** General Usage
**Created:** [May 7, 2019, 6:41am UTC](https://discourse.julialang.org/t/stackoverflowerror-with-revise-jl/23947 "2019-05-07T06:41:08Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![asprionj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/asprionj/32/6856_2.png) [@asprionj](https://discourse.julialang.org/u/asprionj)
#### Post date: [May 7, 2019, 6:41am UTC](https://discourse.julialang.org/t/stackoverflowerror-with-revise-jl/23947/1 "2019-05-07T06:41:08Z")

</div>

Hi everyone, I started to use Revise some weeks ago, really awesome to get a faster dev cycle (without julia restarts and re-precompiles all the time)! The problem now is that I always get this warning when working on my module:

```julia
┌ Warning: Failed to revise /path/to/some/file.jl: StackOverflowError()

```

Any ideas why this happens?  
Is there a way to find out what exactly is going wrong? The warning message is not very helpful…

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [May 7, 2019, 6:48am UTC](https://discourse.julialang.org/t/stackoverflowerror-with-revise-jl/23947/2 "2019-05-07T06:48:13Z")

</div>

> [@asprionj](#):
>
> Is there a way to find out what exactly is going wrong?

> **[Debugging Revise · Revise.jl](https://timholy.github.io/Revise.jl/stable/debugging/)**
>
> Documentation for Revise.jl.

---

<div class="post-metadata">

### Author: ![asprionj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/asprionj/32/6856_2.png) [@asprionj](https://discourse.julialang.org/u/asprionj)
#### Post date: [May 7, 2019, 7:13am UTC](https://discourse.julialang.org/t/stackoverflowerror-with-revise-jl/23947/3 "2019-05-07T07:13:59Z")

</div>

Thanks; I tried to follow the [Logging by default](https://timholy.github.io/Revise.jl/stable/debugging/#Logging-by-default-1) instructions, so I put this in my `startup.jl`:

```julia
atreplinit() do repl
    try
        @eval using Revise
        @async Revise.wait_steal_repl_backend()

        # Turn on logging
        @eval Revise.debug_logger()
    catch
        @warn "Error activating Revise.jl."
    end
end

```

The warning is not shown, so everything seems to work fine. Is this the correct way to enable logging everything?

When I trigger a revision on my module by modifying a file, I get the `StackOverflowError`-warning but the `logs` field of the log obtained by `Revise.debug_logger()` is empty…

---

<div class="post-metadata">

### Author: ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)
#### Post date: [May 7, 2019, 8:19am UTC](https://discourse.julialang.org/t/stackoverflowerror-with-revise-jl/23947/4 "2019-05-07T08:19:27Z")

</div>

I’ve not seen that before. Is that really the only info it prints? `┌` is generally an indication that more follows. (It’s a “vertical bracket opener.”)

If you can’t figure it out on your own, please file a Revise issue with a minimal working example demonstrating the error.

---

<div class="post-metadata">

### Author: ![asprionj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/asprionj/32/6856_2.png) [@asprionj](https://discourse.julialang.org/u/asprionj)
#### Post date: [May 7, 2019, 8:26am UTC](https://discourse.julialang.org/t/stackoverflowerror-with-revise-jl/23947/5 "2019-05-07T08:26:08Z")

</div>

Sorry, didn’t copy the entire message (and I’m actually on Windows right now):

```julia
┌ Warning: Failed to revise C:\path\to\some\file.jl: StackOverflowError()
└ @ Revise C:\path\to\.julia\packages\Revise\RW8TD\src\Revise.jl:546

```

It’s funny, it worked for 2-3 times during the last 1-2 hours, now the error is here again…  
Coming up with a MWE will be very hard since it probably has something to do with the structure and/or contents of my modules…?

---

<div class="post-metadata">

### Author: ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)
#### Post date: [May 7, 2019, 8:30am UTC](https://discourse.julialang.org/t/stackoverflowerror-with-revise-jl/23947/6 "2019-05-07T08:30:30Z")

</div>

Then your best bet is to `dev Revise` and modify it something like this:

```diff
$ git diff src/Revise.jl
diff --git a/src/Revise.jl b/src/Revise.jl
index 49f670b..af69404 100644
--- a/src/Revise.jl
+++ b/src/Revise.jl
@@ -526,7 +526,7 @@ function revise()
             push!(mexsnews, handle_deletions(pkgdata, file)[1])
             push!(finished, (pkgdata, file))
         catch err
- push!(revision_errors, (basedir(pkgdata), file, err))
+ push!(revision_errors, (basedir(pkgdata), file, err, stacktrace(catch_backtrace())))
         end
     end
     # Do the evaluation
@@ -537,13 +537,14 @@ function revise()
             eval_new!(mexsnew, fi.modexsigs)
             pkgdata.fileinfos[i] = FileInfo(mexsnew, fi)
         catch err
- push!(revision_errors, (basedir(pkgdata), file, err))
+ push!(revision_errors, (basedir(pkgdata), file, err, stacktrace(catch_backtrace())))
         end
     end
     empty!(revision_queue)
- for (basedir, file, err) in revision_errors
+ for (basedir, file, err, st) in revision_errors
         fullpath = joinpath(basedir, file)
         @warn "Failed to revise $fullpath: $err"
+ display(st)
     end
     tracking_Main_includes[] && queue_includes(Main)
     nothing

```

Then you’ll get the stacktrace that caused the error.
