ConstraintViolation while linking an item to a playlist
SIGABRT: Request [INSERT INTO PlaylistMediaRelation (media_id, mrl, playlist_id, position) VALUES(?1, ?2, ?3,min(?4, (SELECT COUNT(media_id) FROM PlaylistMediaRelation WHERE playlist_id = ?3)))] aborted due to constraint violation (FOREIGN KEY constraint failed)
medialibrary::sqlite::errors::mapToException(char const*, char const*, int) SqliteErrors.h:676
medialibrary::sqlite::Statement::row() SqliteTools.h:207
void medialibrary::sqlite::Tools::executeRequestLocked<long long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, long long&, unsigned int&>(medialibrary::sqlite::Connection*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, long long&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&&&, long long&&&, unsigned int&&&) SqliteTools.h:440
long long medialibrary::sqlite::Tools::executeInsert<long long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, long long&, unsigned int&>(medialibrary::sqlite::Connection*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, long long&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&&&, long long&&&, unsigned int&&&) SqliteTools.h:371
medialibrary::Playlist::add(medialibrary::IMedia const&, unsigned int) Playlist.cpp:219
medialibrary::parser::LinkService::linkToPlaylist(medialibrary::parser::IItem&) LinkService.cpp:93
medialibrary::parser::Worker::mainloop() ParserWorker.cpp:209
void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (medialibrary::parser::Worker::*)(), medialibrary::parser::Worker*> >(void*) type_traits:4280
https://appcenter.ms/orgs/videolan/apps/VLC-for-iOS-production/crashes/errors/1104893177u/overview