<p dir="auto">I'm not getting stack traces any time a module is loaded with errors. The module compiles fine on its own, but when a call to a method of the module gives an error, the only thing that gets printed is the exception string, but there is no line/stack information.</p>
<p dir="auto">This is with the latest Julia on Win7 32bits, both using JuliaStudio and from the CLI (not the REPL).</p>
<p dir="auto">For example, defining a module MyModule with a function double and calling it from another file:</p>
<hr>
<p dir="auto">MyModule.jl:<br>
module MyModule<br>
export double</p>
<p dir="auto">function double(x::Int8)<br>
x*2+a  # this gives an error because 'a' is undefined<br>
end<br>
end</p>
<hr>
<p dir="auto">Main.jl:<br>
using MyModule<br>
MyModule.double(3)</p>
<hr>
<p dir="auto">Executing MyModule.jl gives no error.</p>
<p dir="auto">Executing Main.jl gives the following error message:<br>
LoadError("path_to_Main.jl/Main.jl",2,ErrorException("a not defined"))</p>
<p dir="auto">This is just a small sample, but with other types of errors and more complicated code the issue remains.</p>
<p dir="auto">With <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="545944133" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/34287" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/34287/hovercard" href="https://github.com/JuliaLang/julia/pull/34287">#34287</a> running <code class="notranslate">]test BitIntegers</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia: /home/jeff/src/julia/src/cgutils.cpp:514: unsigned int convert_struct_offset(llvm::Type*, unsigned int): Assertion `SL-&gt;getElementOffset(idx) == byte_offset' failed.

signal (6): Aborted
in expression starting at /home/jeff/.julia/packages/BitIntegers/4QmBA/test/runtests.jl:333
gsignal at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
abort at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x7f5b6a6b2bf5)
__assert_fail at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
convert_struct_offset at /home/jeff/src/julia/src/cgutils.cpp:514
convert_struct_offset at /home/jeff/src/julia/src/cgutils.cpp:527 [inlined]
convert_struct_offset at /home/jeff/src/julia/src/cgutils.cpp:520 [inlined]
emit_struct_gep at /home/jeff/src/julia/src/cgutils.cpp:525
emit_getfield_knownidx at /home/jeff/src/julia/src/cgutils.cpp:1672
emit_builtin_call at /home/jeff/src/julia/src/codegen.cpp:2872"><pre class="notranslate"><code class="notranslate">julia: /home/jeff/src/julia/src/cgutils.cpp:514: unsigned int convert_struct_offset(llvm::Type*, unsigned int): Assertion `SL-&gt;getElementOffset(idx) == byte_offset' failed.

signal (6): Aborted
in expression starting at /home/jeff/.julia/packages/BitIntegers/4QmBA/test/runtests.jl:333
gsignal at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
abort at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x7f5b6a6b2bf5)
__assert_fail at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
convert_struct_offset at /home/jeff/src/julia/src/cgutils.cpp:514
convert_struct_offset at /home/jeff/src/julia/src/cgutils.cpp:527 [inlined]
convert_struct_offset at /home/jeff/src/julia/src/cgutils.cpp:520 [inlined]
emit_struct_gep at /home/jeff/src/julia/src/cgutils.cpp:525
emit_getfield_knownidx at /home/jeff/src/julia/src/cgutils.cpp:1672
emit_builtin_call at /home/jeff/src/julia/src/codegen.cpp:2872
</code></pre></div>