Subscription: crash when adding an existing subscription
Reproduction:
- call
servicePtr->addSubscription(char_mrl)
with a link - Wait for the refresh
- call
servicePtr->addSubscription(char_mrl)
with the same link
Crash:
2022-10-26 13:48:57.180 8173-11587 libc++abi org.videolan.vlc.debug E terminating with uncaught exception of type medialibrary::sqlite::errors::ConstraintUnique: Request [INSERT INTO Task(attempts_left, type, mrl, file_type, link_to_id, link_to_type, link_extra, link_to_mrl)VALUES(?, ?, ?, ?, ?, 0, 0, '')] aborted due to constraint violation (UNIQUE constraint failed: Task.mrl, Task.type, Task.link_to_id, Task.link_to_type, Task.link_extra, Task.link_to_mrl)
2022-10-26 13:48:57.183 8173-11587 libc org.videolan.vlc.debug A Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 11587 (DefaultDispatch), pid 8173 (main)
2022-10-26 13:48:58.038 11892-11892 DEBUG pid-11892 A Cmdline: org.videolan.vlc.debug
2022-10-26 13:48:58.038 11892-11892 DEBUG pid-11892 A pid: 8173, tid: 11587, name: DefaultDispatch >>> org.videolan.vlc.debug <<<
2022-10-26 13:48:58.038 11892-11892 DEBUG pid-11892 A #01 pc 000000000009e8e8 /data/app/~~XrosotsLD5XfqPQBg-ZgGg==/org.videolan.vlc.debug-hzYLnpGDzltIbI_uEhRnLg==/lib/arm64/libc++_shared.so (BuildId: fe1b5f695d356c857834778696686059de87f7f8)
2022-10-26 13:48:58.038 11892-11892 DEBUG pid-11892 A #02 pc 000000000009eadc /data/app/~~XrosotsLD5XfqPQBg-ZgGg==/org.videolan.vlc.debug-hzYLnpGDzltIbI_uEhRnLg==/lib/arm64/libc++_shared.so (BuildId: fe1b5f695d356c857834778696686059de87f7f8)
2022-10-26 13:48:58.038 11892-11892 DEBUG pid-11892 A #03 pc 00000000000b0530 /data/app/~~XrosotsLD5XfqPQBg-ZgGg==/org.videolan.vlc.debug-hzYLnpGDzltIbI_uEhRnLg==/lib/arm64/libc++_shared.so (BuildId: fe1b5f695d356c857834778696686059de87f7f8)
2022-10-26 13:48:58.038 11892-11892 DEBUG pid-11892 A #04 pc 00000000000afe38 /data/app/~~XrosotsLD5XfqPQBg-ZgGg==/org.videolan.vlc.debug-hzYLnpGDzltIbI_uEhRnLg==/lib/arm64/libc++_shared.so (__cxa_rethrow+196) (BuildId: fe1b5f695d356c857834778696686059de87f7f8)
2022-10-26 13:48:58.038 11892-11892 DEBUG pid-11892 A #05 pc 00000000001df798 /data/app/~~XrosotsLD5XfqPQBg-ZgGg==/org.videolan.vlc.debug-hzYLnpGDzltIbI_uEhRnLg==/lib/arm64/libmla.so (long medialibrary::sqlite::Tools::executeInsert<unsigned int const&, medialibrary::parser::Task::Type, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, medialibrary::IFile::Type, medialibrary::IService::Type&>(medialibrary::sqlite::Connection*, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, unsigned int const&, medialibrary::parser::Task::Type&&, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, medialibrary::IFile::Type&&, medialibrary::IService::Type&)+520) (BuildId: b1932553b9a19fdc9a165d3bc15ccaec7462c5ef)
2022-10-26 13:48:58.038 11892-11892 DEBUG pid-11892 A #06 pc 00000000001d846c /data/app/~~XrosotsLD5XfqPQBg-ZgGg==/org.videolan.vlc.debug-hzYLnpGDzltIbI_uEhRnLg==/lib/arm64/libmla.so (medialibrary::parser::Task::create(medialibrary::MediaLibrary const*, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, medialibrary::IService::Type)+468) (BuildId: b1932553b9a19fdc9a165d3bc15ccaec7462c5ef)
2022-10-26 13:48:58.038 11892-11892 DEBUG pid-11892 A #07 pc 000000000022b10c /data/app/~~XrosotsLD5XfqPQBg-ZgGg==/org.videolan.vlc.debug-hzYLnpGDzltIbI_uEhRnLg==/lib/arm64/libmla.so (medialibrary::Service::addSubscription(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >)+76) (BuildId: b1932553b9a19fdc9a165d3bc15ccaec7462c5ef)
2022-10-26 13:48:58.038 11892-11892 DEBUG pid-11892 A #08 pc 0000000000110304 /data/app/~~XrosotsLD5XfqPQBg-ZgGg==/org.videolan.vlc.debug-hzYLnpGDzltIbI_uEhRnLg==/lib/arm64/libmla.so (addSubscription(_JNIEnv*, _jobject*, _jobject*, int, _jstring*)+196) (BuildId: b1932553b9a19fdc9a165d3bc15ccaec7462c5ef)
2022-10-26 13:48:58.038 11892-11892 DEBUG pid-11892 A #11 pc 00000000002dfb24 [anon:dalvik-classes25.dex extracted in memory from /data/app/~~XrosotsLD5XfqPQBg-ZgGg==/org.videolan.vlc.debug-hzYLnpGDzltIbI_uEhRnLg==/base.apk!classes25.dex] (org.videolan.medialibrary.media.MlServiceImpl.addSubscription+16)
2022-10-26 13:48:58.038 11892-11892 DEBUG pid-11892 A #13 pc 0000000000009400 [anon:dalvik-classes6.dex extracted in memory from /data/app/~~XrosotsLD5XfqPQBg-ZgGg==/org.videolan.vlc.debug-hzYLnpGDzltIbI_uEhRnLg==/base.apk!classes6.dex] (org.videolan.vlc.gui.discover.DiscoverBrowserFragment$onCreateView$1$1$invokeSuspend$$inlined$getFromMl$1.invokeSuspend+156)
2022-10-26 13:48:58.039 11892-11892 DEBUG pid-11892 A #17 pc 0000000000276396 [anon:dalvik-classes25.dex extracted in memory from /data/app/~~XrosotsLD5XfqPQBg-ZgGg==/org.videolan.vlc.debug-hzYLnpGDzltIbI_uEhRnLg==/base.apk!classes25.dex] (kotlinx.coroutines.internal.LimitedDispatcher.run+26)
2022-10-26 13:48:58.039 11892-11892 DEBUG pid-11892 A #19 pc 000000000027dd5e [anon:dalvik-classes25.dex extracted in memory from /data/app/~~XrosotsLD5XfqPQBg-ZgGg==/org.videolan.vlc.debug-hzYLnpGDzltIbI_uEhRnLg==/base.apk!classes25.dex] (kotlinx.coroutines.scheduling.TaskImpl.run+6)
2022-10-26 13:48:58.039 11892-11892 DEBUG pid-11892 A #21 pc 000000000027ce76 [anon:dalvik-classes25.dex extracted in memory from /data/app/~~XrosotsLD5XfqPQBg-ZgGg==/org.videolan.vlc.debug-hzYLnpGDzltIbI_uEhRnLg==/base.apk!classes25.dex] (kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely+2)
2022-10-26 13:48:58.039 11892-11892 DEBUG pid-11892 A #23 pc 000000000027bb92 [anon:dalvik-classes25.dex extracted in memory from /data/app/~~XrosotsLD5XfqPQBg-ZgGg==/org.videolan.vlc.debug-hzYLnpGDzltIbI_uEhRnLg==/base.apk!classes25.dex] (kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask+34)
2022-10-26 13:48:58.039 11892-11892 DEBUG pid-11892 A #25 pc 000000000027bcc0 [anon:dalvik-classes25.dex extracted in memory from /data/app/~~XrosotsLD5XfqPQBg-ZgGg==/org.videolan.vlc.debug-hzYLnpGDzltIbI_uEhRnLg==/base.apk!classes25.dex] (kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker+56)
2022-10-26 13:48:58.039 11892-11892 DEBUG pid-11892 A #27 pc 000000000027bc70 [anon:dalvik-classes25.dex extracted in memory from /data/app/~~XrosotsLD5XfqPQBg-ZgGg==/org.videolan.vlc.debug-hzYLnpGDzltIbI_uEhRnLg==/base.apk!classes25.dex] (kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run+0)
---------------------------- PROCESS ENDED (8173) for package org.videolan.vlc.debug ----------------------------