#16675 closed Bugs (Fixed)

Catastrophic failure in ScanArchiveForAssociatedItems due to encrypted rars

Reported by: l-37 Owned by: Ace
Priority: 4 - Normal
Component: Video playback (inc. audio in video and codecs) Version: 16.0 "Jarvis" Final
Severity: Normal Keywords:
Cc: Blocked By:
Blocking: Platform: Linux

Description (last modified by l-37)

Playback fails, if the following conditions are met:

  • OS is Linux
  • video is in a directory that has a rar file with encrypted filenames

Because ScanArchiveForAssociatedItems accesses the rar file, can't handle it, DVDPlayer catches an Unhandled exception:

DEBUG: ScanArchiveForAssociatedItems: Scanning archive ftp://[email protected]/tv-series/news/tests/new/rar-filename-encrypted.rar
DEBUG: CurlFile::Open(0x5d9784f0) ftp://[email protected]/tv-series/news/tests/new/rar-filename-encrypted.rar
ERROR: Action - thread DVDPlayer, Unhandled exception caught in thread process, aborting. auto delete: 0

If the rar file is named "rar-filename-encrypted.rar" (see attached file), then an error message appears:

DEBUG: GOT ANNOUNCEMENT, type: 1, from xbmc, message OnStop
ERROR: Playlist Player: skipping unplayable item: 0, path [ftp://[email protected]/tv-series/news/tests/new/jellyfish-5-mbps-hd-h264.mkv]
DEBUG: Playlist Player: one or more items failed to play... aborting playback
DEBUG: ------ Window Init (DialogOK.xml) ------
INFO: Loading skin file: DialogOK.xml, load type: KEEP_IN_MEMORY

However, even worse, if the rar file was a partial, so for example "rar-filename-encrypted.part1.rar", the playback fails WITHOUT any error messages at all.

Playback failure with "rar-filename-encrypted.rar" (error message): http://pastebin.com/raw/XT6i5hBv

Playback failure with "rar-filename-encrypted.part1.rar" (no error message at all): http://pastebin.com/raw/HHtFAzSk

(sorry for the pastebins, trac file attachments don't work)

Attachments (1)

fail-debug-error-encrypted.rar (2.3 KB) - added by l-37 at 2016-04-11T18:56:52+01:00.
rar archive with encrypted file names

Change History (11)

comment:1 Changed at 2016-04-09T12:59:35+01:00 by FernetMenta

  • Owner changed from FernetMenta to Ace
  • Status changed from new to assigned

comment:2 Changed at 2016-04-09T14:27:56+01:00 by l-37

The problem has been there since a long time, I just never bothered to build a testcase. The commit in question probably only changes the caller site.

I'm gonna run the testcase against an older build, to make sure.

comment:3 Changed at 2016-04-10T13:34:15+01:00 by l-37

My assumption was correct, the same exact bug exist before 1cf51800, the only difference is that the caller is ScanArchiveForSubtitles instead of ScanArchiveForAssociatedItems.

This is from Isengard:

DEBUG: ScanArchiveForSubtitles:: Scanning archive ftp://share:[email protected]:21//tv-series/news/tests/new/rar-filename-encrypted.part1.rar
DEBUG: CurlFile::Open(0x9ab45b20) ftp://USERNAME:[email protected]:21/tv-series/news/tests/new/rar-filename-encrypted.part1.rar
ERROR: Action - thread DVDPlayer, Unhandled exception caught in thread process, aborting. auto delete: 0

http://pastebin.com/raw/i9dTQwFQ

comment:4 Changed at 2016-04-11T14:34:39+01:00 by Ace

Does it only happen with ftp? I couldn't reproduce with smb and locally.

comment:5 Changed at 2016-04-11T18:56:11+01:00 by l-37

No, I can reproduce it with both smb:

DEBUG: CSMBFile::Open - opened smb://10.0.0.3/tv-series/news/tests/new/jellyfish-5-mbps-hd-h264.mkv, fd=10000
DEBUG: ScanForExternalSubtitles: Searching for subtitles...
DEBUG: ScanArchiveForAssociatedItems: Scanning archive smb://10.0.0.3/tv-series/news/tests/new/rar-filename-encrypted.part1.rar
DEBUG: CSMBFile::Open - opened smb://10.0.0.3/tv-series/news/tests/new/rar-filename-encrypted.part1.rar, fd=10001
DEBUG: CSMBFile::Close closing fd 10001
ERROR: Action - thread DVDPlayer, Unhandled exception caught in thread process, aborting. auto delete: 0


and locally (usb mounted drive):

NOTICE: DVDPlayer: Opening: /media/9AC05537C0551AB9/tests/new/jellyfish-5-mbps-hd-h264.mkv
WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
DEBUG: CRenderManager::UpdateDisplayLatency - Latency set to 0 msec
DEBUG: Thread DVDPlayer start, auto delete: false
NOTICE: Creating InputStream
DEBUG: ScanForExternalSubtitles: Searching for subtitles...
DEBUG: ScanArchiveForAssociatedItems: Scanning archive /media/9AC05537C0551AB9/tests/new/rar-filename-encrypted.part1.rar
ERROR: Action - thread DVDPlayer, Unhandled exception caught in thread process, aborting. auto delete: 0


However:

  • Kodi on Windows doesn't seem to be affected (probably the code path in Windows is different), use Linux (Kodibuntu is fine)
  • triple check that the rar archive is not only protected by a password, but that the filenames are encrypted (you don't see filenames unless you know the password)

I'm attaching a filename encrypted rar archive here, put this in a folder with another movie and try to play that movie on Kodi/Linux. That should suffice to reproduce the issue, no need for a ftp setup.

This is a valid rar archive, its just protected by a password and the flag "encrypt file names" was ticked. And that is exactly what the rar algorithm on linux fails to handle, it seems.

Thanks!

Changed at 2016-04-11T18:56:52+01:00 by l-37

rar archive with encrypted file names

comment:6 Changed at 2016-10-08T13:29:50+01:00 by Martijn

  • Priority changed from 5 to 4 - Normal
  • Severity changed from Major to Normal

comment:7 Changed at 2016-11-29T14:05:39Z by l-37

Any other informations needed from my side?

comment:8 Changed at 2018-01-30T21:49:29Z by l-37

  • Description modified (diff)

Krypton is also affected.

RAR supported in Leia has been moved to an addon. The addon works and does not crash Kodi anymore.

So as this will work fine in Leia, this bug can be closed.

Last edited at 2018-01-30T22:07:12Z by l-37 (previous) (diff)

comment:9 Changed at 2018-01-31T04:35:02Z by Martijn

  • Milestone changed from Pending / Future to 18.0 "L*****"
  • Resolution set to Fixed
  • Status changed from assigned to closed

comment:10 Changed at 2018-08-08T20:32:09+01:00 by Martijn

  • Milestone changed from 18.0 "L*****" to 18.0 "Leia"

Milestone renamed

Note: See TracTickets for help on using tickets.