Windows - XBMC crashes when XBOX-controller disconnects

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
tjcinnamon Offline
Senior Member
Posts: 249
Joined: Apr 2012
Reputation: 0
Post: #31
Any idea what's going on here?

I see this file: ..\..\XBMC\WIN32\GIT_REV.H (however it's in all lower case). Not sure if it's case sensitive

Build started 4/26/2012 8:27:13 AM.
1>Project "C:\XBMCode\project\VS2010Express\XBMC.vcxproj" on node 8 (build target(s)).
1>InitializeBuildStatus:
Touching "XBMC\Release (DirectX)\objs\XBMC.unsuccessfulbuild".
CustomBuild:
Performing Custom Build Tools
1 file(s) copied.
FC: cannot open ..\..\XBMC\WIN32\GIT_REV.H - No such file or folder

1 file(s) copied.
ClCompile:
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /I..\..\ /I..\..\xbmc\ /I..\..\xbmc\win32\ /I..\..\xbmc\cores\dvdplayer /I..\..\lib /I..\..\lib\ffmpeg /I"..\..\lib\ffmpeg\include-xbmc-win32" /I..\..\lib\liblame\include /I..\..\lib\libUPnP\Platinum\Source\Devices\MediaRenderer /I..\..\lib\libUPnP\Platinum\Source\Devices\MediaConnect /I..\..\lib\libUPnP\Platinum\Source\Devices\MediaServer /I..\..\lib\libUPnP\Platinum\Source\Platinum /I..\..\lib\libUPnP\Platinum\Source\Core /I..\..\lib\libUPnP\Neptune\Source\Core /I..\..\lib\libUPnP\Neptune\Source\System\Win32 /I..\..\lib\win32\pcre /I..\..\lib\win32 /Zi /nologo /W3 /WX- /MP /Ox /Ot /Oy /D TARGET_WINDOWS /D _WINDOWS /D _MSVC /D WIN32 /D NDEBUG /D _WIN32_WINNT=0x0501 /D NTDDI_VERSION=0x05010300 /D NOMINMAX /D _USE_32BIT_TIME_T /D HAS_DX /D __STDC_CONSTANT_MACROS /D _VC80_UPGRADE=0x0710 /D _MBCS /GF- /Gm- /EHa /MT /GS /Gy- /arch:SSE /fp:precise /Zc:wchar_t /Zc:forScope /Yc"pch.h" /Fp"XBMC\Release (DirectX)\objs\XBMC.pch" /Fo"XBMC\Release (DirectX)\objs\\" /Fd"XBMC\Release (DirectX)\objs\vc100.pdb" /Gd /TP /wd4996 /FIpch.h /analyze- /errorReport:prompt ..\..\xbmc\win32\pch.cpp /MP
pch.cpp
1>c:\xbmcode\xbmc\win32\pch.h(20): fatal error C1083: Cannot open include file: 'D3DX9.h': No such file or directory
1>Done Building Project "C:\XBMCode\project\VS2010Express\XBMC.vcxproj" (build target(s)) -- FAILED.

Build FAILED.

Time Elapsed 00:00:01.08

Frodo Win 8 Pro x64
Fractal Design Node 605 (looks amazing)
i5 3570K, Asus P8Z77V LK
2x80GB Intel 320 SSD, 4TB NAS
GTX 670x2 SLI, 16GB GSkill Ares
Onkyo RC360 with Paradigm piece-by-piece 5.1 build
Nyxboard and AHK full controlled via XBox Controller
find quote
evil-B Offline
Junior Member
Posts: 28
Joined: Feb 2011
Reputation: 0
Post: #32
Microsoft DirectX SDK must be installed.
find quote
tjcinnamon Offline
Senior Member
Posts: 249
Joined: Apr 2012
Reputation: 0
Post: #33
Nice. I already started downloading Smile

Frodo Win 8 Pro x64
Fractal Design Node 605 (looks amazing)
i5 3570K, Asus P8Z77V LK
2x80GB Intel 320 SSD, 4TB NAS
GTX 670x2 SLI, 16GB GSkill Ares
Onkyo RC360 with Paradigm piece-by-piece 5.1 build
Nyxboard and AHK full controlled via XBox Controller
find quote
atsumori Offline
Member
Posts: 78
Joined: Mar 2011
Reputation: 0
Post: #34
(2012-04-26 15:25)evil-B Wrote:  Point me to a place where I can upload the file if you want it. I don't have any account on mediafire or any other file server.

For those of you who don't have the dev environment, know that Visual Studio Express 2010 is free.

Ugh, sorry, I didn't realize you had to download a client and register to upload at mediafire now. Please upload here if you are still willing:

http://ryushare.com/

You should be able to upload for free up to 400mb without registering or anything.

Once again, thank you for you work on helping us!
find quote
evil-B Offline
Junior Member
Posts: 28
Joined: Feb 2011
Reputation: 0
Post: #35
there you go:
http://ryushare.com/3fhqovio9qfg/XBMC.zip
find quote
HenryFord Offline
Posting Freak
Posts: 1,267
Joined: Jan 2010
Reputation: 19
Post: #36
(2012-04-24 17:37)atsumori Wrote:  There are four debug logs already in this thread, so if somebody could let us know how to flag down the appropriate developer I feel like we could get this fixed!
If you are certain that this is a bug (that is why you should make a forum post first if you are not certain - if there are a lot of people with these problems, it is probably indeed a bug), post it in the bugtracker, since the devs spend way more attention to that:
http://trac.xbmc.org/

Make sure that you read the appopriate How-To's first!

Need help? Check out my XBMC Frodo Guide. It contains full featured guides to Sickbeard and CouchPotato as well.

[Image: all-fanart.jpg]
find quote
evil-B Offline
Junior Member
Posts: 28
Joined: Feb 2011
Reputation: 0
Post: #37
I submitted a ticket a while back about the fact that XBMC did not detect newly activated XBOX controller:
http://trac.xbmc.org/ticket/11220

I left the scene for a few months... it seems that my patch inspired someone. The last entries in the ticket refer to a crash when disconnecting the controller.

Maybe this ticket is the right place to reach a coder in charge.
find quote
tjcinnamon Offline
Senior Member
Posts: 249
Joined: Apr 2012
Reputation: 0
Post: #38
atsumori: Can you confirm that this works on your system? I'll check mine when I get home from work.

Frodo Win 8 Pro x64
Fractal Design Node 605 (looks amazing)
i5 3570K, Asus P8Z77V LK
2x80GB Intel 320 SSD, 4TB NAS
GTX 670x2 SLI, 16GB GSkill Ares
Onkyo RC360 with Paradigm piece-by-piece 5.1 build
Nyxboard and AHK full controlled via XBox Controller
find quote
atsumori Offline
Member
Posts: 78
Joined: Mar 2011
Reputation: 0
Post: #39
Confirmed, the workaround works like a charm. Thank you greatly for helping us evil-B.

Thanks also for the direction HenryFord. I'll try to get a bug report up as soon as I have a moment to dig through and assemble all the information.
find quote
nirvana252 Offline
Junior Member
Posts: 14
Joined: Feb 2011
Reputation: 0
Post: #40
Thank You grabbing patch now to give it a go.


I now get error to play video after applying the patch.
(This post was last modified: 2012-04-26 18:37 by nirvana252.)
find quote
tjcinnamon Offline
Senior Member
Posts: 249
Joined: Apr 2012
Reputation: 0
Post: #41
What is the error? What type of file? Are you using a remote? If so, what remote are you using?

Frodo Win 8 Pro x64
Fractal Design Node 605 (looks amazing)
i5 3570K, Asus P8Z77V LK
2x80GB Intel 320 SSD, 4TB NAS
GTX 670x2 SLI, 16GB GSkill Ares
Onkyo RC360 with Paradigm piece-by-piece 5.1 build
Nyxboard and AHK full controlled via XBox Controller
find quote
WiSo Offline
Team-Kodi Developer
Posts: 2,742
Joined: Oct 2003
Reputation: 0
Location: Germany
Post: #42
(2012-04-26 14:42)evil-B Wrote:  I guess it is not a fix but a workaround. This 'g_Joystick.Reinitialize()' is here to detect new joysticks which were not there when XBMC started... but obviously it doesn't work yet. The reinitialization of the SDL layer crashes, I don't know why and I don't have time nor the will to investigate it deeper.
Official coders, it is up to you now Wink

Nope. CrystalP doesn't have a xbox360 controller and it didn't crash for me anymore with my wired xbox360 controller. If anyone is able to fix it than someone who can reproduce it. That it crashes inside SDL just means that somehow SDL doesn't get the state of the controller somehow. It might be enough that g_Joystick.Reinitialize() just needs to be called somewhere else.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
tjcinnamon Offline
Senior Member
Posts: 249
Joined: Apr 2012
Reputation: 0
Post: #43
I can confirm that the patched version where g_Joystick.Reinitialize() is commented out cannot play videos.

Here is the debug log from when the patched version could not play videos:

http://pastebin.com/PXS2N4bA

Frodo Win 8 Pro x64
Fractal Design Node 605 (looks amazing)
i5 3570K, Asus P8Z77V LK
2x80GB Intel 320 SSD, 4TB NAS
GTX 670x2 SLI, 16GB GSkill Ares
Onkyo RC360 with Paradigm piece-by-piece 5.1 build
Nyxboard and AHK full controlled via XBox Controller
find quote
evil-B Offline
Junior Member
Posts: 28
Joined: Feb 2011
Reputation: 0
Post: #44
ah the usual 'do it yourself' answer from the XBMC dev... I understand your position, I am a long time C++ coder myself but I also understand that this is a very frustrating answer for the standard user. But this is another subject...

OK so I did some debugging against my will Smile

What I found is that, for some unknown reason, sometimes (not all the time on my dev computer) the call to SDL_InitSubSystem() in CJoystick::Reinitialize() throws an exception. This exception is caught by the exception bail out system in XBApplicationEx.cpp. However from this point the g_Joystick object is in an unknown state and in my case crashes in a subsequent call to CJoystick::Update().

I added a m_boInit variable which is set to false until the object is correctly initialized. It is set to true at the end of Initialize() and Reinitialize().
Then all public functions (or functions making calls to SDL_ functions) quickly return if m_boInit is false. From there I was unable to crash XBMC again. I will do some more tests on my HTPC later to make sure it was not just luck.
find quote
tjcinnamon Offline
Senior Member
Posts: 249
Joined: Apr 2012
Reputation: 0
Post: #45
Excellent work!

Thanks for taking time to do this!

Frodo Win 8 Pro x64
Fractal Design Node 605 (looks amazing)
i5 3570K, Asus P8Z77V LK
2x80GB Intel 320 SSD, 4TB NAS
GTX 670x2 SLI, 16GB GSkill Ares
Onkyo RC360 with Paradigm piece-by-piece 5.1 build
Nyxboard and AHK full controlled via XBox Controller
find quote
Post Reply