Kodi Community Forum

Full Version: Some AVI playback freezes at start
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Simple problem to replicate - I've got a batch of avi files that won't play. The worrying thing about them is that they *used* to play ok, but have stopped. This started around the beginning of December on an XBMC install I built ages ago, but rather than try to debug an older version, I rebuilt the server on the latest stuff before Christmas (yes, I know, "latest" isn't the right word - actual versions are below). Took a while away over the holiday then came back to it, and found that the problem is still there.

I can play some avi files fine under XBMC, but others fail. As soon as we try to start a failing one, we get the "working" ticker, and it just sits there. Debug display shows the CPU jumping to 100%, and the free memory rapidly being chewed up. I've tried leaving it for ages, and if left for long enough, XBMC eventually just dies.

The avi file play fine if I start the box in xubuntu and play them with vlc or movie player. There is nothing in the log to indicate what might be going wrong that I can see, and searching the web doesn't turn up anything similar.

Has anyone any idea what the problem is here? What am I missing?


Symptoms and log:

Debug log: http://pastebin.ubuntu.com/554372/
This is the log from
# Restarting
# Using the front end to enable debugging
# Going to play an avi that works - "Call of Cthulhu"
# Stopping that and trying a broken one - "Bee movie"
Whether xbmc crashes out or has to be restarted, nothing more gets written to the log

I've also put the mediainfo for both files in there, as there's 3 pages of it.

Hardware/software
Built by using a "minimal install" boot, then apt-get of xubuntu-desktop, xbmc and lirc, plus utilities to get info below, and the w32codecs to enable playback

Ubuntu 10.04.1 LTS, Linux zen 2.6.32-27-generic #49-Ubuntu SMP Wed Dec 1 23:52:12 UTC 2010 i686 GNU/Linux

Box is a 1.2GHz atom motherboard with 1Gb RAM ( CN700-8237R, VIA Esther processor 1200MHz)

The Via motherboard is a bit crummy and the onboard graphics card won't play nice with Linux, so I've got a Zotac card instead, nvidia NV34 [GeForce FX 5200] and I'm using the 172 version of the driver as it's the latest one that is compatible.

XBMC - using xbmc-standalone (running xmbc in xubuntu desktop has the same problem), version 10.0 r35648 (compiled Dec 17, 2010)
Can you install gdb, make XBMC hang, then execute "killall -SEGV xbmc.bin" in a terminal and post the crashlog that gets written to your home directory.
Of course! Thanks for those instructions - I was struggling with the gdb instructions before because I wasn't getting a "core" file, but that got me a crash-log at least.

I kept the xbmc debug logging on, started it clean, fired up the same broken avi file. Crash log is pasted it to http://pastebin.ubuntu.com/554826/
No backtrace in the crashlog, that's strange.
Did you cut that off?
Nope, no cuts, that's the whole lot.

I work with computers - I know enough to understand that in this case, I don't know enough about Linux, XBMC or Codecs to work out which bits of a log might be relevant or useful. So I've posted the whole lot.

Any ideas on anything we might do to provoke it into generating a proper crash log? Or getting more info on what it's doing?
After XBMC is started, press \ to make it windowed, press ctrl-alt-f1 to switch to a console, log in, execute "gdb -p `pidof xbmc.bin`", enter "set logging on" and "continue" in gdb, press ctrl-f7 to switch back to XBMC, make XBMC hang (keep it windowed), press ctrl-alt-f1 to go back to gdb, enter "thread apply all bt" in gdb.

You can also use a gnome-terminal, since switching to the console can sometimes crash the nvidia driver.

You now have a gdb.txt written to the working directory with a backtrace in it, please post that file, together with the xbmc.log of that session.
Ok, great, most of that went well...

Got as far as gdb running ok, and swapping back to XBMC to provoke it to hang. As usual, the CPU jumped to 100%, the memory started getting chewed up, and the little whirly "waiting" icon appeared and spun. Nothing really happened until the memory ran out, and the bad news is that gdb failed at that point too - nothing on screen but "segmentation fault", so the "thread apply all bt" part couldn't be run.

The file left behind says simply

Continuing.
[New Thread 0xa83fab70 (LWP 1376)]
[Thread 0xa83fab70 (LWP 1376) exited]
[New Thread 0xa7bf9b70 (LWP 1377)]

XBMC log file is more of the same - start movie, couple of lines of info, then it dies. http://pastebin.ubuntu.com/556384/
When it hangs, press ctrl-c inside gdb and then make the backtrace.
Happens when I put a dvd+r with multiple avis on it in the DVD drive. Put the disc in, give it a few secs to spin up and get mounted and then select videos > disc. The menu disappears and the backdrop displays but hangs there for a few minutes. I decided to replace the drive because it was on the single ide with the main harddrive. I replaced it with a SATA 2 dvd drive. This helped the issue considerably. Before, placing a dvd with avis on it would hang XBMC and it would crash. Now, it comes back after over 2minutes or so.

I get the same thing though, xbmc memory usage spikes considerably eating up over 1/2 gig and I get segfaults in logs.

Moving the avis to the harddrive before starting XBMC is one way around it. Then the files play fine.
toddwv Wrote:Moving the avis to the harddrive before starting XBMC is one way around it. Then the files play fine.
Nope, the problem here from the start was avi files played from the hard disc. Normal DVDs play fine. I've not tried an avi copied down to DVD, but as they won't work from hard disk, I doubt using them from DVD will be any better.
bobo1on1 Wrote:When it hangs, press ctrl-c inside gdb and then make the backtrace.

bobo1on1 Wrote:When it hangs, press ctrl-c inside gdb and then make the backtrace.

Thanks, that seems to have got something. I appreciate your time on walking a newbie through this stuff - my computer experience is generalised and I've never used gdb before, so I am grateful (and I'm learning new stuff - always good!)

Did the same again - made sure logging was enabled, restarted xbmc clean, logged in and ran gdb as instructed in a terminal (from another machine over ssh, in case that might matter?), went to xbmc and played the same broken avi, waited a minute or so to allow it to get itself into whatever the problem is and then as the memory got low, crtl-c'd gdb and got the stack trace.
gdb.txt is at http://pastebin.ubuntu.com/556793/
and the associated xbmc log is http://pastebin.ubuntu.com/556792/
--nudge

Anything in there? I've got more avi's that don't play, and another half complaining and telling me I need to "go get a box that works properly".
Turn off navigation sounds and see if that fixes anything.

Code:
INFO:  cached subtitle subtitle.srt->special://temp/subtitle.alt-srt
It might also be related to that, can you clear the ~/.xbmc/temp directory.

edit: it seems definitely an issue with subtitle loading, how many subtitle files do you have in "/data/films/" ?
bobo1on1 Wrote:Turn off navigation sounds and see if that fixes anything.
Nope

bobo1on1 Wrote:
Code:
INFO:  cached subtitle subtitle.srt->special://temp/subtitle.alt-srt
It might also be related to that, can you clear the ~/.xbmc/temp directory.
Nope

bobo1on1 Wrote:edit: it seems definitely an issue with subtitle loading, how many subtitle files do you have in "/data/films/" ?
Two, but that has cracked the problem. Removing them to another directory (until I want to watch the films they're associated with) fixed it. I spent a bit of time playing with them, and there's a definite pattern

If a subtitle file does not have exactly the same name as another .avi file. (e.g. If I've got MyFilm.avi and a subtitle called MyFilm.srt, it's fine. But if it's myfilm.srt, or subtitles.srt, then it might be a problem), AND the subtitle file goes over the length of an avi I'm trying to play, then it loops.

My "Bee Movie" is 1hr 30mins, and the subtitle file that breaks it is 1hr 45mins. If I chop the end off the subtitle file so that the last sub appears at 1hr 28mins, the movie works.

Thanks for all your help on finding this one, it's much appreciated!