Bug 17192 - [OpenTK] OpenAL fails to initialize if system has an audio device that does not suppert OpenAL
Summary: [OpenTK] OpenAL fails to initialize if system has an audio device that does n...
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 7.0.6.x
Hardware: PC Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Radek Doulik
URL:
Depends on:
Blocks:
 
Reported: 2014-01-11 21:18 UTC by renan jegouzo
Modified: 2017-07-26 18:39 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Test-AudioContext.Zip (1.44 MB, application/zip)
2014-01-14 12:30 UTC, renan jegouzo
Details
application output (18.48 KB, text/plain)
2014-01-15 09:20 UTC, renan jegouzo
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_REPRODUCIBLE

Description renan jegouzo 2014-01-11 21:18:58 UTC
can't debug on the iOS Simulator application that use OpenTK.Audio.AudioContext


Xamarin Studio
Version 4.3.1 (build 3)
Installation UUID: 2a46676f-5eb8-4569-9aa7-630cd15bdfc2
Runtime:
	Mono 3.2.5 ((no/964e8f0)
	GTK+ 2.24.20 theme: Raleigh
	GTK# (2.12.0.0)
	Package version: 302050000

Apple Developer Tools
Xcode 5.0.2 (3335.32)
Build 5A3005

Xamarin.iOS
Version: 7.0.6.166 (Business Edition)
Hash: eac7b15
Branch: 
Build date: 2013-16-12 16:06:53-0500

Build Information
Release ID: 403010003
Git revision: bd21181650b29ffdb2c231beccb76097f3e7a399
Build date: 2014-01-09 00:12:45+0000
Xamarin addins: d56f838106065386208d53d6f1b34240068a919e

Operating System
Mac OS X 10.9.1
Darwin macbook.home 13.0.0 Darwin Kernel Version 13.0.0
    Thu Sep 19 22:22:27 PDT 2013
    root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64
Comment 1 Rolf Bjarne Kvinge [MSFT] 2014-01-13 07:22:45 UTC
Can you attach a complete test project we can use to reproduce this problem?
Comment 2 renan jegouzo 2014-01-13 07:40:27 UTC
I'm using OpenTK not OpenTK-1.0  
as it is too much work to change all my code.
Comment 3 renan jegouzo 2014-01-13 07:57:11 UTC
I'm switching to OpenTK-1.0 I think it must works, as lots of peeps would have complains if not ;)
OpenTK-1.0 seems a come back to the original OpenTK API, same than GTK and OSX version.
Comment 4 renan jegouzo 2014-01-13 08:57:13 UTC
same problem with OpenTK-1.0.. 
and I can't give my project files, it's a big project solution.
Comment 5 renan jegouzo 2014-01-13 09:22:41 UTC
tried with the stable channel

Xamarin.iOS
Version: 7.0.4.209 (Business Edition)
Hash: 23a0827
Branch: 
Build date: 2013-11-11 16:04:00-0500

same problem..

the test is easy just call

var actx=new OpenTK.Audio.AudioContext();

and launch it on the simulator in debug mode
Comment 6 renan jegouzo 2014-01-13 09:30:49 UTC
status changed
Comment 7 Rolf Bjarne Kvinge [MSFT] 2014-01-14 09:20:56 UTC
I created a sample project, added a reference to OpenTK and added this:

    Console.WriteLine (new OpenTK.Audio.AudioContext());

and it works just fine (it prints: "Default Audio Device (handle: 27, device: 26)")

Can you try to create a new project from a template, add your test code and see if that works for you?
Comment 8 renan jegouzo 2014-01-14 12:30:47 UTC
Created attachment 5835 [details]
Test-AudioContext.Zip
Comment 9 renan jegouzo 2014-01-14 12:31:12 UTC
I've done it I have the same problem

System.DllNotFoundException: openal32.dll
  at OpenTK.Audio.AudioContext.CreateContext (System.String device, Int32 freq, Int32 refresh, Boolean sync, Boolean enableEfx, MaxAuxiliarySends efxAuxiliarySends) [0x00010] in /Developer/MonoTouch/Source/opentk/Source/OpenTK/Audio/AudioContext.cs:255
  at OpenTK.Audio.AudioContext..ctor (System.String device, Int32 freq, Int32 refresh, Boolean sync, Boolean enableEfx, MaxAuxiliarySends efxMaxAuxSends) [0x00011] in /Developer/MonoTouch/Source/opentk/Source/OpenTK/Audio/AudioContext.cs:200
  at OpenTK.Audio.AudioContext..ctor () [0x00000] in /Developer/MonoTouch/Source/opentk/Source/OpenTK/Audio/AudioContext.cs:78
  at TestAudioContext.AppDelegate.FinishedLaunching (MonoTouch.UIKit.UIApplication application, MonoTouch.Foundation.NSDictionary launchOptions) [0x00043] in /Users/renanyoy/Projects/Test-AudioContext/Test-AudioContext/AppDelegate.cs:34
  at at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
  at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38
  at TestAudioContext.Application.Main (System.String[] args) [0x00008] in /Users/renanyoy/Projects/Test-AudioContext/Test-AudioContext/Main.cs:16
Comment 10 Rolf Bjarne Kvinge [MSFT] 2014-01-14 12:57:46 UTC
That sample works fine for me.

It does in fact look like something goes wrong when enumerating audio devices on your machine. Are you running in a VM?
Comment 11 renan jegouzo 2014-01-14 15:10:15 UTC
no, it's a mac mini with osx maverick
Comment 12 renan jegouzo 2014-01-14 15:12:29 UTC
no, it's a mac mini with OSX maverick.
And all works fine in the simulator with my projects
developed in objective C using Xcode.
Comment 13 renan jegouzo 2014-01-14 15:15:06 UTC
but I use a http://www.motu.com/products/motuaudio/ultralite-mk3
as sound card.
Comment 14 renan jegouzo 2014-01-14 15:17:01 UTC
but this code was working at summer 2013 with same sound card...
Comment 15 renan jegouzo 2014-01-14 15:17:13 UTC
but this code was working at summer 2013 with same sound card...
Comment 16 Rolf Bjarne Kvinge [MSFT] 2014-01-15 04:33:29 UTC
Can you set the MONO_TRACE environment variable to this:

    N:OpenTK.Audio,N:OpenTK,N:OpenTK.Audio.OpenAL

rerun the app, and attach the application output? Here's a screenshot of where/how to add the environment variable: http://screencast.com/t/DCFwpIdQJ0O
Comment 17 renan jegouzo 2014-01-15 06:04:18 UTC
No matching processes belonging to you were found
Starting iOS simulator 7.0
Launching application
Application launched. PID = 28706
Loaded assembly: /Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll [External]
Loaded assembly: /Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll [External]
Loaded assembly: /Developer/MonoTouch/usr/lib/mono/2.1/System.dll [External]
Thread started:  #2
Loaded assembly: /Users/renanyoy/Downloads/Test-AudioContext/Test-AudioContext/bin/iPhoneSimulator/Debug/TestAudioContext.exe
Loaded assembly: /Developer/MonoTouch/usr/lib/mono/2.1/OpenTK-1.0.dll [External]
Loaded assembly: /Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll [External]
objc[28706]: Class AXEmojiUtilities is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/System/Library/PrivateFrameworks/AccessibilityUtilities.framework/AccessibilityUtilities and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/usr/lib/libAXSpeechManager.dylib. One of the two will be used. Which one is undefined.
2014-01-15 12:03:22.011 TestAudioContext[28706:80b] Cannot find executable for CFBundle 0xe5e1f90 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/System/Library/AccessibilityBundles/MusicLibrary.axbundle> (not loaded)
2014-01-15 12:03:22.015 TestAudioContext[28706:80b] Cannot find executable for CFBundle 0xe5fa850 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/System/Library/AccessibilityBundles/SocialFramework.axbundle> (not loaded)
2014-01-15 12:03:22.016 TestAudioContext[28706:80b] Cannot find executable for CFBundle 0xe5fbca0 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/System/Library/AccessibilityBundles/EventKitUIFramework.axbundle> (not loaded)
2014-01-15 12:03:22.023 TestAudioContext[28706:80b] Cannot find executable for CFBundle 0xe7f2b80 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/System/Library/AccessibilityBundles/CertUIFramework.axbundle> (not loaded)
2014-01-15 12:03:22.025 TestAudioContext[28706:80b] Cannot find executable for CFBundle 0xe5097d0 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/System/Library/AccessibilityBundles/TwitterFramework.axbundle> (not loaded)
2014-01-15 12:03:22.033 TestAudioContext[28706:80b] Cannot find executable for CFBundle 0x16420190 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/System/Library/AccessibilityBundles/StoreKitFramework.axbundle> (not loaded)
2014-01-15 12:03:22.037 TestAudioContext[28706:80b] Cannot find executable for CFBundle 0xe7120d0 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/System/Library/AccessibilityBundles/GeoServices.axbundle> (not loaded)
2014-01-15 12:03:22.052 TestAudioContext[28706:80b] Cannot find executable for CFBundle 0x16424a80 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/System/Library/AccessibilityBundles/GameCenterUIFramework.axbundle> (not loaded)
2014-01-15 12:03:22.055 TestAudioContext[28706:80b] Cannot find executable for CFBundle 0xe185c80 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/System/Library/AccessibilityBundles/PassKitFramework.axbundle> (not loaded)
2014-01-15 12:03:22.065 TestAudioContext[28706:80b] Cannot find executable for CFBundle 0x1652f640 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/System/Library/AccessibilityBundles/iAdFramework.axbundle> (not loaded)
2014-01-15 12:03:22.067 TestAudioContext[28706:80b] Cannot find executable for CFBundle 0x16533150 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/System/Library/AccessibilityBundles/GameKitFramework.axbundle> (not loaded)
2014-01-15 12:03:22.084 TestAudioContext[28706:80b] Cannot find executable for CFBundle 0x16443080 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/System/Library/AccessibilityBundles/StoreKitUI.axbundle> (not loaded)
2014-01-15 12:03:22.086 TestAudioContext[28706:80b] Cannot find executable for CFBundle 0xe35c8b0 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/System/Library/AccessibilityBundles/RemoteUIFramework.axbundle> (not loaded)
Comment 18 renan jegouzo 2014-01-15 06:07:35 UTC
I looked at the Xcode.app, there is no Xcode.app/Contents/Developer folder
Comment 19 Rolf Bjarne Kvinge [MSFT] 2014-01-15 06:15:44 UTC
There should definitively be a /Applications/Xcode.app/Contents/Developer directory. Can you try reinstalling Xcode?
Comment 20 renan jegouzo 2014-01-15 06:20:06 UTC
I've done this already last night..
Comment 21 renan jegouzo 2014-01-15 06:21:49 UTC
but I think I made a mistake checkin it, the folder is there..
Comment 22 renan jegouzo 2014-01-15 06:25:35 UTC
and all the .axbundle are there too
Comment 23 Rolf Bjarne Kvinge [MSFT] 2014-01-15 06:45:10 UTC
In any case those "Cannot find executable for CFBundle..." messages should definitely not appear.

It looks like other people have also run into the same problem: http://stackoverflow.com/q/18036381/183422 - can you try resetting the simulator as those answers suggest?
Comment 24 renan jegouzo 2014-01-15 08:13:06 UTC
but I tell you my simulator works fine will all my xcode (objectiveC) projects, that use this bundles..
Comment 25 renan jegouzo 2014-01-15 08:26:28 UTC
I've deleted again the entire xcode.app folder.. and installing it again too. It will change nothing, OpenAL works just fine for Xcode project in objective C ran in the simulator. The problem only appears with Xamarin projects that use OpenAL and being launched in the iOS simulator.

I'm really annoyed to can't work on my Xamarin.iOS projects since more than 4 months, cause of Xamarin and their bugs...
Comment 26 Rolf Bjarne Kvinge [MSFT] 2014-01-15 08:29:02 UTC
Could you attach (as a file) the complete Application Output as I requested in comment 16 (with the MONO_TRACE environment variable set)? Note that you should get a lot more output than what you pasted in comment 17.
Comment 27 renan jegouzo 2014-01-15 09:20:36 UTC
Created attachment 5842 [details]
application output

thanks!

like you said it's a problem with the device enumerations.
I've unplugged my firewire audio card, and it works.

it could be fine if you could just skip audio cards without openAL.
As this I could continue to hear my music and coding ;)
Comment 28 renan jegouzo 2014-08-31 03:33:09 UTC
still I can't hear my music and use the emulator same time, cause of this bug.. so no emulator until fixed... :/
Comment 29 Dominic N [MSFT] 2017-07-26 18:39:35 UTC
Thank you very much for submitting the report and for providing us with all the information. I have an external USB sound card for a pair of Sennheiser headphones that I used to attempt a reproduction on this issue using the latest Xamarin.iOS bits (10.12.0.14). I was unable to replicate the issue using the provided instructions and steps. If you're still encountering this issue after updating to the latest version, please let us know.

Unfortunately, we don't have the device you're experiencing the issue with, but I can attempt a reproduction again with my external sound card (as long as you can confirm that USB connections exhibit the same issue as well). When responding to this report, please include a sample project (even though the code snippet you provided was simple, I want to ensure we're working from the exact same base) as well as exact steps you take.

Thanks!