Kodi Community Forum
Win XBMC crashes when XBOX-controller disconnects - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Windows (https://forum.kodi.tv/forumdisplay.php?fid=59)
+---- Thread: Win XBMC crashes when XBOX-controller disconnects (/showthread.php?tid=129274)

Pages: 1 2 3 4 5 6 7 8 9 10 11


RE: XBMC crashes when XBOX-controller disconnects - tjcinnamon - 2012-04-26

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



RE: XBMC crashes when XBOX-controller disconnects - evil-B - 2012-04-26

Microsoft DirectX SDK must be installed.


RE: XBMC crashes when XBOX-controller disconnects - tjcinnamon - 2012-04-26

Nice. I already started downloading Smile


RE: XBMC crashes when XBOX-controller disconnects - atsumori - 2012-04-26

(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!


RE: XBMC crashes when XBOX-controller disconnects - evil-B - 2012-04-26

there you go:
http://ryushare.com/3fhqovio9qfg/XBMC.zip


RE: XBMC crashes when XBOX-controller disconnects - HenryFord - 2012-04-26

(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!



RE: XBMC crashes when XBOX-controller disconnects - evil-B - 2012-04-26

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.


RE: XBMC crashes when XBOX-controller disconnects - tjcinnamon - 2012-04-26

atsumori: Can you confirm that this works on your system? I'll check mine when I get home from work.


RE: XBMC crashes when XBOX-controller disconnects - atsumori - 2012-04-26

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.


RE: XBMC crashes when XBOX-controller disconnects - nirvana252 - 2012-04-26

Thank You grabbing patch now to give it a go.


I now get error to play video after applying the patch.


RE: XBMC crashes when XBOX-controller disconnects - tjcinnamon - 2012-04-26

What is the error? What type of file? Are you using a remote? If so, what remote are you using?


RE: XBMC crashes when XBOX-controller disconnects - WiSo - 2012-04-26

(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.


RE: XBMC crashes when XBOX-controller disconnects - tjcinnamon - 2012-04-26

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



RE: XBMC crashes when XBOX-controller disconnects - evil-B - 2012-04-26

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.


RE: XBMC crashes when XBOX-controller disconnects - tjcinnamon - 2012-04-26

Excellent work!

Thanks for taking time to do this!