Win Multithreaded Debugging
#1
Is there a more effective way of debugging the XBMC (multithreaded project) other than using the freeze/thaw options within the Threads window?
Currently debugging in VC++2010 Express. The reason I ask is because I am trying to isolate where an operation on the MainThread is switched to an operation on the JobWorker thread.
I am testing two cases: 1) playing a CD from the internal disc drive and 2) playing a CD from an external disc drive (USB 2.0).
For case 1), the last operation of the MainThread occurs at ln650 in WinEventsWin32.cpp and then the operation switched to JobWorker ln44 in CDDADirectory.cpp.
For case 2), the last operation of the MainThread occurs at ln650 in WinEventsWin32.cpp after which a dialog appears asking for a CD to be inserted, even if one has already been inserted. Once the CD is reinserted the same dialog appears. Procedurally, the JobWorker thread is not invoked and ln44 in CDDADirectory.cpp is never executed for this case. This is a bug and would appreciate any input you may have.
Reply
#2
Try setting a breakpoint at ln765, insert your DVD and follow the code path by pressing F11 to see if it reaches ln773 at all.
Then set a breakpoint in Win32StorageProvider.cpp ln98 and see what it does.
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.
Reply
#3
Thank you for your input. I was able to continue on debugging the specific bug I am experiencing with respect to playing CDs from an external disc drive. In Win32StorageProvider.cpp ln78, 'GetFirstOpticalDrive() returns "\\.\D:" regardless (for external or internal disc drives). The disc drive letter of "E:\" associated with my external disc drive is never read. If I make the following assignment to m_strFirstAvailableDrive ="\\.\E:" then I can recreate the bug for my internal disc drive, but it doesn't solve the problem of accessing the audio files form the external disc drive. The dialog box I get after choosing 'ESadAudio-CD)' had "DVD Drive" as a heading and "Please insert disc" as the text message, which I was able to follow via debugging in GuiDialogBoxBase.cpp. Just to step back a bit, I can mention that once XBMC initiates and I select Music from the home menu, at some point the code goes into VirtualDirectory.cpp, GetSources(VECSOURCES & shares) const share.m_iDriveType == CmediaSource::SOURCE_TYPE_DVD (is true) and share.strPath = “E:” when passed in gets set to “cdda://local/”. Then once in bool CvirtualDirectory::GetDirectory(const CstdString& strPath, CfileItemList &items, bool bUseFileDirectories), strPath = “”. Under successful operating conditions with the internal drive, the code progresses to CDDADirectory.cpp, but this doesn't happen for the external disc drive.
I would appreciate your input.
Thank you!
Reply
#4
I'm not sure if I understand you correctly but I think you hit a limitation of XBMC. XBMC's origin was the xbox and thus supports only one optical drive. This hasn't changed as one has to rewrite quite some stuff to support it. cdda:// is a call into XBMC's virtual file system and indicates that we want to open an audio cd. Unfortunately the protocol doesn't deliver a device so XBMC just uses the first drive available.
To support more than one optical drive one would have to extend the protocol(s) like vlc does i.e. cdda://e: and do this differently on any other platform XBMC supports.
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.
Reply

Logout Mark Read Team Forum Stats Members Help
Multithreaded Debugging0