liquidsoap icon indicating copy to clipboard operation
liquidsoap copied to clipboard

Initialization phases needs some cleanup

Open toots opened this issue 1 year ago • 0 comments

I'm seeing this:

% ./liquidsoap 'output.ao(fallible=true,playlist("...")) log.level.set(4)'
Unknown position:

Error -1: Exception raised: File "src/core/stream/frame_settings.ml", line 123, characters 6-12: Assertion failed
Raised at Frame_settings.delayed_conf.(fun) in file "src/core/stream/frame_settings.ml", line 123, characters 6-30
Called from CamlinternalLazy.force_lazy_block in file "camlinternalLazy.ml", line 31, characters 17-27
Re-raised at CamlinternalLazy.force_lazy_block in file "camlinternalLazy.ml", line 36, characters 4-11
Called from Frame_settings.size.(fun) in file "src/core/stream/frame_settings.ml", line 207, characters 18-30
Called from CamlinternalLazy.force_lazy_block in file "camlinternalLazy.ml", line 31, characters 17-27
Re-raised at CamlinternalLazy.force_lazy_block in file "camlinternalLazy.ml", line 36, characters 4-11
Called from AFrame.size in file "src/core/stream/aFrame.ml", line 40, characters 18-35
Called from Ao_out.output in file "src/core/outputs/ao_out.ml", line 35, characters 26-40
Called from Ao_out.(fun) in file "src/core/outputs/ao_out.ml", line 163, characters 7-142
Called from Lang_source.add_operator.(fun).f in file "src/core/lang_source.ml", line 264, characters 41-46
Called from Liquidsoap_lang__Evaluation.apply.f in file "src/lang/evaluation.ml", line 302, characters 8-12
Called from Liquidsoap_lang__Evaluation.eval_toplevel in file "src/lang/evaluation.ml", line 480, characters 16-22
Called from Tutils.finalize in file "src/core/tools/tutils.ml", line 105, characters 12-16
Re-raised at Tutils.finalize in file "src/core/tools/tutils.ml", line 111, characters 4-38
Called from Liquidsoap_lang__Runtime.type_and_run in file "src/lang/runtime.ml", line 30, characters 4-521
Called from Liquidsoap_lang__Runtime.report in file "src/lang/runtime.ml", line 206, characters 12-33

Looking at the code, it looks like we're still not clearly separating the various initialization phases. There's a function to type_and_run while we are supposed to flip the Frame_settings.lazy_config_eval setting to true between the two phases.

We've made progress on this front with the Lifecycle module but it appears that we still need some solid cleanup on this front.

toots avatar Aug 05 '22 20:08 toots