WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: XBMC won't load.  (Read 24706 times)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11704
Re: XBMC won't load.
« Reply #30 on: September 14, 2012, 04:49:56 PM »
Hi cURIOUSgEORGE
Quote
I expected you to give up by now anyhow, but, you didn't, you kept on trying too help, and help and help,
Yeah, I can be pretty stubborn at times.

Offline whoisterence

  • Newbie
  • *
  • Posts: 27
Re: XBMC won't load.
« Reply #31 on: January 17, 2013, 05:52:42 AM »
I can also get XBMC compiled but not execute. 

when I call xbmc, I can see that it runs the bash script in /usr/local/bin/xbmc all the way to the line where it runs /usr/local/lib/xbmc/xbmc.bin here

Code: [Select]
LOOP=1
while [ $(( $LOOP )) = "1" ]
do
  echo $LOOP $SAVED_ARGS
  LOOP=0
  echo run
  "$LIBDIR/xbmc/xbmc.bin" $SAVED_ARGS
  RET=$?
  echo $LOOP $SAVED_ARGS RET=$RET
  if [ $(( $RET == 65 )) = "1" ]
  then # User requested to restart app
    LOOP=1
  elif [ $(( ($RET >= 131 && $RET <= 136) || $RET == 139 )) = "1" ]
  then # Crashed with core dump
    print_crash_report
  fi

which outputs:
1
run

But since xbmc.bin doesn't crash it just hangs there, I can't even find the log file in /home/tc

I can spend some time to dig into the XBMC source, but I wonder if there's a way to do this without putting fprintf in the code and recompiling (since xbmc has a lot of dependencies, compiling it is a pain) to find the cupid?

xbmc.cpp
Code: [Select]
int main(int argc, char* argv[])
{
  int status = -1;
  //this can't be set from CAdvancedSettings::Initialize() because it will overwrite
  //the loglevel set with the --debug flag
#ifdef _DEBUG
  g_advancedSettings.m_logLevel     = LOG_LEVEL_DEBUG;
  g_advancedSettings.m_logLevelHint = LOG_LEVEL_DEBUG;
#else
  g_advancedSettings.m_logLevel     = LOG_LEVEL_NORMAL;
  g_advancedSettings.m_logLevelHint = LOG_LEVEL_NORMAL;
#endif
  CLog::SetLogLevel(g_advancedSettings.m_logLevel);

#ifdef _LINUX
#if defined(DEBUG)
  struct rlimit rlim;
  rlim.rlim_cur = rlim.rlim_max = RLIM_INFINITY;
  if (setrlimit(RLIMIT_CORE, &rlim) == -1)
    CLog::Log(LOGDEBUG, "Failed to set core size limit (%s)", strerror(errno));
#endif
  // Prevent child processes from becoming zombies on exit if not waited upon. See also Util::Command
  struct sigaction sa;
  memset(&sa, 0, sizeof(sa));

  sa.sa_flags = SA_NOCLDWAIT;
  sa.sa_handler = SIG_IGN;
  sigaction(SIGCHLD, &sa, NULL);
#endif
  setlocale(LC_NUMERIC, "C");
  g_advancedSettings.Initialize();
 
#ifndef _WIN32
  CAppParamParser appParamParser;
  appParamParser.Parse((const char **)argv, argc);
#endif
  g_application.Preflight();
  if (!g_application.Create())
  {
    fprintf(stderr, "ERROR: Unable to create application. Exiting\n");
    return status;
  }

  try
  {
    status = g_application.Run();
  }
  catch(...)
  {
    fprintf(stderr, "ERROR: Exception caught on main loop. Exiting\n");
    status = -1;
  }

  return status;
}

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11050
Re: XBMC won't load.
« Reply #32 on: January 17, 2013, 06:22:45 AM »
Usually you'd use strace to see how far it gets.
The only barriers that can stop you are the ones you create yourself.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11704
Re: XBMC won't load.
« Reply #33 on: January 17, 2013, 08:40:42 AM »
Hi whoisterence
I don't know if it's relevant, but:
Code: [Select]
echo $LOOP $SAVED_ARGS
Quote
which outputs:
1
run
Code: [Select]
"$LIBDIR/xbmc/xbmc.bin" $SAVED_ARGSYou are passing an empty string to  xmbc.bin.

Offline whoisterence

  • Newbie
  • *
  • Posts: 27
Re: XBMC won't load.
« Reply #34 on: January 17, 2013, 09:13:35 PM »
Did the strace, attached.

Looks like xbmc scaned for hard drives and for some reason scan for an empty filename, and then it loops forever.

Code: (bash) [Select]
stat64("/dev/sr14", 0xbfc3ced4)         = -1 ENOENT (No such file or directory)
stat64("/dev/sr15", 0xbfc3ced4)         = -1 ENOENT (No such file or directory)
stat64("/dev/sr16", 0xbfc3ced4)         = -1 ENOENT (No such file or directory)
stat64("/dev/sr17", 0xbfc3ced4)         = -1 ENOENT (No such file or directory)
stat64("/dev/sr18", 0xbfc3ced4)         = -1 ENOENT (No such file or directory)
stat64("/dev/sr19", 0xbfc3ced4)         = -1 ENOENT (No such file or directory)
stat64("/dev/sr20", 0xbfc3ced4)         = -1 ENOENT (No such file or directory)
stat64("/dev/sr21", 0xbfc3ced4)         = -1 ENOENT (No such file or directory)
stat64("/dev/sr22", 0xbfc3ced4)         = -1 ENOENT (No such file or directory)
stat64("/dev/sr23", 0xbfc3ced4)         = -1 ENOENT (No such file or directory)
stat64("/dev/sr24", 0xbfc3ced4)         = -1 ENOENT (No such file or directory)
stat64("/dev/sr25", 0xbfc3ced4)         = -1 ENOENT (No such file or directory)
stat64("/dev/sr26", 0xbfc3ced4)         = -1 ENOENT (No such file or directory)
stat64("/dev/sr27", 0xbfc3ced4)         = -1 ENOENT (No such file or directory)
stat64(" \t\n\r", 0xbfc3ced4)           = -1 ENOENT (No such file or directory)
stat64(" \t\n\r", 0xbfc3ced4)           = -1 ENOENT (No such file or directory)
stat64(" \t\n\r", 0xbfc3ced4)           = -1 ENOENT (No such file or directory)
stat64(" \t\n\r", 0xbfc3ced4)           = -1 ENOENT (No such file or directory)
stat64(" \t\n\r", 0xbfc3ced4)           = -1 ENOENT (No such file or directory)
stat64(" \t\n\r", 0xbfc3ced4)           = -1 ENOENT (No such file or directory)
stat64(" \t\n\r", 0xbfc3ced4)           = -1 ENOENT (No such file or directory)
stat64(" \t\n\r", 0xbfc3ced4)           = -1 ENOENT (No such file or directory)
stat64(" \t\n\r", 0xbfc3ced4)           = -1 ENOENT (No such file or directory)
stat64(" \t\n\r", 0xbfc3ced4)           = -1 ENOENT (No such file or directory)
stat64(" \t\n\r", 0xbfc3ced4)           = -1 ENOENT (No such file or directory)
stat64(" \t\n\r", 0xbfc3ced4)           = -1 ENOENT (No such file or directory)

Attached ls /dev

Maybe this has something to do with all the loopbacks in /dev?

Offline Arslan S.

  • Hero Member
  • *****
  • Posts: 825
Re: XBMC won't load.
« Reply #35 on: January 18, 2013, 03:17:09 AM »
xbmc is available in the repository
if you want to compile it see tc-ext-tools

Offline whoisterence

  • Newbie
  • *
  • Posts: 27
Re: XBMC won't load.
« Reply #36 on: January 18, 2013, 05:33:16 AM »
I tried to run it from xbmc.tcz before and it hanged just like the problems mentioned in this thread, which I believe is the same issue here.

I am looking at xbmc source now.  Found for some reason I needed to copy these two files
/usr/local/share/xbmc/userdata/RssFeeds.xml > ~/.xbmc/userdata
/usr/local/share/xbmc/userdata/LCD.xml > ~/.xbmc/userdata

After copying I got further and now have a xbmc.log file, I am guessing that I got to the point where the log file can be flushed.

I believe the problem is xbmc not resolving some internal file paths properly due to /usr/share/xbmc is located in /usr/local/share.

But now it's looking for a guisettings.xml file that's probably dynamically generated....

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: XBMC won't load.
« Reply #37 on: January 18, 2013, 09:55:13 AM »
I don't have any problems loading XBMC, but I do have issues running it in Xorg.  too much lag to be useable, mouse curser moves incredibly slowly and inputs from the keyboard also responds slowly if not frozen up.

just an FYI 

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11050
Re: XBMC won't load.
« Reply #38 on: January 18, 2013, 03:13:25 PM »
Seems XBMC has pretty bad code, using a lot of cpu to poll all devices:
https://lwn.net/Articles/532329/
The only barriers that can stop you are the ones you create yourself.

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: XBMC won't load.
« Reply #39 on: January 18, 2013, 03:25:57 PM »
It's a shame because it runs flawless in Windows and Mac's


Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11050
Re: XBMC won't load.
« Reply #40 on: January 18, 2013, 04:25:32 PM »
Have you checked the cpu usage on those Windows and Macs? ;)
The only barriers that can stop you are the ones you create yourself.

Offline Arslan S.

  • Hero Member
  • *****
  • Posts: 825
Re: XBMC won't load.
« Reply #41 on: January 18, 2013, 04:33:44 PM »
If you load graphics drivers fps should be fine

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: XBMC won't load.
« Reply #42 on: January 19, 2013, 01:03:12 AM »
H'mmm  will investigate..  but iirc have tried already using the nvidia drivers with an nvidia graphics card, I probably didn't configure Xorg anyhow.

The Windows machine has two monitors, one a systems monitor and the other "the Big screen'  am not sure that cpu usage increased with XBMC,  can't be sure about the Mac though.   but will revisit both and report back