Weird Exception access violation - seems related to @warn

I am getting the below error with the full error message below. I do not have an easy MWE to reproduce it. I get it for one particular day of data. I am using Version 1.7.1 (2021-12-22)

It seems to throw at the warning of line 73 here HighFrequencyCovariance.jl/23_covariance_preaveragingHY.jl at main · s-baumann/HighFrequencyCovariance.jl · GitHub

If I do one of the following two things then the whole thing runs successfully without error:

  • Remove this error message entirely.
  • Put in a second error message before line 78 saying something like:

@warn string(“This is a warning”)

The actual error message I get is below:

┌ Warning: We are going to drop [:SGDIDXSGD] as we do not have enough ticks with the preaveraging method. We will then proceeed with the estimation.
└ @ HighFrequencyCovariance C:\Dropbox\Julia_Library\HighFrequencyCovariance.jl\src\23_covariance_preaveragingHY.jl:73

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x2654d60 – gc_try_setmark at /cygdrive/c/buildbot/worker/package_win64/build/src\gc.c:1711 [inlined]
gc_mark_loop at /cygdrive/c/buildbot/worker/package_win64/build/src\gc.c:2303
in expression starting at C:\Dropbox\Stuart\Papers\are_high_freq_techniques_worth_it\simulations_and_backtest\1a_next_day_accuracy.jl:191
gc_try_setmark at /cygdrive/c/buildbot/worker/package_win64/build/src\gc.c:1711 [inlined]
gc_mark_loop at /cygdrive/c/buildbot/worker/package_win64/build/src\gc.c:2303
jl_gc_collect at /cygdrive/c/buildbot/worker/package_win64/build/src\gc.c:3039
jl_gc_collect at /cygdrive/c/buildbot/worker/package_win64/build/src\gc.c:3248
maybe_collect at /cygdrive/c/buildbot/worker/package_win64/build/src\gc.c:882 [inlined]
jl_gc_pool_alloc at /cygdrive/c/buildbot/worker/package_win64/build/src\gc.c:1209
jl_gc_alloc
at /cygdrive/c/buildbot/worker/package_win64/build/src\julia_internal.h:339 [inlined]
new_array at /cygdrive/c/buildbot/worker/package_win64/build/src\array.c:137 [inlined]
_new_array at /cygdrive/c/buildbot/worker/package_win64/build/src\array.c:193 [inlined]
jl_alloc_array_1d at /cygdrive/c/buildbot/worker/package_win64/build/src\array.c:441
Array at .\boot.jl:457 [inlined]
Array at .\boot.jl:466 [inlined]
similar at .\array.jl:378 [inlined]
similar at .\abstractarray.jl:783 [inlined]
getindex at .\array.jl:869
unknown function (ip: 000000008a04db14)
get_preaveraged_prices at C:\Dropbox\Julia_Library\HighFrequencyCovariance.jl\src\23_covariance_preaveragingHY.jl:6
_broadcast_getindex_evalf at .\broadcast.jl:670 [inlined]
_broadcast_getindex at .\broadcast.jl:643 [inlined]
getindex at .\broadcast.jl:597 [inlined]
copyto_nonleaf! at .\broadcast.jl:1055
unknown function (ip: 000000008a04ff04)
copy at .\broadcast.jl:907 [inlined]
materialize at .\broadcast.jl:860 [inlined]
#preaveraged_covariance#73 at C:\Dropbox\Julia_Library\HighFrequencyCovariance.jl\src\23_covariance_preaveragingHY.jl:79
unknown function (ip: 000000008a04d60e)
preaveraged_covariance##kw at C:\Dropbox\Julia_Library\HighFrequencyCovariance.jl\src\23_covariance_preaveragingHY.jl:65
preaveraged_covariance##kw at C:\Dropbox\Julia_Library\HighFrequencyCovariance.jl\src\23_covariance_preaveragingHY.jl:65
unknown function (ip: 000000008a04346d)
jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1788 [inlined]
do_call at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:126
eval_value at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:215
eval_stmt_value at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:166 [inlined]
eval_body at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:583
jl_interpret_toplevel_thunk at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:731
jl_toplevel_eval_flex at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:885
jl_toplevel_eval_flex at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:830
jl_toplevel_eval at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:894 [inlined]
jl_toplevel_eval_in at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:944
eval at .\boot.jl:373 [inlined]
include_string at .\loading.jl:1196
include_string at .\loading.jl:1206 [inlined]
include_string at C:\Users\dr.julia\packages\CodeTools\VsjEq\src\eval.jl:30 [inlined]
#204 at C:\Users\dr.julia\packages\Atom\wlPiw\src\eval.jl:111
withpath at C:\Users\dr.julia\packages\CodeTools\VsjEq\src\utils.jl:30
unknown function (ip: 000000005f47b304)
withpath at C:\Users\dr.julia\packages\Atom\wlPiw\src\eval.jl:9
#203 at C:\Users\dr.julia\packages\Atom\wlPiw\src\eval.jl:110
unknown function (ip: 000000005f47aa53)
with_logstate at .\logging.jl:511
with_logger at .\logging.jl:623 [inlined]
#202 at C:\Users\dr.julia\packages\Atom\wlPiw\src\eval.jl:109 [inlined]
hideprompt at C:\Users\dr.julia\packages\Atom\wlPiw\src\repl.jl:140
macro expansion at C:\Users\dr.julia\packages\Atom\wlPiw\src\eval.jl:108 [inlined]
macro expansion at C:\Users\dr.julia\packages\Media\ItEPc\src\dynamic.jl:24 [inlined]
eval at C:\Users\dr.julia\packages\Atom\wlPiw\src\eval.jl:105
unknown function (ip: 000000005f46cea3)
jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1788 [inlined]
do_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:713
macro expansion at C:\Users\dr.julia\packages\Atom\wlPiw\src\eval.jl:39 [inlined]
#188 at .\task.jl:423
unknown function (ip: 000000005f3fd0d3)
jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1788 [inlined]
start_task at /cygdrive/c/buildbot/worker/package_win64/build/src\task.c:877
Allocations: 178005284 (Pool: 177967301; Big: 37983); GC: 139