-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Working 10.11 version of driver #80
Comments
First run gives kernel panic.
|
The fourth entry, that's coming from EMUUSBAudioDevice::start(IOService*) (in EMUUSBAudio) (EMUUSBAudioDevice.cpp:139) |
The log file does not even show the ::start message. |
The actual code there is
Tried to replace the OSDynamic cast with a straightforward cpp cast |
No, again instant crash, not a single EMU message comes into the log. Now we have this
which SEEMS to be further down the driver
|
fixed debugger messages |
… 10.11 driver. This must be turned off to compile a working driver.
Turning on debug logs seems not to work properly. |
If I put some large sleep after each printf, the printf shows, but it still does not end up in the system.log |
Maybe the printf's never make it really into the file because of some caching? |
the checkUHCI only checks if the current device has the name "AppleUSBUHCI", to avoid using that. I can't find any documentation if string comparison is right way to go here. Apparently the call to IOUSBDevice#)getDevice is crashing internally. |
It's something in the system driver crashing. Maybe I can try this
|
Logging issue may be this http://stackoverflow.com/questions/12047943/why-isnt-my-kernel-extension-writing-to-kernel-log |
Checking the man pages of kextutil and kext_logging. The latter points to the file Checked that this file is identical on my 10.9 and 10.11 |
I added a sleep of 1 second (!!!) to every call to log. I can see that my debugIOLog calls ARE being logged into system.log (I see them appear there if I have tail -f /var/log/system.log running) However, after the crash, there is completely NOTHING in the file. There is a complete TWO MINUTES missing between the moment the driver had been installed till the moment OSX reboots.
|
Trying this bizarre hack:
which should copy my system.log file text immediately to log.log when new entries appear..... |
No, that doesn't work either. This file also does not contain the last minute or so. I suspect something is being cached and never gets flushed to the drive |
posted bug #27162632 with apple
Apple replied, and only 5 days after I posted:
|
Maybe the problems are caused by the protectedinitHardware running in a separate thread? |
The driver in 10.9 seems to work fine also if I do the init not in a separate thread but call it straight like
Advantage of this is that I can return proper true iff driver started up properly. |
Didn't really help, I get another panic
|
This time, no messages are logged at all to system.log. The crash seems to occur instantly the moment I turn on the device. Even though I do IOSleep(1000) (1 second!) and call debugIOLogC as first action in EMUUSBAudioDevice::start(). |
Maybe the printf or the IOSleep are causing the problems? |
No, that is not likely, as the processing runs fine across several calls to debugIOLogC. I suppose it would hang in start() if that were the case. Instead something seems to go wrong with the address of the call. I would expect that getDevice() would bring us into IOUSBHostDevice, supposedly part of USBHostFamily? |
When I start the engine with HALLab tools, I see this in console
|
THis error code is new to me. Trying to decypher it. 24e08a00 = 0010 0100 1110 0000 1000 1010 0000 0000 Splitting in 6, 12, 14: this makes no sense at all when checking the IOReturn values. |
Checking the system error codes. Spread over USB.h, mach/error.h, IOReturn.h, OSReturn.h, err_libkern.sub, etc.... But none of these contais system code 0x09. found these ones:
Seems these types can also be decoded using system.h (GNU C Library, eg https://fossies.org/dox/glibc-2.23/errstring_8c_source.html#l00067) but I cant find the sources... |
Maybe the problem is that I release the pipe after findpipe got it, to match the original code that hat to claim the pipe? |
If I do not call the release, indeed things seem to work better. I now get this
|
The extra messages probably was just the debug logging level changed. In the 10.9 driver This is what I get in the 10.9 version of the driver. Notice that there are no findPipe messages here because we do not stub the findPipe function in 10.9
|
Tried to use OSDynamicCast in findPipe to convert the IOUSBHostPipe* into an IOUSBPipe. That changes the error code from the pipe->io() (call to Read) to 0010 1001 1101 0110 0101 1111 0000 0000 00 1010 =0x0a Still makes no sense. Is this just a completely messed up call? |
oooops some of the IOUSBPipe functions are virtual! This is just totally wrong, that will modify the original structures and cause completely bad calls. |
Yes, that was the problem. We now have some sound! |
Needed stil
|
Done brief tests
|
If I switch to 192k the control panel crashes. Not clear yet if we switch to 192 or not. |
Made ticket #81 for control panel |
While cleaning up the code, something broke again in the project. Again had to revert to last saved version. There seems something broken in XCode 7, I never had these problems before |
Maybe that problem was related to this compiler warning I had
After I removed the EMUUSBAudio-Info-11.plist from the Build Phase/Copy Bundle Resources items the problem seems resolved. Need to check if this solution really works. |
I have to compile the kext for 10.9 on 10.9 Compile with XCode 7 on OSX 10.11 gives this when I try to load in 10.9:
|
…ailures (some builds worked, some builds didn’t, and the project seemed to break for no reasons).
Compiling on 10.9 seems still ok with above fix. This seems the proper solution. Committed that change |
Still need to bump the version of the driver |
When I separate the code properly, I can not keep the inline annotations I dropped them, hoping that the compiler is smart enough |
fixed the documentations, readme, installation instructions etc. |
Let's see if we can get the 10.11 version of the driver actually working
The text was updated successfully, but these errors were encountered: