Last working version is 2.8.6. Using 2.8.8 and 2.8.10 I cannot rescan / reload my videos database.
The console output is
MediaElch 2021-05-04 14:54:54.602 DEBUG : [MovieFileSearcher] Directory loaded: "/home/user/Videos/Kinderfilme"
MediaElch 2021-05-04 14:54:58.937 DEBUG : [MovieFileSearcher] Directory loaded: "/home/user/Videos/Filme"
MediaElch 2021-05-04 14:54:58.970 DEBUG : [MovieFileSearcher] Reloading took 29337 ms
Speicherzugriffsfehler
Strace ends with output
write(2, "MediaElch 2021-05-04 15:02:45.81"..., 86MediaElch 2021-05-04 15:02:45.811 DEBUG : [MovieFileSearcher] Reloading took 32217 ms
) = 86
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="\n\0\2\0\v\0\300\6\31\0\v\0\303\6\0\0\0\0\30\0\22\0\0\0\303\6\0\0\v\0\300\6"..., iov_len=52}], 1) = 52
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLIN|POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x7ffd54941cd8, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="(\0\4\0\303\6\0\0\303\6\0\0\310\0011\4", iov_len=16}], 1) = 16
futex(0x7ffd54941ce8, FUTEX_WAIT_PRIVATE, 0, NULL) = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="(\0\4\0\303\6\0\0I\3\340\0\310\0011\4", iov_len=16}], 1) = 16
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="(\0\4\0I\3\340\0\16\0 \1\310\1*\0", iov_len=16}], 1) = 16
futex(0x7ffd54941ce8, FUTEX_WAIT_PRIVATE, 0, NULL) = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="\24\0\6\0\v\0\300\6\263\1\0\0\0\0\0\0\0\0\0\0\0\4\0\0", iov_len=24}], 1) = 24
futex(0x7ffd54942438, FUTEX_WAIT_PRIVATE, 0, NULL) = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="\24\0\6\0\v\0\300\6O\1\0\0\4\0\0\0\0\0\0\0\0\4\0\0", iov_len=24}], 1) = 24
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
recvmsg(6, {msg_namelen=0}, 0) = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)
poll([{fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=10, events=POLLIN}, {fd=12, events=POLLIN}], 4, 0) = 1 ([{fd=5, revents=POLLIN}])
read(5, "I\0\0\0\0\0\0\0", 16) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x7ffd549421a8, FUTEX_WAIT_PRIVATE, 0, NULL) = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x7ffd549421a8, FUTEX_WAIT_PRIVATE, 0, NULL) = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x7ffd549421a8, FUTEX_WAIT_PRIVATE, 0, NULL) = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x7ffd549421a8, FUTEX_WAIT_PRIVATE, 0, NULL) = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x7ffd549421a8, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x7ffd549421a8, FUTEX_WAIT_PRIVATE, 0, NULL) = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x7ffd549421a8, FUTEX_WAIT_PRIVATE, 0, NULL) = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x7ffd549421a8, FUTEX_WAIT_PRIVATE, 0, NULL) = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x7ffd549421a8, FUTEX_WAIT_PRIVATE, 0, NULL) = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x7ffd549421a8, FUTEX_WAIT_PRIVATE, 0, NULL) = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x7ffd549421a8, FUTEX_WAIT_PRIVATE, 0, NULL) = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x7ffd549421a8, FUTEX_WAIT_PRIVATE, 0, NULL) = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x7ffd549421a8, FUTEX_WAIT_PRIVATE, 0, NULL) = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x7ffd549421a8, FUTEX_WAIT_PRIVATE, 0, NULL) = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x7ffd549421a8, FUTEX_WAIT_PRIVATE, 0, NULL) = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x7ffd549421a8, FUTEX_WAIT_PRIVATE, 0, NULL) = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x7ffd549421a8, FUTEX_WAIT_PRIVATE, 0, NULL) = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558f9c91d498, FUTEX_WAKE_PRIVATE, 1) = 0
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base=";\3\23\0!\0\300\6\0\0\0\0\6\0003\0004\0\t\0\6\0<\0004\0\17\0F\0<\0"..., iov_len=412}], 1) = 412
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x4} ---
+++ killed by SIGSEGV +++
Speicherzugriffsfehler
My system is up2date Gentoo Linux
Thank you for reporting this.
Do you use the app image or have you compiled MediaElch yourself? My first thought was a multithreading issue but the multithreaded part should be finished (the output how long it took comes only after the multithreaded code).
If you compiled MediaElch yourself, please let me know how you did it. If not, please let me know where you downloaded MediaElch :)
I compiled it using the gentoo ebuild
https://github.com/bell07/gentoo-bell07_overlay/blob/master/media-video/mediaelch/mediaelch-2.8.10.ebuild
My first suspicion was the #1298 but the issue is still there with 2.8.10.
-DUSE_EXTERN_QUAZIP=ON is set, I use the last working quazip-0.9.1
Thank you. I will try to reproduce this issue.
The issue in #1298 was related to movie sets. Those are only loaded if you actually click on the menu "movie sets".
Btw. Your ebuild file needs an update: MediaElch now depends on Qt5Svg and does not depend on QtScript (since a year or two). :-)
Edit:// Also the license is LGPL-3, not GPL-3 :-)
Thanks for the hints ;-) Ebuild is updated now
Hi,
could you tell what your folder structure (for movies/...) looks like? :-)
I use the flat folder structure - all files in the same folder. For example:
$ ls -1 Videos/Filme/Zurück\ *
'Videos/Filme/Zurück in die Zukunft 1-banner.jpg'
'Videos/Filme/Zurück in die Zukunft 1-clearart.png'
'Videos/Filme/Zurück in die Zukunft 1-clearlogo.png'
'Videos/Filme/Zurück in die Zukunft 1-disc.png'
'Videos/Filme/Zurück in die Zukunft 1-discart.png'
'Videos/Filme/Zurück in die Zukunft 1-fanart.jpg'
'Videos/Filme/Zurück in die Zukunft 1-keyart.jpg'
'Videos/Filme/Zurück in die Zukunft 1-landscape.jpg'
'Videos/Filme/Zurück in die Zukunft 1-logo.png'
'Videos/Filme/Zurück in die Zukunft 1-poster.jpg'
'Videos/Filme/Zurück in die Zukunft 1-thumb.jpg'
'Videos/Filme/Zurück in die Zukunft 1.avi'
'Videos/Filme/Zurück in die Zukunft 1.nfo'
'Videos/Filme/Zurück in die Zukunft 2-banner.jpg'
'Videos/Filme/Zurück in die Zukunft 2-clearart.png'
'Videos/Filme/Zurück in die Zukunft 2-clearlogo.png'
'Videos/Filme/Zurück in die Zukunft 2-disc.png'
'Videos/Filme/Zurück in die Zukunft 2-discart.png'
'Videos/Filme/Zurück in die Zukunft 2-fanart.jpg'
'Videos/Filme/Zurück in die Zukunft 2-keyart.jpg'
'Videos/Filme/Zurück in die Zukunft 2-landscape.jpg'
'Videos/Filme/Zurück in die Zukunft 2-logo.png'
'Videos/Filme/Zurück in die Zukunft 2-poster.jpg'
'Videos/Filme/Zurück in die Zukunft 2-thumb.jpg'
'Videos/Filme/Zurück in die Zukunft 2.avi'
'Videos/Filme/Zurück in die Zukunft 2.nfo'
'Videos/Filme/Zurück in die Zukunft 3-banner.jpg'
'Videos/Filme/Zurück in die Zukunft 3-clearart.png'
'Videos/Filme/Zurück in die Zukunft 3-clearlogo.png'
'Videos/Filme/Zurück in die Zukunft 3-disc.png'
'Videos/Filme/Zurück in die Zukunft 3-discart.png'
'Videos/Filme/Zurück in die Zukunft 3-fanart.jpg'
'Videos/Filme/Zurück in die Zukunft 3-keyart.jpg'
'Videos/Filme/Zurück in die Zukunft 3-landscape.jpg'
'Videos/Filme/Zurück in die Zukunft 3-logo.png'
'Videos/Filme/Zurück in die Zukunft 3-poster.jpg'
'Videos/Filme/Zurück in die Zukunft 3-thumb.jpg'
'Videos/Filme/Zurück in die Zukunft 3.avi'
'Videos/Filme/Zurück in die Zukunft 3.nfo'
EDIT: Played around configuring each folder separately. Small folders are working fine, but the big folders crash the MediaElch. I do not see any difference in layout beside the folder size.
Maybe it is timing issue? The collection is on Libreelec device (RPI4) shared using samba, using slow WIFI.
Yes, timing is what I thought about. It _may_ (or may not) be a user-after-free issue.
Could you try the change from https://github.com/Komet/MediaElch/pull/1317 ?
It bugs me that I can't reproduce it. But the other issue (for the same bug) also uses a network storage so I assume it takes longer for them as well.
The change #1317 did not solved the issue for me.
New strace
write(2, "MediaElch 2021-05-06 16:02:27.74"..., 86MediaElch 2021-05-06 16:02:27.742 DEBUG : [MovieFileSearcher] Reloading took 62921 ms
) = 86
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="\n\0\2\0\v\0\340\5\31\0\v\0\303\6\0\0\0\0\30\0\22\0\0\0\303\6\0\0\v\0\340\5"..., iov_len=52}], 1) = 52
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x7fffc7c74e18, FUTEX_WAIT_PRIVATE, 0, NULL) = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="(\0\4\0\303\6\0\0\303\6\0\0s\n\300\3", iov_len=16}], 1) = 16
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="(\0\4\0\303\6\0\0\225_\362\0s\n\300\3", iov_len=16}], 1) = 16
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="(\0\4\0\225_\362\0\3\0\0\4\363\2\300\3", iov_len=16}], 1) = 16
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="\24\0\6\0\v\0\340\5\263\1\0\0\0\0\0\0\0\0\0\0\0\4\0\0", iov_len=24}], 1) = 24
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="\24\0\6\0\v\0\340\5O\1\0\0\4\0\0\0\0\0\0\0\0\4\0\0", iov_len=24}], 1) = 24
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
recvmsg(6, {msg_namelen=0}, 0) = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)
recvmsg(6, {msg_namelen=0}, 0) = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)
poll([{fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=10, events=POLLIN}, {fd=12, events=POLLIN}], 4, 0) = 1 ([{fd=5, revents=POLLIN}])
read(5, "V\0\0\0\0\0\0\0", 16) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\303\6\0\0", iov_len=8}], 1) = 8
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x558641a8e498, FUTEX_WAKE_PRIVATE, 1) = 0
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base=";\3\23\0!\0\340\5\0\0\0\0\6\0003\0004\0\t\0\6\0<\0004\0\17\0F\0<\0"..., iov_len=412}], 1) = 412
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
futex(0x7f2a9fcb11e0, FUTEX_WAKE_PRIVATE, 2147483647) = 0
write(2, "terminate called after throwing "..., 48terminate called after throwing an instance of ') = 48
write(2, "std::bad_alloc", 14std::bad_alloc) = 14
write(2, "'\n", 2'
) = 2
write(2, " what(): ", 11 what(): ) = 11
write(2, "std::bad_alloc", 14std::bad_alloc) = 14
write(2, "\n", 1
) = 1
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [], 8) = 0
getpid() = 5196
gettid() = 5196
tgkill(5196, 5196, SIGABRT) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=5196, si_uid=1000} ---
+++ killed by SIGABRT +++
Abgebrochen
hmm.. That would have been great, though. :smilie:
I'm a bit confused why it shows a std::bad_alloc...
I'll try to reproduce this. Maybe a slow hard drive with a lot of movies will show some results..
Should I add some debug-prints to any source files to see what happens?
According to #1316 it seems to be a use-after-free issue. I'm not too familiar with Linux traces, though. Do you know how to build with Address Sanitizer enabled?
QMake: CONFIG+=sanitize
CMake -DSANITIZE_ADDRESS=on -DCMAKE_BUILD_TYPE=Debug
If MediaElch crashes again, the output should tell you where it crashed.
Reproduced the issue. Could it be that you do not have any TV shows in MediaElch loaded? :-)
Relevant ASAN output:
[MovieFileSearcher] Reloading took 3660 ms
=================================================================
==74353==ERROR: AddressSanitizer: heap-use-after-free on address 0x60b000e8c358 at pc 0x55c2b97308aa bp 0x7ffccda46f00 sp 0x7ffccda46ef0
READ of size 1 at 0x60b000e8c358 thread T0
#0 0x55c2b97308a9 in SettingsDir::SettingsDir(SettingsDir const&) ../MediaElch/src/globals/Globals.h:139
#1 0x55c2b979e9e8 in mediaelch::MovieDirectorySearcher::directory() const ../MediaElch/src/movies/file_searcher/MovieDirectorySearcher.h:34
#2 0x55c2b9798f7b in mediaelch::MovieFileSearcher::onDirectoryLoaded(mediaelch::MovieDirectorySearcher*) ../MediaElch/src/movies/file_searcher/MovieFileSearcher.cpp:150
#3 0x55c2b97a507f in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<mediaelch::MovieDirectorySearcher*>, void, void (mediaelch::MovieFileSearcher::*)(mediaelch::MovieDirectorySearcher*)>::call(void (mediaelch::MovieFileSearcher::*)(mediaelch::MovieDirectorySearcher*), mediaelch::MovieFileSearcher*, void**) (/home/andre/Projects/Private/build-MediaElch-Desktop_Qt_5_12_10_GCC_64bit-Debug/MediaElch+0x4c807f)
#4 0x55c2b97a44c8 in void QtPrivate::FunctionPointer<void (mediaelch::MovieFileSearcher::*)(mediaelch::MovieDirectorySearcher*)>::call<QtPrivate::List<mediaelch::MovieDirectorySearcher*>, void>(void (mediaelch::MovieFileSearcher::*)(mediaelch::MovieDirectorySearcher*), mediaelch::MovieFileSearcher*, void**) (/home/andre/Projects/Private/build-MediaElch-Desktop_Qt_5_12_10_GCC_64bit-Debug/MediaElch+0x4c74c8)
#5 0x55c2b97a3319 in QtPrivate::QSlotObject<void (mediaelch::MovieFileSearcher::*)(mediaelch::MovieDirectorySearcher*), QtPrivate::List<mediaelch::MovieDirectorySearcher*>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) /home/andre/Qt/5.12.10/gcc_64/include/QtCore/qobjectdefs_impl.h:414
#6 0x7f2f59b26305 in QtPrivate::QSlotObjectBase::call(QObject*, void**) ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:394
#7 0x7f2f59b26305 in QMetaObject::activate(QObject*, int, int, void**) kernel/qobject.cpp:3784
#8 0x55c2ba235269 in mediaelch::MovieDirectorySearcher::loaded(mediaelch::MovieDirectorySearcher*) /home/andre/Projects/Private/build-MediaElch-Desktop_Qt_5_12_10_GCC_64bit-Debug/moc_MovieDirectorySearcher.cpp:178
#9 0x55c2b97aaec5 in operator() ../MediaElch/src/movies/file_searcher/MovieDirectorySearcher.cpp:167
#10 0x55c2b97b083e in call /home/andre/Qt/5.12.10/gcc_64/include/QtCore/qobjectdefs_impl.h:146
#11 0x55c2b97b076e in call<QtPrivate::List<>, void> /home/andre/Qt/5.12.10/gcc_64/include/QtCore/qobjectdefs_impl.h:256
#12 0x55c2b97b0669 in impl /home/andre/Qt/5.12.10/gcc_64/include/QtCore/qobjectdefs_impl.h:439
#13 0x7f2f59b26305 in QtPrivate::QSlotObjectBase::call(QObject*, void**) ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:394
#14 0x7f2f59b26305 in QMetaObject::activate(QObject*, int, int, void**) kernel/qobject.cpp:3784
#15 0x7f2f599370b0 in QFutureWatcherBase::event(QEvent*) thread/qfuturewatcher.cpp:334
#16 0x7f2f5c4538fb in QApplicationPrivate::notify_helper(QObject*, QEvent*) kernel/qapplication.cpp:3650
#17 0x7f2f5c45aa1f in QApplication::notify(QObject*, QEvent*) kernel/qapplication.cpp:3396
#18 0x7f2f59afa4e7 in QCoreApplication::notifyInternal2(QObject*, QEvent*) kernel/qcoreapplication.cpp:1088
#19 0x7f2f59afcf86 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) kernel/qcoreapplication.cpp:1825
#20 0x7f2f59b522c2 in postEventSourceDispatch kernel/qeventdispatcher_glib.cpp:276
#21 0x7f2f591e617c in g_main_context_dispatch (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x5217c)
#22 0x7f2f591e63ff (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x523ff)
#23 0x7f2f591e64a2 in g_main_context_iteration (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x524a2)
#24 0x7f2f59b518fe in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) kernel/qeventdispatcher_glib.cpp:422
#25 0x55c2b9a329cc in FileScannerDialog::onCurrentDir(QString) ../MediaElch/src/ui/main/FileScannerDialog.cpp:275
#26 0x55c2b9a38196 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QString>, void, void (FileScannerDialog::*)(QString)>::call(void (FileScannerDialog::*)(QString), FileScannerDialog*, void**) /home/andre/Qt/5.12.10/gcc_64/include/QtCore/qobjectdefs_impl.h:152
#27 0x55c2b9a379d3 in void QtPrivate::FunctionPointer<void (FileScannerDialog::*)(QString)>::call<QtPrivate::List<QString>, void>(void (FileScannerDialog::*)(QString), FileScannerDialog*, void**) /home/andre/Qt/5.12.10/gcc_64/include/QtCore/qobjectdefs_impl.h:185
[...]
previously allocated by thread T0 here:
#0 0x7f2f5d0a4947 in operator new(unsigned long) (/lib/x86_64-linux-gnu/libasan.so.5+0x10f947)
#1 0x55c2b9798091 in mediaelch::MovieFileSearcher::reload(bool) ../MediaElch/src/movies/file_searcher/MovieFileSearcher.cpp:88
#2 0x55c2b9a31edd in FileScannerDialog::onStartMovieScannerForce() ../MediaElch/src/ui/main/FileScannerDialog.cpp:179
#3 0x55c2b9a38765 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (FileScannerDialog::*)()>::call(void (FileScannerDialog::*)(), FileScannerDialog*, void**) /home/andre/Qt/5.12.10/gcc_64/include/QtCore/qobjectdefs_impl.h:152
#4 0x55c2b9a38587 in void QtPrivate::FunctionPointer<void (FileScannerDialog::*)()>::call<QtPrivate::List<>, void>(void (FileScannerDialog::*)(), FileScannerDialog*, void**) /home/andre/Qt/5.12.10/gcc_64/include/QtCore/qobjectdefs_impl.h:185
#5 0x55c2b9a37aef in QtPrivate::QSlotObject<void (FileScannerDialog::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) /home/andre/Qt/5.12.10/gcc_64/include/QtCore/qobjectdefs_impl.h:414
#6 0x7f2f59b32cd5 in QtPrivate::QSlotObjectBase::call(QObject*, void**) ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:394
#7 0x7f2f59b32cd5 in QSingleShotTimer::timerEvent(QTimerEvent*) kernel/qtimer.cpp:318
#8 0x7f2f5c4538fb in QApplicationPrivate::notify_helper(QObject*, QEvent*) kernel/qapplication.cpp:3650
SUMMARY: AddressSanitizer: heap-use-after-free ../MediaElch/src/globals/Globals.h:139 in SettingsDir::SettingsDir(SettingsDir const&)
To reproduce:
Seems only to happen if there were not TV shows.
I think I found the (or just one?) bug:
void TvShowModel::clear()
{
const auto size = m_rootItem.shows().size();
beginRemoveRows(QModelIndex(), 0, size - 1);
m_rootItem.removeChildren(0, size);
endRemoveRows();
}
What happens if size() returns 0?
Turns out, "MovieFileSearcher" was in the stack trace because of the signal moviesLoaded. A slot in FileSearcher called TvShowModel::clear().
hmmm... Seems there is yet another issue.
My collection have TV shows too. Switching to TV shows and reload at this place work.
But on Videos it does not work.
For me I was able to reproduce using:
Drop ~/.local/share/kvibes and ~/.config/kvibes for proper start.
Add/configure the my video folder (movies only)
Reload crashes
Other issue is: if I forgot to remove the "separate folders" flag for my video folder. Then MediaElch freezes
THe Build-Type debug show me
2021-05-06 17:29:16.593 DEBUG [/var/tmp/portage/media-video/mediaelch-2.8.10/work/MediaElch-2.8.10/src/movies/file_searcher/MovieFileSearcher.cpp:122] | [MovieFileSearcher] Directory loaded: "/home/belka/Videos/Kinderfilme"
2021-05-06 17:29:21.618 DEBUG [/var/tmp/portage/media-video/mediaelch-2.8.10/work/MediaElch-2.8.10/src/movies/file_searcher/MovieFileSearcher.cpp:122] | [MovieFileSearcher] Directory loaded: "/home/belka/Videos/Filme"
2021-05-06 17:29:22.226 DEBUG [/var/tmp/portage/media-video/mediaelch-2.8.10/work/MediaElch-2.8.10/src/movies/file_searcher/MovieFileSearcher.cpp:22] | [MovieFileSearcher] Reloading took 31712 ms
Speicherzugriffsfehler
How I can enable QMake: CONFIG+=sanitize? I am not familiar with qmake
Ah, right. You use the ebuild file. CONFIG+=sanitize are the command line arguments that I pass to QMake. :)
Here an even shorter stack trace:
==80104==ERROR: AddressSanitizer: heap-use-after-free on address 0x60b000171500 at pc 0x55df77274df3 bp 0x7fff83495db0 sp 0x7fff83495da0
READ of size 8 at 0x60b000171500 thread T0
#0 0x55df77274df2 in QVector<Movie*>::QVector(QVector<Movie*> const&) /home/andre/Qt/5.12.10/gcc_64/include/QtCore/qvector.h:359
#1 0x55df77274914 in mediaelch::MovieDirectorySearcher::movies() const (/home/andre/Projects/Private/build-MediaElch-Desktop_Qt_5_12_10_GCC_64bit-Debug/MediaElch+0x4c1914)
#2 0x55df7726f091 in mediaelch::MovieFileSearcher::onDirectoryLoaded(mediaelch::MovieDirectorySearcher*) ../MediaElch/src/movies/file_searcher/MovieFileSearcher.cpp:161
#3 0x55df7727afdd in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<mediaelch::MovieDirectorySearcher*>, void, void (mediaelch::MovieFileSearcher::*)(mediaelch::MovieDirectorySearcher*)>::call(void (mediaelch::MovieFileSearcher::*)(mediaelch::MovieDirectorySearcher*), mediaelch::MovieFileSearcher*, void**) /home/andre/Qt/5.12.10/gcc_64/include/QtCore/qobjectdefs_impl.h:152
#4 0x55df7727a426 in void QtPrivate::FunctionPointer<void (mediaelch::MovieFileSearcher::*)(mediaelch::MovieDirectorySearcher*)>::call<QtPrivate::List<mediaelch::MovieDirectorySearcher*>, void>(void (mediaelch::MovieFileSearcher::*)(mediaelch::MovieDirectorySearcher*), mediaelch::MovieFileSearcher*, void**) (/home/andre/Projects/Private/build-MediaElch-Desktop_Qt_5_12_10_GCC_64bit-Debug/MediaElch+0x4c7426)
#5 0x55df77279277 in QtPrivate::QSlotObject<void (mediaelch::MovieFileSearcher::*)(mediaelch::MovieDirectorySearcher*), QtPrivate::List<mediaelch::MovieDirectorySearcher*>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (/home/andre/Projects/Private/build-MediaElch-Desktop_Qt_5_12_10_GCC_64bit-Debug/MediaElch+0x4c6277)
#6 0x7f465ee59305 in QtPrivate::QSlotObjectBase::call(QObject*, void**) ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:394
#7 0x7f465ee59305 in QMetaObject::activate(QObject*, int, int, void**) kernel/qobject.cpp:3784
#8 0x55df77d0b61b in mediaelch::MovieDirectorySearcher::loaded(mediaelch::MovieDirectorySearcher*) /home/andre/Projects/Private/build-MediaElch-Desktop_Qt_5_12_10_GCC_64bit-Debug/moc_MovieDirectorySearcher.cpp:178
#9 0x55df7727d8cf in operator() ../MediaElch/src/movies/file_searcher/MovieDirectorySearcher.cpp:19
#10 0x55df77286cb6 in call /home/andre/Qt/5.12.10/gcc_64/include/QtCore/qobjectdefs_impl.h:146
#11 0x55df77286ba4 in call<QtPrivate::List<>, void> /home/andre/Qt/5.12.10/gcc_64/include/QtCore/qobjectdefs_impl.h:256
#12 0x55df77286973 in impl /home/andre/Qt/5.12.10/gcc_64/include/QtCore/qobjectdefs_impl.h:439
#13 0x7f465ee59305 in QtPrivate::QSlotObjectBase::call(QObject*, void**) ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:394
#14 0x7f465ee59305 in QMetaObject::activate(QObject*, int, int, void**) kernel/qobject.cpp:3784
#15 0x7f465ec6a0b0 in QFutureWatcherBase::event(QEvent*) thread/qfuturewatcher.cpp:334
#16 0x7f46617868fb in QApplicationPrivate::notify_helper(QObject*, QEvent*) kernel/qapplication.cpp:3650
#17 0x7f466178da1f in QApplication::notify(QObject*, QEvent*) kernel/qapplication.cpp:3396
#18 0x7f465ee2d4e7 in QCoreApplication::notifyInternal2(QObject*, QEvent*) kernel/qcoreapplication.cpp:1088
#19 0x7f465ee2ff86 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) kernel/qcoreapplication.cpp:1825
#20 0x7f465ee852c2 in postEventSourceDispatch kernel/qeventdispatcher_glib.cpp:276
#21 0x7f465e51917c in g_main_context_dispatch (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x5217c)
#22 0x7f465e5193ff (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x523ff)
#23 0x7f465e5194a2 in g_main_context_iteration (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x524a2)
#24 0x7f465ee848fe in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) kernel/qeventdispatcher_glib.cpp:422
#25 0x7f465ee2bda9 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) kernel/qeventloop.cpp:225
#26 0x7f465ee347ef in QCoreApplication::exec() kernel/qcoreapplication.cpp:1389
#27 0x55df770eaac4 in main ../MediaElch/src/main.cpp:130
#28 0x7f465e6a00b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
#29 0x55df770c544d in _start (/home/andre/Projects/Private/build-MediaElch-Desktop_Qt_5_12_10_GCC_64bit-Debug/MediaElch+0x31244d)
0x60b000171500 is located 96 bytes inside of 112-byte region [0x60b0001714a0,0x60b000171510)
freed by thread T0 here:
#0 0x7f46623d9025 in operator delete(void*, unsigned long) (/lib/x86_64-linux-gnu/libasan.so.5+0x111025)
#1 0x55df7727e082 in mediaelch::MovieDirectorySearcher::~MovieDirectorySearcher() ../MediaElch/src/movies/file_searcher/MovieDirectorySearcher.cpp:34
#2 0x7f465ee59f37 in QObject::event(QEvent*) kernel/qobject.cpp:1252
#3 0x7f46617868fb in QApplicationPrivate::notify_helper(QObject*, QEvent*) kernel/qapplication.cpp:3650
previously allocated by thread T0 here:
#0 0x7f46623d7947 in operator new(unsigned long) (/lib/x86_64-linux-gnu/libasan.so.5+0x10f947)
#1 0x55df7726df38 in mediaelch::MovieFileSearcher::reload(bool) ../MediaElch/src/movies/file_searcher/MovieFileSearcher.cpp:89
#2 0x55df775083a7 in FileScannerDialog::onStartMovieScannerForce() ../MediaElch/src/ui/main/FileScannerDialog.cpp:180
#3 0x55df7750eb05 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (FileScannerDialog::*)()>::call(void (FileScannerDialog::*)(), FileScannerDialog*, void**) /home/andre/Qt/5.12.10/gcc_64/include/QtCore/qobjectdefs_impl.h:152
#4 0x55df7750e927 in void QtPrivate::FunctionPointer<void (FileScannerDialog::*)()>::call<QtPrivate::List<>, void>(void (FileScannerDialog::*)(), FileScannerDialog*, void**) /home/andre/Qt/5.12.10/gcc_64/include/QtCore/qobjectdefs_impl.h:185
#5 0x55df7750de8f in QtPrivate::QSlotObject<void (FileScannerDialog::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) /home/andre/Qt/5.12.10/gcc_64/include/QtCore/qobjectdefs_impl.h:414
#6 0x7f465ee65cd5 in QtPrivate::QSlotObjectBase::call(QObject*, void**) ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:394
#7 0x7f465ee65cd5 in QSingleShotTimer::timerEvent(QTimerEvent*) kernel/qtimer.cpp:318
#8 0x7f46617868fb in QApplicationPrivate::notify_helper(QObject*, QEvent*) kernel/qapplication.cpp:3650
Got it!. Just set CXXFLAGS="-fsanitize=address -fno-omit-frame-pointer" in ebuild for testing
==24775==ERROR: AddressSanitizer: heap-use-after-free on address 0x60b000bfb308 at pc 0x7fee0a4218df bp 0x7ffe1b6a1bc0 sp 0x7ffe1b6a1bb0
READ of size 8 at 0x60b000bfb308 thread T0
#0 0x7fee0a4218de in QVector<Movie*>::append(Movie* const&) (/usr/lib64/liblibmediaelch.so+0xb818de)
#1 0x7fee0a42180c in QVector<Movie*>::push_back(Movie* const&) (/usr/lib64/liblibmediaelch.so+0xb8180c)
#2 0x7fee0a70dac4 in mediaelch::MovieDirectorySearcher::postProcessMovie(Movie*) (/usr/lib64/liblibmediaelch.so+0xe6dac4)
#3 0x7fee0a709f5d (/usr/lib64/liblibmediaelch.so+0xe69f5d)
#4 0x7fee0a70f82c (/usr/lib64/liblibmediaelch.so+0xe6f82c)
#5 0x7fee0a70f5cd (/usr/lib64/liblibmediaelch.so+0xe6f5cd)
#6 0x7fee0a70f2ff (/usr/lib64/liblibmediaelch.so+0xe6f2ff)
#7 0x7fee08f886c4 (/usr/lib64/libQt5Core.so.5+0x2786c4)
#8 0x7fee08de0070 in QFutureWatcherBase::resultReadyAt(int) (/usr/lib64/libQt5Core.so.5+0xd0070)
#9 0x7fee08de0b2d (/usr/lib64/libQt5Core.so.5+0xd0b2d)
#10 0x7fee08de0ec4 in QFutureWatcherBase::event(QEvent*) (/usr/lib64/libQt5Core.so.5+0xd0ec4)
#11 0x7fee09382ede in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib64/libQt5Widgets.so.5+0x162ede)
#12 0x7fee08f5a93f in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/usr/lib64/libQt5Core.so.5+0x24a93f)
#13 0x7fee08f5d524 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (/usr/lib64/libQt5Core.so.5+0x24d524)
#14 0x7fee08fa52a2 (/usr/lib64/libQt5Core.so.5+0x2952a2)
#15 0x7fee06ea8bb9 in g_main_context_dispatch (/usr/lib64/libglib-2.0.so.0+0x50bb9)
#16 0x7fee06ea8e4f (/usr/lib64/libglib-2.0.so.0+0x50e4f)
#17 0x7fee06ea8efe in g_main_context_iteration (/usr/lib64/libglib-2.0.so.0+0x50efe)
#18 0x7fee08fa4d9e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib64/libQt5Core.so.5+0x294d9e)
#19 0x7fee08f59492 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib64/libQt5Core.so.5+0x249492)
#20 0x7fee08f60c6c in QCoreApplication::exec() (/usr/lib64/libQt5Core.so.5+0x250c6c)
#21 0x55a9e9e7eea7 in main (/usr/bin/MediaElch+0xeea7)
#22 0x7fee0897be5c in __libc_start_main (/lib64/libc.so.6+0x23e5c)
#23 0x55a9e9e7c609 (/usr/bin/MediaElch+0xc609)
0x60b000bfb308 is located 88 bytes inside of 104-byte region [0x60b000bfb2b0,0x60b000bfb318)
freed by thread T0 here:
#0 0x7fee0be4ef17 in operator delete(void*, unsigned long) (/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/libasan.so.6+0xaef17)
#1 0x7fee0a6bc538 in mediaelch::MovieDirectorySearcher::~MovieDirectorySearcher() (/usr/lib64/liblibmediaelch.so+0xe1c538)
#2 0x7fee08f81094 in QObject::event(QEvent*) (/usr/lib64/libQt5Core.so.5+0x271094)
#3 0x7fee09382ede in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib64/libQt5Widgets.so.5+0x162ede)
previously allocated by thread T0 here:
#0 0x7fee0be4df47 in operator new(unsigned long) (/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/libasan.so.6+0xadf47)
#1 0x7fee0a6f9427 in mediaelch::MovieFileSearcher::reload(bool) (/usr/lib64/liblibmediaelch.so+0xe59427)
#2 0x7fee0ae7413b in FileScannerDialog::onStartMovieScannerForce() (/usr/lib64/liblibmediaelch.so+0x15d413b)
#3 0x7fee0ae7a84d in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (FileScannerDialog::*)()>::call(void (FileScannerDialog::*)(), FileScannerDialog*, void**) (/usr/lib64/liblibmediaelch.so+0x15da84d)
#4 0x7fee0ae7a673 in void QtPrivate::FunctionPointer<void (FileScannerDialog::*)()>::call<QtPrivate::List<>, void>(void (FileScannerDialog::*)(), FileScannerDialog*, void**) (/usr/lib64/liblibmediaelch.so+0x15da673)
#5 0x7fee0ae79bf1 in QtPrivate::QSlotObject<void (FileScannerDialog::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (/usr/lib64/liblibmediaelch.so+0x15d9bf1)
#6 0x7fee08f812d4 in QObject::event(QEvent*) (/usr/lib64/libQt5Core.so.5+0x2712d4)
#7 0x7fee09382ede in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib64/libQt5Widgets.so.5+0x162ede)
SUMMARY: AddressSanitizer: heap-use-after-free (/usr/lib64/liblibmediaelch.so+0xb818de) in QVector<Movie*>::append(Movie* const&)
Shadow bytes around the buggy address:
0x0c1680177610: fa fa fa fa fd fd fd fd fd fd fd fd fd fd fd fd
0x0c1680177620: fd fa fa fa fa fa fa fa fa fa fd fd fd fd fd fd
0x0c1680177630: fd fd fd fd fd fd fd fd fa fa fa fa fa fa fa fa
0x0c1680177640: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fa fa
0x0c1680177650: fa fa fa fa fa fa fd fd fd fd fd fd fd fd fd fd
=>0x0c1680177660: fd[fd]fd fa fa fa fa fa fa fa fa fa fd fd fd fd
0x0c1680177670: fd fd fd fd fd fd fd fd fd fa fa fa fa fa fa fa
0x0c1680177680: fa fa fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c1680177690: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c16801776a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fd fd
0x0c16801776b0: fd fd fd fd fd fd fd fd fd fd fd fd fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
==24775==ABORTING
Exactly, yes! :-)
Ok, so I _think_ that the issue is that the QFuture signal resultReadyAt queued, then the object is destroyed, and only then is the signal executed on the destroyed object. I wonder why the cancel() call didn't work and why the signal is still emitted.
Thank you! Your stack trace is better than mine.
Is this issue easily reproducible for you? i.e. every time? :)
Yes, the issue is easy to reproduce for me. Just run MediaElch and click to reload. Crashed every time
Thanks. In that case a possible fix should be easy to test.
I (again) think to have found the issue.
Timesteps: (N)
(1) First directory loaded -> call onDirectoryLoaded
(2) Second directory loaded -> enqueue onDirectoryLoaded
(3) First directory onDirectoryLoaded(): while processing movies -> processEvents
(4) due to processEvents from (3), process onDirectoryLoaded() from (2)
(5) In (4), all file searchers are "done" -> delete file searchers in next event loop
(6) File searchers deleted
(7) Return to onDirectoryLoaded() from (3); file searcher is deleted by we call "searcher->movies()"
Adding a trace confirms it: QApplication::processEvents(); is the reason.
This commit fixed it for me:
https://github.com/Komet/MediaElch/pull/1317/commits/db744f5e46497456012a44d91dab20da89e3e577
Could you test the branch again? (note: I force-pushed so a git pull won't work).
If this does indeed fix the bug: THANK YOU! Really. I would have never found this bug because my test-setup only has one movie directory which doesn't cause the bug to appear. Furthermore, the size of the directory and disk speed also play a big role.
I will have to make yet another release. This bug is annoying and very serious (especially for new MediaElch users).
Would you like me to refer to you in a "thank you"-note in the next blog post or changelog? :smile:
(either real name or GitHub name; that's up to you)
Tried your movie-reload-crash branch. Still no luck. Got the next error:
==427==ERROR: AddressSanitizer: heap-use-after-free on address 0x60b000cdd608 at pc 0x7f1a67dd18df bp 0x7ffe82db9680 sp 0x7ffe82db9670
READ of size 8 at 0x60b000cdd608 thread T0
#0 0x7f1a67dd18de in QVector<Movie*>::append(Movie* const&) (/usr/lib64/liblibmediaelch.so+0xb818de)
#1 0x7f1a67dd180c in QVector<Movie*>::push_back(Movie* const&) (/usr/lib64/liblibmediaelch.so+0xb8180c)
#2 0x7f1a680bdac4 in mediaelch::MovieDirectorySearcher::postProcessMovie(Movie*) (/usr/lib64/liblibmediaelch.so+0xe6dac4)
#3 0x7f1a680b9f5d (/usr/lib64/liblibmediaelch.so+0xe69f5d)
#4 0x7f1a680bf82c (/usr/lib64/liblibmediaelch.so+0xe6f82c)
#5 0x7f1a680bf5cd (/usr/lib64/liblibmediaelch.so+0xe6f5cd)
#6 0x7f1a680bf2ff (/usr/lib64/liblibmediaelch.so+0xe6f2ff)
#7 0x7f1a669386c4 (/usr/lib64/libQt5Core.so.5+0x2786c4)
#8 0x7f1a66790070 in QFutureWatcherBase::resultReadyAt(int) (/usr/lib64/libQt5Core.so.5+0xd0070)
#9 0x7f1a66790b2d (/usr/lib64/libQt5Core.so.5+0xd0b2d)
#10 0x7f1a66790ec4 in QFutureWatcherBase::event(QEvent*) (/usr/lib64/libQt5Core.so.5+0xd0ec4)
#11 0x7f1a66d32ede in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib64/libQt5Widgets.so.5+0x162ede)
#12 0x7f1a6690a93f in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/usr/lib64/libQt5Core.so.5+0x24a93f)
#13 0x7f1a6690d524 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (/usr/lib64/libQt5Core.so.5+0x24d524)
#14 0x7f1a669552a2 (/usr/lib64/libQt5Core.so.5+0x2952a2)
#15 0x7f1a64858bb9 in g_main_context_dispatch (/usr/lib64/libglib-2.0.so.0+0x50bb9)
#16 0x7f1a64858e4f (/usr/lib64/libglib-2.0.so.0+0x50e4f)
#17 0x7f1a64858efe in g_main_context_iteration (/usr/lib64/libglib-2.0.so.0+0x50efe)
#18 0x7f1a66954d9e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib64/libQt5Core.so.5+0x294d9e)
#19 0x7f1a66909492 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib64/libQt5Core.so.5+0x249492)
#20 0x7f1a66910c6c in QCoreApplication::exec() (/usr/lib64/libQt5Core.so.5+0x250c6c)
#21 0x55954dcedea7 in main (/usr/bin/MediaElch+0xeea7)
#22 0x7f1a6632be5c in __libc_start_main (/lib64/libc.so.6+0x23e5c)
#23 0x55954dceb609 (/usr/bin/MediaElch+0xc609)
0x60b000cdd608 is located 88 bytes inside of 104-byte region [0x60b000cdd5b0,0x60b000cdd618)
freed by thread T0 here:
#0 0x7f1a697fef17 in operator delete(void*, unsigned long) (/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/libasan.so.6+0xaef17)
#1 0x7f1a6806c538 in mediaelch::MovieDirectorySearcher::~MovieDirectorySearcher() (/usr/lib64/liblibmediaelch.so+0xe1c538)
#2 0x7f1a66931094 in QObject::event(QEvent*) (/usr/lib64/libQt5Core.so.5+0x271094)
#3 0x7f1a66d32ede in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib64/libQt5Widgets.so.5+0x162ede)
previously allocated by thread T0 here:
#0 0x7f1a697fdf47 in operator new(unsigned long) (/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/libasan.so.6+0xadf47)
#1 0x7f1a680a9427 in mediaelch::MovieFileSearcher::reload(bool) (/usr/lib64/liblibmediaelch.so+0xe59427)
#2 0x7f1a6882413b in FileScannerDialog::onStartMovieScannerForce() (/usr/lib64/liblibmediaelch.so+0x15d413b)
#3 0x7f1a6882a84d in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (FileScannerDialog::*)()>::call(void (FileScannerDialog::*)(), FileScannerDialog*, void**) (/usr/lib64/liblibmediaelch.so+0x15da84d)
#4 0x7f1a6882a673 in void QtPrivate::FunctionPointer<void (FileScannerDialog::*)()>::call<QtPrivate::List<>, void>(void (FileScannerDialog::*)(), FileScannerDialog*, void**) (/usr/lib64/liblibmediaelch.so+0x15da673)
#5 0x7f1a68829bf1 in QtPrivate::QSlotObject<void (FileScannerDialog::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (/usr/lib64/liblibmediaelch.so+0x15d9bf1)
#6 0x7f1a669312d4 in QObject::event(QEvent*) (/usr/lib64/libQt5Core.so.5+0x2712d4)
#7 0x7f1a66d32ede in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib64/libQt5Widgets.so.5+0x162ede)
SUMMARY: AddressSanitizer: heap-use-after-free (/usr/lib64/liblibmediaelch.so+0xb818de) in QVector<Movie*>::append(Movie* const&)
Shadow bytes around the buggy address:
0x0c1680193a70: fa fa fa fa fd fd fd fd fd fd fd fd fd fd fd fd
0x0c1680193a80: fd fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c1680193a90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c1680193aa0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fa fa
0x0c1680193ab0: fa fa fa fa fa fa fd fd fd fd fd fd fd fd fd fd
=>0x0c1680193ac0: fd[fd]fd fa fa fa fa fa fa fa fa fa fd fd fd fd
0x0c1680193ad0: fd fd fd fd fd fd fd fd fd fa fa fa fa fa fa fa
0x0c1680193ae0: fa fa fd fd fd fd fd fd fd fd fd fd fd fd fd fa
0x0c1680193af0: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
0x0c1680193b00: fd fd fd fd fd fa fa fa fa fa fa fa fa fa fd fd
0x0c1680193b10: fd fd fd fd fd fd fd fd fd fd fd fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
==427==ABORTING
About the credits: Just the usual. I do it because I like MediaElch and like the open source Idea.
I am Alexander Weber (bell07)
Hhmmmm... That should be fixed (I thought).
I will look into it tomorrow again :)
Edit:// ah, I think I know the reason. Hmmm... Will push another fix tomorrow :)
Hi,
I've updated the latest master branch. Could you pull the latest changes and test again, please? :-)
The last commit is a5f36c4293f324b4fc9cace7183231959cf977df
Tried the master now. Got the next error:
2021-05-07 23:13:02.531 DEBUG [/var/tmp/portage/media-video/mediaelch-9999/work/mediaelch-9999/src/movies/file_searcher/MovieFileSearcher.cpp:121] | [MovieFileSearcher] Directory loaded: "/home/belka/Videos/Kinderfilme"
2021-05-07 23:13:07.581 DEBUG [/var/tmp/portage/media-video/mediaelch-9999/work/mediaelch-9999/src/movies/file_searcher/MovieFileSearcher.cpp:121] | [MovieFileSearcher] Directory loaded: "/home/belka/Videos/Filme"
2021-05-07 23:13:07.637 DEBUG [/var/tmp/portage/media-video/mediaelch-9999/work/mediaelch-9999/src/movies/file_searcher/MovieFileSearcher.cpp:22] | [MovieFileSearcher] Reloading took 32512 ms
=================================================================
==19193==ERROR: AddressSanitizer: heap-use-after-free on address 0x60b000d6d8a0 at pc 0x7ff7597e18df bp 0x7ffc2720e050 sp 0x7ffc2720e040
READ of size 8 at 0x60b000d6d8a0 thread T0
#0 0x7ff7597e18de in QVector<Movie*>::append(Movie* const&) (/usr/lib64/liblibmediaelch.so+0xb818de)
#1 0x7ff7597e180c in QVector<Movie*>::push_back(Movie* const&) (/usr/lib64/liblibmediaelch.so+0xb8180c)
#2 0x7ff759acc69c in mediaelch::MovieDirectorySearcher::postProcessMovie(Movie*) (/usr/lib64/liblibmediaelch.so+0xe6c69c)
#3 0x7ff759ac53fd (/usr/lib64/liblibmediaelch.so+0xe653fd)
#4 0x7ff759ace3e9 (/usr/lib64/liblibmediaelch.so+0xe6e3e9)
#5 0x7ff759acdf32 (/usr/lib64/liblibmediaelch.so+0xe6df32)
#6 0x7ff759acdc8b (/usr/lib64/liblibmediaelch.so+0xe6dc8b)
#7 0x7ff7583486c4 (/usr/lib64/libQt5Core.so.5+0x2786c4)
#8 0x7ff7581a0070 in QFutureWatcherBase::resultReadyAt(int) (/usr/lib64/libQt5Core.so.5+0xd0070)
#9 0x7ff7581a0b2d (/usr/lib64/libQt5Core.so.5+0xd0b2d)
#10 0x7ff7581a0ec4 in QFutureWatcherBase::event(QEvent*) (/usr/lib64/libQt5Core.so.5+0xd0ec4)
#11 0x7ff758742ede in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib64/libQt5Widgets.so.5+0x162ede)
#12 0x7ff75831a93f in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/usr/lib64/libQt5Core.so.5+0x24a93f)
#13 0x7ff75831d524 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (/usr/lib64/libQt5Core.so.5+0x24d524)
#14 0x7ff7583652a2 (/usr/lib64/libQt5Core.so.5+0x2952a2)
#15 0x7ff756268bb9 in g_main_context_dispatch (/usr/lib64/libglib-2.0.so.0+0x50bb9)
#16 0x7ff756268e4f (/usr/lib64/libglib-2.0.so.0+0x50e4f)
#17 0x7ff756268efe in g_main_context_iteration (/usr/lib64/libglib-2.0.so.0+0x50efe)
#18 0x7ff758364d9e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib64/libQt5Core.so.5+0x294d9e)
#19 0x7ff758319492 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib64/libQt5Core.so.5+0x249492)
#20 0x7ff758320c6c in QCoreApplication::exec() (/usr/lib64/libQt5Core.so.5+0x250c6c)
#21 0x5631cebe1ea7 in main (/usr/bin/MediaElch+0xeea7)
#22 0x7ff757d3be5c in __libc_start_main (/lib64/libc.so.6+0x23e5c)
#23 0x5631cebdf609 (/usr/bin/MediaElch+0xc609)
0x60b000d6d8a0 is located 96 bytes inside of 112-byte region [0x60b000d6d840,0x60b000d6d8b0)
freed by thread T0 here:
#0 0x7ff75b20ef17 in operator delete(void*, unsigned long) (/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/libasan.so.6+0xaef17)
#1 0x7ff759ac59d0 in mediaelch::MovieDirectorySearcher::~MovieDirectorySearcher() (/usr/lib64/liblibmediaelch.so+0xe659d0)
#2 0x7ff758341094 in QObject::event(QEvent*) (/usr/lib64/libQt5Core.so.5+0x271094)
#3 0x7ff758742ede in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib64/libQt5Widgets.so.5+0x162ede)
previously allocated by thread T0 here:
#0 0x7ff75b20df47 in operator new(unsigned long) (/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/libasan.so.6+0xadf47)
#1 0x7ff759ab7e4f in mediaelch::MovieFileSearcher::reload(bool) (/usr/lib64/liblibmediaelch.so+0xe57e4f)
#2 0x7ff75a234327 in FileScannerDialog::onStartMovieScannerForce() (/usr/lib64/liblibmediaelch.so+0x15d4327)
#3 0x7ff75a23aa39 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (FileScannerDialog::*)()>::call(void (FileScannerDialog::*)(), FileScannerDialog*, void**) (/usr/lib64/liblibmediaelch.so+0x15daa39)
#4 0x7ff75a23a85f in void QtPrivate::FunctionPointer<void (FileScannerDialog::*)()>::call<QtPrivate::List<>, void>(void (FileScannerDialog::*)(), FileScannerDialog*, void**) (/usr/lib64/liblibmediaelch.so+0x15da85f)
#5 0x7ff75a239ddd in QtPrivate::QSlotObject<void (FileScannerDialog::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (/usr/lib64/liblibmediaelch.so+0x15d9ddd)
#6 0x7ff7583412d4 in QObject::event(QEvent*) (/usr/lib64/libQt5Core.so.5+0x2712d4)
#7 0x7ff758742ede in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib64/libQt5Widgets.so.5+0x162ede)
SUMMARY: AddressSanitizer: heap-use-after-free (/usr/lib64/liblibmediaelch.so+0xb818de) in QVector<Movie*>::append(Movie* const&)
Shadow bytes around the buggy address:
0x0c16801a5ac0: fa fa fa fa fa fa fd fd fd fd fd fd fd fd fd fd
0x0c16801a5ad0: fd fd fd fd fa fa fa fa fa fa fa fa fa fa fa fa
0x0c16801a5ae0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c16801a5af0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c16801a5b00: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
=>0x0c16801a5b10: fd fd fd fd[fd]fd fa fa fa fa fa fa fa fa fa fa
0x0c16801a5b20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c16801a5b30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c16801a5b40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c16801a5b50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c16801a5b60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
==19193==ABORTING
Thanks!
I found (yet another) bug. I didn't think of it because everything was handled in the same thread, but due to the Qt event loop, it could happen that we delete an object before the function using it finished.
Could you test https://github.com/Komet/MediaElch/pull/1320 please? :-)
At least for me it fixed another crash that I was able to reproduce.
Tried your fix/movie-file-searcher branch at (8ba3321702f8580e5958c95a31cf7d27b10b92d9)
Next attempt :-(
==5892==ERROR: AddressSanitizer: heap-use-after-free on address 0x60b000c79380 at pc 0x7ff6938488bf bp 0x7ffd6ef802b0 sp 0x7ffd6ef802a0
READ of size 8 at 0x60b000c79380 thread T0
#0 0x7ff6938488be in QVector<Movie*>::append(Movie* const&) (/usr/lib64/liblibmediaelch.so+0xb808be)
#1 0x7ff6938487ec in QVector<Movie*>::push_back(Movie* const&) (/usr/lib64/liblibmediaelch.so+0xb807ec)
#2 0x7ff693b33ed6 in mediaelch::MovieDirectorySearcher::postProcessMovie(Movie*) (/usr/lib64/liblibmediaelch.so+0xe6bed6)
#3 0x7ff693b2cc1b (/usr/lib64/liblibmediaelch.so+0xe64c1b)
#4 0x7ff693b35c23 (/usr/lib64/liblibmediaelch.so+0xe6dc23)
#5 0x7ff693b3576c (/usr/lib64/liblibmediaelch.so+0xe6d76c)
#6 0x7ff693b354c5 (/usr/lib64/liblibmediaelch.so+0xe6d4c5)
#7 0x7ff6923b06c4 (/usr/lib64/libQt5Core.so.5+0x2786c4)
#8 0x7ff692208070 in QFutureWatcherBase::resultReadyAt(int) (/usr/lib64/libQt5Core.so.5+0xd0070)
#9 0x7ff692208b2d (/usr/lib64/libQt5Core.so.5+0xd0b2d)
#10 0x7ff692208ec4 in QFutureWatcherBase::event(QEvent*) (/usr/lib64/libQt5Core.so.5+0xd0ec4)
#11 0x7ff6927aaede in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib64/libQt5Widgets.so.5+0x162ede)
#12 0x7ff69238293f in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/usr/lib64/libQt5Core.so.5+0x24a93f)
#13 0x7ff692385524 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (/usr/lib64/libQt5Core.so.5+0x24d524)
#14 0x7ff6923cd2a2 (/usr/lib64/libQt5Core.so.5+0x2952a2)
#15 0x7ff6902d0bb9 in g_main_context_dispatch (/usr/lib64/libglib-2.0.so.0+0x50bb9)
#16 0x7ff6902d0e4f (/usr/lib64/libglib-2.0.so.0+0x50e4f)
#17 0x7ff6902d0efe in g_main_context_iteration (/usr/lib64/libglib-2.0.so.0+0x50efe)
#18 0x7ff6923ccd9e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib64/libQt5Core.so.5+0x294d9e)
#19 0x7ff692381492 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib64/libQt5Core.so.5+0x249492)
#20 0x7ff692388c6c in QCoreApplication::exec() (/usr/lib64/libQt5Core.so.5+0x250c6c)
#21 0x56546e3ffea7 in main (/usr/bin/MediaElch+0xeea7)
#22 0x7ff691da3e5c in __libc_start_main (/lib64/libc.so.6+0x23e5c)
#23 0x56546e3fd609 (/usr/bin/MediaElch+0xc609)
0x60b000c79380 is located 96 bytes inside of 112-byte region [0x60b000c79320,0x60b000c79390)
freed by thread T0 here:
#0 0x7ff695276f17 in operator delete(void*, unsigned long) (/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/libasan.so.6+0xaef17)
#1 0x7ff693b2d1ee in mediaelch::MovieDirectorySearcher::~MovieDirectorySearcher() (/usr/lib64/liblibmediaelch.so+0xe651ee)
#2 0x7ff6923a9094 in QObject::event(QEvent*) (/usr/lib64/libQt5Core.so.5+0x271094)
#3 0x7ff6927aaede in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib64/libQt5Widgets.so.5+0x162ede)
previously allocated by thread T0 here:
#0 0x7ff695275f47 in operator new(unsigned long) (/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/libasan.so.6+0xadf47)
#1 0x7ff693b1eda8 in mediaelch::MovieFileSearcher::reload(bool) (/usr/lib64/liblibmediaelch.so+0xe56da8)
#2 0x7ff69429bb61 in FileScannerDialog::onStartMovieScannerForce() (/usr/lib64/liblibmediaelch.so+0x15d3b61)
#3 0x7ff6942a2273 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (FileScannerDialog::*)()>::call(void (FileScannerDialog::*)(), FileScannerDialog*, void**) (/usr/lib64/liblibmediaelch.so+0x15da273)
#4 0x7ff6942a2099 in void QtPrivate::FunctionPointer<void (FileScannerDialog::*)()>::call<QtPrivate::List<>, void>(void (FileScannerDialog::*)(), FileScannerDialog*, void**) (/usr/lib64/liblibmediaelch.so+0x15da099)
#5 0x7ff6942a1617 in QtPrivate::QSlotObject<void (FileScannerDialog::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (/usr/lib64/liblibmediaelch.so+0x15d9617)
#6 0x7ff6923a92d4 in QObject::event(QEvent*) (/usr/lib64/libQt5Core.so.5+0x2712d4)
#7 0x7ff6927aaede in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib64/libQt5Widgets.so.5+0x162ede)
SUMMARY: AddressSanitizer: heap-use-after-free (/usr/lib64/liblibmediaelch.so+0xb808be) in QVector<Movie*>::append(Movie* const&)
Shadow bytes around the buggy address:
0x0c1680187220: fa fa fd fd fd fd fd fd fd fd fd fd fd fd fd fa
0x0c1680187230: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
0x0c1680187240: fd fd fd fd fd fa fa fa fa fa fa fa fa fa fd fd
0x0c1680187250: fd fd fd fd fd fd fd fd fd fd fd fa fa fa fa fa
0x0c1680187260: fa fa fa fa fd fd fd fd fd fd fd fd fd fd fd fd
=>0x0c1680187270:[fd]fd fa fa fa fa fa fa fa fa fd fd fd fd fd fd
0x0c1680187280: fd fd fd fd fd fd fd fa fa fa fa fa fa fa fa fa
0x0c1680187290: fd fd fd fd fd fd fd fd fd fd fd fd fd fa fa fa
0x0c16801872a0: fa fa fa fa fa fa fd fd fd fd fd fd fd fd fd fd
0x0c16801872b0: fd fd fd fa fa fa fa fa fa fa fa fa fd fd fd fd
0x0c16801872c0: fd fd fd fd fd fd fd fd fd fd fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
==5892==ABORTING
!#%&§?ß%
Ok, that was the last error I could reproduce and fix. So the good news is that I fixed at least three bugs, and one (or two?) even existed <2.8.8...
Could you give me some more insight into:
I updated https://github.com/Komet/MediaElch/pull/1320 with a test commit. Could you test that as well? In the latest commit on that branch, I remove all call to processEvents(). MediaElch will seem frozen but maybe it won't crash.
THANK YOU for testing all of my changes!
I would test it with a Gentoo installation myself, but my knowledge of Linux is limited. Without a proper installation guide (which is easy to follow), I don't think that I'll be able to install it in a VM...
Edit:// OK, I've got one last idea if the latest temporary change does not work. But I'll wait for your confirmation, first. :)
With the last (temporary) change no crash and no freeze appears. Looks fine for me...
The movies are on Raspberry PI4, shared with samba trough slow WIFI (raspberry -> router -> repeater -> client) network.
The reloading time is Reloading took -9223369627082 ms (negative?) with the last commit
Previously it was 'Reloading took 29337 ms'
The Issue appears on both my clients. The old workstation with AMD A8-7600 (4 cores - 1,5 GHz) and on new Laptop with Intel i5-1021U (4 cores x 2 threads - 1,6 GHz).
The database is around 500 movies (I ripped all my DVDs some times ago) sorted in 2 folders. (+1 folder with tv-shows)
I can reproduce the issue if only 1 folder (with the most movies) is configured in MediaElch.
About Gentoo, it is source based, means the whole OS is compiled on your device. Mostly with "-march=native" optimizations. There is no easy way to install it. See https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/About/de
But if you do it, you learn a lot about linux ;-)
Great! The invalid time in the log is expected. I removed the signal/slot that took care of that (temporarily).
I've pushed another commit that reverts a few // TEST comments. If that works, it's down to two places where the bug is. If I know the place, I can better reproduce the issue or at least have an idea what's actually going on.
Could you test that as well?
Thanks for your CPU details.
Tested the last commit 3b0767e0138abc56d79577b9b0ef3fc5582dc40e
No crash appears on reload ;-)
Awesome! May I ask you one last time to check and test the PR? :-)
The latest commit is https://github.com/Komet/MediaElch/pull/1320/commits/893b485e61226a394f728f7cd1e569df13ef63dd
If it still works with that, I know where to look. And I'll release a new version tomorrow.
I'll close this issue when I've figured out what went wrong. It bothers me that I don't know how the worker is deleted before all events are handled...
Crash on 893b485e61226a394f728f7cd1e569df13ef63dd
==446==ERROR: AddressSanitizer: heap-use-after-free on address 0x60b002179c50 at pc 0x7fe69a8e08bf bp 0x7fff399b0dd0 sp 0x7fff399b0dc0
READ of size 8 at 0x60b002179c50 thread T0
#0 0x7fe69a8e08be in QVector<Movie*>::append(Movie* const&) (/usr/lib64/liblibmediaelch.so+0xb808be)
#1 0x7fe69a8e07ec in QVector<Movie*>::push_back(Movie* const&) (/usr/lib64/liblibmediaelch.so+0xb807ec)
#2 0x7fe69abcbe3a in mediaelch::MovieDirectorySearcher::postProcessMovie(Movie*) (/usr/lib64/liblibmediaelch.so+0xe6be3a)
#3 0x7fe69abc4b7f (/usr/lib64/liblibmediaelch.so+0xe64b7f)
#4 0x7fe69abcdb87 (/usr/lib64/liblibmediaelch.so+0xe6db87)
#5 0x7fe69abcd6d0 (/usr/lib64/liblibmediaelch.so+0xe6d6d0)
#6 0x7fe69abcd429 (/usr/lib64/liblibmediaelch.so+0xe6d429)
#7 0x7fe6994486c4 (/usr/lib64/libQt5Core.so.5+0x2786c4)
#8 0x7fe6992a0070 in QFutureWatcherBase::resultReadyAt(int) (/usr/lib64/libQt5Core.so.5+0xd0070)
#9 0x7fe6992a0b2d (/usr/lib64/libQt5Core.so.5+0xd0b2d)
#10 0x7fe6992a0ec4 in QFutureWatcherBase::event(QEvent*) (/usr/lib64/libQt5Core.so.5+0xd0ec4)
#11 0x7fe699842ede in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib64/libQt5Widgets.so.5+0x162ede)
#12 0x7fe69941a93f in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/usr/lib64/libQt5Core.so.5+0x24a93f)
#13 0x7fe69941d524 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (/usr/lib64/libQt5Core.so.5+0x24d524)
#14 0x7fe6994652a2 (/usr/lib64/libQt5Core.so.5+0x2952a2)
#15 0x7fe697368bb9 in g_main_context_dispatch (/usr/lib64/libglib-2.0.so.0+0x50bb9)
#16 0x7fe697368e4f (/usr/lib64/libglib-2.0.so.0+0x50e4f)
#17 0x7fe697368efe in g_main_context_iteration (/usr/lib64/libglib-2.0.so.0+0x50efe)
#18 0x7fe699464d9e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib64/libQt5Core.so.5+0x294d9e)
#19 0x7fe699419492 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib64/libQt5Core.so.5+0x249492)
#20 0x7fe699420c6c in QCoreApplication::exec() (/usr/lib64/libQt5Core.so.5+0x250c6c)
#21 0x55ef02552ea7 in main (/usr/bin/MediaElch+0xeea7)
#22 0x7fe698e3be5c in __libc_start_main (/lib64/libc.so.6+0x23e5c)
#23 0x55ef02550609 (/usr/bin/MediaElch+0xc609)
0x60b002179c50 is located 96 bytes inside of 112-byte region [0x60b002179bf0,0x60b002179c60)
freed by thread T0 here:
#0 0x7fe69c30ef17 in operator delete(void*, unsigned long) (/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/libasan.so.6+0xaef17)
#1 0x7fe69abc5152 in mediaelch::MovieDirectorySearcher::~MovieDirectorySearcher() (/usr/lib64/liblibmediaelch.so+0xe65152)
#2 0x7fe699441094 in QObject::event(QEvent*) (/usr/lib64/libQt5Core.so.5+0x271094)
#3 0x7fe699842ede in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib64/libQt5Widgets.so.5+0x162ede)
previously allocated by thread T0 here:
#0 0x7fe69c30df47 in operator new(unsigned long) (/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/libasan.so.6+0xadf47)
#1 0x7fe69abb6da8 in mediaelch::MovieFileSearcher::reload(bool) (/usr/lib64/liblibmediaelch.so+0xe56da8)
#2 0x7fe69b333ac5 in FileScannerDialog::onStartMovieScannerForce() (/usr/lib64/liblibmediaelch.so+0x15d3ac5)
#3 0x7fe69b33a1d7 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (FileScannerDialog::*)()>::call(void (FileScannerDialog::*)(), FileScannerDialog*, void**) (/usr/lib64/liblibmediaelch.so+0x15da1d7)
#4 0x7fe69b339ffd in void QtPrivate::FunctionPointer<void (FileScannerDialog::*)()>::call<QtPrivate::List<>, void>(void (FileScannerDialog::*)(), FileScannerDialog*, void**) (/usr/lib64/liblibmediaelch.so+0x15d9ffd)
#5 0x7fe69b33957b in QtPrivate::QSlotObject<void (FileScannerDialog::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (/usr/lib64/liblibmediaelch.so+0x15d957b)
#6 0x7fe6994412d4 in QObject::event(QEvent*) (/usr/lib64/libQt5Core.so.5+0x2712d4)
#7 0x7fe699842ede in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib64/libQt5Widgets.so.5+0x162ede)
SUMMARY: AddressSanitizer: heap-use-after-free (/usr/lib64/liblibmediaelch.so+0xb808be) in QVector<Movie*>::append(Movie* const&)
Shadow bytes around the buggy address:
0x0c1680427330: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c1680427340: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c1680427350: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c1680427360: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c1680427370: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fd fd
=>0x0c1680427380: fd fd fd fd fd fd fd fd fd fd[fd]fd fa fa fa fa
0x0c1680427390: fa fa fa fa fd fd fd fd fd fd fd fd fd fd fd fd
0x0c16804273a0: fd fd fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c16804273b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c16804273c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c16804273d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
==446==ABORTING
Ok, we're getting close. :)
This should be the last commit to test then: https://github.com/Komet/MediaElch/pull/1320/commits/d2e99b3cb0336992612d94c01549f0fcebb220c9
(just pushed to the PR)
If that one doesn't work, I'll simply remove both emit statements. That worked for you.
I can't express how much it helps me that you test my changes so fast. 👍 😄
With last commit no crash appears!
But I found (like 2 tests before on other test without crash) the next lines, after I closed MediaElch:
==13529==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 857088 byte(s) in 17856 object(s) allocated from:
#0 0x7fa7a5badf47 in operator new(unsigned long) (/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/libasan.so.6+0xadf47)
#1 0x7fa7a413a21b in Actors::addActor(Actor) (/usr/lib64/liblibmediaelch.so+0xb3a21b)
#2 0x7fa7a443cf50 in MovieCrew::addActor(Actor) (/usr/lib64/liblibmediaelch.so+0xe3cf50)
#3 0x7fa7a4420e52 in Movie::addActor(Actor) (/usr/lib64/liblibmediaelch.so+0xe20e52)
#4 0x7fa7a43b1c4f in mediaelch::kodi::MovieXmlReader::movieActor(QDomElement const&) (/usr/lib64/liblibmediaelch.so+0xdb1c4f)
#5 0x7fa7a43aacbc in mediaelch::kodi::MovieXmlReader::parseNfoDom(QDomDocument) (/usr/lib64/liblibmediaelch.so+0xdaacbc)
#6 0x7fa7a43e51b4 in KodiXml::loadMovie(Movie*, QString) (/usr/lib64/liblibmediaelch.so+0xde51b4)
#7 0x7fa7a442d3bc in MovieController::loadData(MediaCenterInterface*, bool, bool) (/usr/lib64/liblibmediaelch.so+0xe2d3bc)
#8 0x7fa7a446b1f4 in mediaelch::MovieDirectorySearcher::createMovie(QStringList) (/usr/lib64/liblibmediaelch.so+0xe6b1f4)
#9 0x7fa7a4468546 (/usr/lib64/liblibmediaelch.so+0xe68546)
#10 0x7fa7a446d8b5 (/usr/lib64/liblibmediaelch.so+0xe6d8b5)
#11 0x7fa7a446d5f5 (/usr/lib64/liblibmediaelch.so+0xe6d5f5)
#12 0x7fa7a446d2e2 (/usr/lib64/liblibmediaelch.so+0xe6d2e2)
#13 0x7fa7a44745b9 in std::function<QVector<Movie*> (QStringList)>::operator()(QStringList) const (/usr/lib64/liblibmediaelch.so+0xe745b9)
#14 0x7fa7a4473bb7 in QtConcurrent::MappedEachKernel<QMap<QString, QStringList>::const_iterator, std::function<QVector<Movie*> (QStringList)> >::runIteration(QMap<QString, QStringList>::const_iterator, int, QVector<Movie*>*) (/usr/lib64/liblibmediaelch.so+0xe73bb7)
#15 0x7fa7a44753d1 in QtConcurrent::IterateKernel<QMap<QString, QStringList>::const_iterator, QVector<Movie*> >::whileThreadFunction() (/usr/lib64/liblibmediaelch.so+0xe753d1)
#16 0x7fa7a44742db in QtConcurrent::IterateKernel<QMap<QString, QStringList>::const_iterator, QVector<Movie*> >::threadFunction() (/usr/lib64/liblibmediaelch.so+0xe742db)
#17 0x7fa7a1a63a5c in QtConcurrent::ThreadEngineBase::run() (/usr/lib64/libQt5Concurrent.so.5+0x3a5c)
Direct leak of 324672 byte(s) in 6764 object(s) allocated from:
#0 0x7fa7a5badf47 in operator new(unsigned long) (/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/libasan.so.6+0xadf47)
#1 0x7fa7a413a21b in Actors::addActor(Actor) (/usr/lib64/liblibmediaelch.so+0xb3a21b)
#2 0x7fa7a443cf50 in MovieCrew::addActor(Actor) (/usr/lib64/liblibmediaelch.so+0xe3cf50)
#3 0x7fa7a4420e52 in Movie::addActor(Actor) (/usr/lib64/liblibmediaelch.so+0xe20e52)
#4 0x7fa7a43b1c4f in mediaelch::kodi::MovieXmlReader::movieActor(QDomElement const&) (/usr/lib64/liblibmediaelch.so+0xdb1c4f)
#5 0x7fa7a43aacbc in mediaelch::kodi::MovieXmlReader::parseNfoDom(QDomDocument) (/usr/lib64/liblibmediaelch.so+0xdaacbc)
#6 0x7fa7a43e51b4 in KodiXml::loadMovie(Movie*, QString) (/usr/lib64/liblibmediaelch.so+0xde51b4)
#7 0x7fa7a442d4de in MovieController::loadData(MediaCenterInterface*, bool, bool) (/usr/lib64/liblibmediaelch.so+0xe2d4de)
#8 0x7fa7a445664d (/usr/lib64/liblibmediaelch.so+0xe5664d)
#9 0x7fa7a445d5e9 (/usr/lib64/liblibmediaelch.so+0xe5d5e9)
#10 0x7fa7a445d78e (/usr/lib64/liblibmediaelch.so+0xe5d78e)
#11 0x7fa7a4463a9f in QtConcurrent::IterateKernel<Movie* const*, void>::forThreadFunction() (/usr/lib64/liblibmediaelch.so+0xe63a9f)
#12 0x7fa7a446343b in QtConcurrent::IterateKernel<Movie* const*, void>::threadFunction() (/usr/lib64/liblibmediaelch.so+0xe6343b)
#13 0x7fa7a1a63a5c in QtConcurrent::ThreadEngineBase::run() (/usr/lib64/libQt5Concurrent.so.5+0x3a5c)
Direct leak of 226992 byte(s) in 4729 object(s) allocated from:
#0 0x7fa7a5badf47 in operator new(unsigned long) (/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/libasan.so.6+0xadf47)
#1 0x7fa7a413a21b in Actors::addActor(Actor) (/usr/lib64/liblibmediaelch.so+0xb3a21b)
#2 0x7fa7a47927ed in TvShowEpisode::addActor(Actor) (/usr/lib64/liblibmediaelch.so+0x11927ed)
#3 0x7fa7a439f6eb in mediaelch::kodi::EpisodeXmlReader::parseNfoDom(QDomElement) (/usr/lib64/liblibmediaelch.so+0xd9f6eb)
#4 0x7fa7a43f216e in KodiXml::loadTvShowEpisode(TvShowEpisode*, QString) (/usr/lib64/liblibmediaelch.so+0xdf216e)
#5 0x7fa7a478de4f (/usr/lib64/liblibmediaelch.so+0x118de4f)
#6 0x7fa7a478e38e in TvShowEpisode::loadData(MediaCenterInterface*, bool, bool) (/usr/lib64/liblibmediaelch.so+0x118e38e)
#7 0x7fa7a4799181 in TvShowFileSearcher::loadEpisodeData(TvShowEpisode*) (/usr/lib64/liblibmediaelch.so+0x1199181)
#8 0x7fa7a47abbd0 in QtConcurrent::FunctionWrapper1<TvShowEpisode*, TvShowEpisode*>::operator()(TvShowEpisode*) (/usr/lib64/liblibmediaelch.so+0x11abbd0)
#9 0x7fa7a47ab2f1 in QtConcurrent::MappedReducedKernel<QVector<TvShowEpisode*>, TvShowEpisode* const*, QtConcurrent::FunctionWrapper1<TvShowEpisode*, TvShowEpisode*>, QtPrivate::PushBackWrapper, QtConcurrent::ReduceKernel<QtPrivate::PushBackWrapper, QVector<TvShowEpisode*>, TvShowEpisode*> >::runIterations(TvShowEpisode* const*, int, int, QVector<TvShowEpisode*>*) (/usr/lib64/liblibmediaelch.so+0x11ab2f1)
#10 0x7fa7a47ad2a7 in QtConcurrent::IterateKernel<TvShowEpisode* const*, QVector<TvShowEpisode*> >::forThreadFunction() (/usr/lib64/liblibmediaelch.so+0x11ad2a7)
#11 0x7fa7a47ab671 in QtConcurrent::IterateKernel<TvShowEpisode* const*, QVector<TvShowEpisode*> >::threadFunction() (/usr/lib64/liblibmediaelch.so+0x11ab671)
#12 0x7fa7a1a63a5c in QtConcurrent::ThreadEngineBase::run() (/usr/lib64/libQt5Concurrent.so.5+0x3a5c)
Direct leak of 85776 byte(s) in 1787 object(s) allocated from:
#0 0x7fa7a5badf47 in operator new(unsigned long) (/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/libasan.so.6+0xadf47)
#1 0x7fa7a413a21b in Actors::addActor(Actor) (/usr/lib64/liblibmediaelch.so+0xb3a21b)
#2 0x7fa7a443cf50 in MovieCrew::addActor(Actor) (/usr/lib64/liblibmediaelch.so+0xe3cf50)
#3 0x7fa7a4420e52 in Movie::addActor(Actor) (/usr/lib64/liblibmediaelch.so+0xe20e52)
#4 0x7fa7a43b1c4f in mediaelch::kodi::MovieXmlReader::movieActor(QDomElement const&) (/usr/lib64/liblibmediaelch.so+0xdb1c4f)
#5 0x7fa7a43aacbc in mediaelch::kodi::MovieXmlReader::parseNfoDom(QDomDocument) (/usr/lib64/liblibmediaelch.so+0xdaacbc)
#6 0x7fa7a43e51b4 in KodiXml::loadMovie(Movie*, QString) (/usr/lib64/liblibmediaelch.so+0xde51b4)
#7 0x7fa7a442d4de in MovieController::loadData(MediaCenterInterface*, bool, bool) (/usr/lib64/liblibmediaelch.so+0xe2d4de)
#8 0x7fa7a445664d (/usr/lib64/liblibmediaelch.so+0xe5664d)
#9 0x7fa7a445d5e9 (/usr/lib64/liblibmediaelch.so+0xe5d5e9)
#10 0x7fa7a445d78e (/usr/lib64/liblibmediaelch.so+0xe5d78e)
#11 0x7fa7a4463a9f in QtConcurrent::IterateKernel<Movie* const*, void>::forThreadFunction() (/usr/lib64/liblibmediaelch.so+0xe63a9f)
#12 0x7fa7a446343b in QtConcurrent::IterateKernel<Movie* const*, void>::threadFunction() (/usr/lib64/liblibmediaelch.so+0xe6343b)
#13 0x7fa7a1a6399c in QtConcurrent::ThreadEngineBase::startBlocking() (/usr/lib64/libQt5Concurrent.so.5+0x399c)
Direct leak of 55728 byte(s) in 1161 object(s) allocated from:
#0 0x7fa7a5badf47 in operator new(unsigned long) (/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/libasan.so.6+0xadf47)
#1 0x7fa7a413a21b in Actors::addActor(Actor) (/usr/lib64/liblibmediaelch.so+0xb3a21b)
#2 0x7fa7a47927ed in TvShowEpisode::addActor(Actor) (/usr/lib64/liblibmediaelch.so+0x11927ed)
#3 0x7fa7a439f6eb in mediaelch::kodi::EpisodeXmlReader::parseNfoDom(QDomElement) (/usr/lib64/liblibmediaelch.so+0xd9f6eb)
#4 0x7fa7a43f216e in KodiXml::loadTvShowEpisode(TvShowEpisode*, QString) (/usr/lib64/liblibmediaelch.so+0xdf216e)
#5 0x7fa7a478de4f (/usr/lib64/liblibmediaelch.so+0x118de4f)
#6 0x7fa7a478e38e in TvShowEpisode::loadData(MediaCenterInterface*, bool, bool) (/usr/lib64/liblibmediaelch.so+0x118e38e)
#7 0x7fa7a4799181 in TvShowFileSearcher::loadEpisodeData(TvShowEpisode*) (/usr/lib64/liblibmediaelch.so+0x1199181)
#8 0x7fa7a47abbd0 in QtConcurrent::FunctionWrapper1<TvShowEpisode*, TvShowEpisode*>::operator()(TvShowEpisode*) (/usr/lib64/liblibmediaelch.so+0x11abbd0)
#9 0x7fa7a47ab2f1 in QtConcurrent::MappedReducedKernel<QVector<TvShowEpisode*>, TvShowEpisode* const*, QtConcurrent::FunctionWrapper1<TvShowEpisode*, TvShowEpisode*>, QtPrivate::PushBackWrapper, QtConcurrent::ReduceKernel<QtPrivate::PushBackWrapper, QVector<TvShowEpisode*>, TvShowEpisode*> >::runIterations(TvShowEpisode* const*, int, int, QVector<TvShowEpisode*>*) (/usr/lib64/liblibmediaelch.so+0x11ab2f1)
#10 0x7fa7a47ad2a7 in QtConcurrent::IterateKernel<TvShowEpisode* const*, QVector<TvShowEpisode*> >::forThreadFunction() (/usr/lib64/liblibmediaelch.so+0x11ad2a7)
#11 0x7fa7a47ab671 in QtConcurrent::IterateKernel<TvShowEpisode* const*, QVector<TvShowEpisode*> >::threadFunction() (/usr/lib64/liblibmediaelch.so+0x11ab671)
#12 0x7fa7a1a6399c in QtConcurrent::ThreadEngineBase::startBlocking() (/usr/lib64/libQt5Concurrent.so.5+0x399c)
Direct leak of 8256 byte(s) in 172 object(s) allocated from:
#0 0x7fa7a5badf47 in operator new(unsigned long) (/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/libasan.so.6+0xadf47)
#1 0x7fa7a413a21b in Actors::addActor(Actor) (/usr/lib64/liblibmediaelch.so+0xb3a21b)
#2 0x7fa7a4770e63 in TvShow::addActor(Actor) (/usr/lib64/liblibmediaelch.so+0x1170e63)
#3 0x7fa7a43c9e4c in mediaelch::kodi::TvShowXmlReader::parseNfoDom(QDomDocument) (/usr/lib64/liblibmediaelch.so+0xdc9e4c)
#4 0x7fa7a43f0662 in KodiXml::loadTvShow(TvShow*, QString) (/usr/lib64/liblibmediaelch.so+0xdf0662)
#5 0x7fa7a47698ff (/usr/lib64/liblibmediaelch.so+0x11698ff)
#6 0x7fa7a4769d80 in TvShow::loadData(MediaCenterInterface*, bool) (/usr/lib64/liblibmediaelch.so+0x1169d80)
#7 0x7fa7a47a1810 in TvShowFileSearcher::setupShowsFromDatabase(QVector<TvShow*>&, int, int) (/usr/lib64/liblibmediaelch.so+0x11a1810)
#8 0x7fa7a4798c59 in TvShowFileSearcher::reload(bool) (/usr/lib64/liblibmediaelch.so+0x1198c59)
#9 0x7fa7a4bd3e05 in FileScannerDialog::onStartTvShowScannerCache() (/usr/lib64/liblibmediaelch.so+0x15d3e05)
#10 0x7fa7a4bda149 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (FileScannerDialog::*)()>::call(void (FileScannerDialog::*)(), FileScannerDialog*, void**) (/usr/lib64/liblibmediaelch.so+0x15da149)
#11 0x7fa7a4bd9f6f in void QtPrivate::FunctionPointer<void (FileScannerDialog::*)()>::call<QtPrivate::List<>, void>(void (FileScannerDialog::*)(), FileScannerDialog*, void**) (/usr/lib64/liblibmediaelch.so+0x15d9f6f)
#12 0x7fa7a4bd94ed in QtPrivate::QSlotObject<void (FileScannerDialog::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (/usr/lib64/liblibmediaelch.so+0x15d94ed)
#13 0x7fa7a2ce12d4 in QObject::event(QEvent*) (/usr/lib64/libQt5Core.so.5+0x2712d4)
#14 0x7fa7a30e2ede in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib64/libQt5Widgets.so.5+0x162ede)
Direct leak of 448 byte(s) in 8 object(s) allocated from:
#0 0x7fa7a5badf47 in operator new(unsigned long) (/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/libasan.so.6+0xadf47)
#1 0x7fa7a48675f0 in FilterWidget::setupMovieFilters() (/usr/lib64/liblibmediaelch.so+0x12675f0)
#2 0x7fa7a48640ee in FilterWidget::setupFilters() (/usr/lib64/liblibmediaelch.so+0x12640ee)
#3 0x7fa7a485fa0d in FilterWidget::setActiveMainWidget(MainWidgets) (/usr/lib64/liblibmediaelch.so+0x125fa0d)
#4 0x7fa7a4c27c0d in Navbar::setActiveWidget(MainWidgets) (/usr/lib64/liblibmediaelch.so+0x1627c0d)
#5 0x7fa7a4becc0c in MainWindow::onMenu(QToolButton*) (/usr/lib64/liblibmediaelch.so+0x15ecc0c)
#6 0x7fa7a4be203a in MainWindow::MainWindow(QWidget*) (/usr/lib64/liblibmediaelch.so+0x15e203a)
#7 0x562dee878e93 in main (/usr/bin/MediaElch+0xee93)
#8 0x7fa7a26dbe5c in __libc_start_main (/lib64/libc.so.6+0x23e5c)
Indirect leak of 9771004 byte(s) in 79740 object(s) allocated from:
#0 0x7fa7a5bac5ff in __interceptor_malloc (/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/libasan.so.6+0xac5ff)
#1 0x7fa7a2b42190 in QArrayData::allocate(unsigned long, unsigned long, unsigned long, QFlags<QArrayData::AllocationOption>) (/usr/lib64/libQt5Core.so.5+0xd2190)
Indirect leak of 256 byte(s) in 8 object(s) allocated from:
#0 0x7fa7a5bac5ff in __interceptor_malloc (/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/libasan.so.6+0xac5ff)
#1 0x7fa7a2b7040f in QListData::detach_grow(int*, int) (/usr/lib64/libQt5Core.so.5+0x10040f)
SUMMARY: AddressSanitizer: 11330220 byte(s) leaked in 112225 allocation(s).
With last commit no crash appears!
Finally! 🎉 💯 🚀
I'll merge the PR with a slight modification (I only remove the processEvents() call for the movie file searcher).
Thank you very much for all your testing. I'll mention you in the changelog and upcoming blog post if it's fine with you. :-)
The errors about leaked are not all correct. The Actor leak is indeed a leak and will be fixed in another PR (though probably not in v2.8.12 just to be sure that it doesn't cause any other bugs). There are some leaks that I can't fix at the moment (e.g. FilterXYZ) because of how the code is structured. A lot of legacy coding there. And there are a lot of false positives that happen due to how Qt works. I tried to fix all of them once only to find out that the leak sanitizer doesn't work well with Qt.