Closed sogorman closed 8 months ago
Hi, I've finally managed to reproduce the issue, it is present only if :excl_init
option is used.
I'll try to look at it. Anyways, do you have some particular reason, why do you use that option - is it to reset the file capture to the start of the file?
Can confirm that :excl_init
is the issue. Had it in place to mitigate Decklink missing input video on UG startup but let me play with this and see if I can work without the initialization call.
Thanks for the info. Don't worry - if you need that option, I believe that I've just fixed the problem. Builds should be rebuilt in the continuous builds within a half of an hour.
@MartinPulec Thanks. Using UltraGrid 1.8+ (master rev a2d3eb8 built Sep 15 2023 14:14:48)
i can cofirm that launching UG with
/Applications/uv-qt.app/Contents/MacOS/uv -t switcher:excl_init -s embedded -t testcard -s embedded -t file:test1.mov:loop -s embedded -t decklink:connection=HDMI:mode=Hi59:codec=UYVY:device=0 -c libavcodec:codec=H.265:encoder=hevc_videotoolbox:bitrate=3.5M:subsampling=420:gop=20 --audio-codec MP3:sample_rate=48000:bitrate=256K --audio-capture-format channels=2 -f V:rs:150:200 -f A:rs:150:200 -m 1300 --param errors-fatal
No longer crashes when switching from switcher 1 (test pattern) to 2 (file:loop). That being said, if you switch a few times between 1 and 2 UG will eventually crash.
uv-real(7709,0x309ddb000) malloc: Incorrect checksum for freed object 0x7f806288a400: probably modified after being freed.
Corrupt value: 0x0
[lavc] Setting thread count to 1, type: (other)
uv-real(7709,0x309ddb000) malloc: *** set a breakpoint in malloc_error_break to debug
Backtrace:
0 uv-real 0x000000010260d98a crash_signal_handler + 154
1 libsystem_platform.dylib 0x00007ff81c6a85ed _sigtramp + 29
2 ??? 0x0000000000000000 0x0 + 0
3 libsystem_c.dylib 0x00007ff81c5a1b45 abort + 123
4 libsystem_malloc.dylib 0x00007ff81c4b8752 malloc_vreport + 888
5 libsystem_malloc.dylib 0x00007ff81c4cda08 malloc_zone_error + 183
6 libsystem_malloc.dylib 0x00007ff81c4b17a1 small_free_list_remove_ptr_no_clear + 1017
7 libsystem_malloc.dylib 0x00007ff81c4ac9e6 small_malloc_from_free_list + 357
8 libsystem_malloc.dylib 0x00007ff81c4ac21b small_malloc_should_clear + 241
9 libsystem_malloc.dylib 0x00007ff81c4ac035 szone_malloc_should_clear + 109
10 libmp3lame.0.dylib 0x000000011706b80e lame_encode_buffer_template + 191
11 libmp3lame.0.dylib 0x000000011706bc17 lame_encode_buffer_int + 24
12 libavcodec.60.3.100.dylib 0x00000001148a8b5d av_jni_get_java_vm + 95164
UltraGrid has crashed (Abort trap).
Please send a bug report to address ultragrid-dev@cesnet.cz.
You may find some tips how to report bugs in file doc/REPORTING_BUGS.md distributed with UltraGrid
(or available online at https://github.com/CESNET/UltraGrid/blob/master/doc/REPORTING-BUGS.md).
Had it in place to mitigate Decklink missing input video on UG startup but let me play with this and see if I can work without the initialization call.
I have to say that I don't understand how you mean "if I can work without the initialization call". Anyways, for this use-case, I believe that _exclinit is may be even counter-productive, because you are enforcing deinit the device switched from and initialization the device, which is switched to, with every switch. So you'll definitely don't mask some initialization delay.
The audio problem - I think that I am able to reproduce. I'll create a separate issue when I find out more.
assuming that this is no longer an issue because there is no further input
I would say this should be re-opened, as I have the exact same issue of it crashing.
Is this the crash that you mentioned in #365? Or is it a separate issue? We will need more info in that case - ultragrid version, the command used, the terminal output. I tried on the recent continuous version and was unable to reproduce the issue.
Hi @TheSashmo,
I would say this should be re-opened, as I have the exact same issue of it crashing.
the steps to reproduce this issue was actually (eg. with UG 1.8.4):
ffmpeg -t 1 -f lavfi -i testsrc in.mp4
uv -t switcher -t file:in.mp4
If this is the case, feel free to reopen the issue, otherwise please open a new issue if needed.
When running the most recent nightly build UV crashes when switching to a file playback using the switcher.
Example:
When executing that command the file will start encoding without issue, you can switch to sources 2, and 3 a couple of times but when switching back to source 1 UV crashes.