I'm playing an mp3 to provide background music to my iPad game, and I am playing the song using this code:
audioPlayer = AVAudioPlayer.FromUrl(NSUrl.FromFilename(fileName));
audioPlayer.FinishedPlaying += delegate { audioPlayer.Dispose(); audioPlayer=null; };
if (audioPlayer.PrepareToPlay())
audioPlayer.Play();
It works in fact, but when running I am getting a load of error messages in the console. Am I doing it wrong? Should I worry?
This is a dump of the errors I get:
2012-05-04 16:22:17.220 Music[42300:22b03] Error loading /System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn: dlopen(/System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn, 262):
Symbol not found: ___CFObjCIsCollectable Referenced from:
/System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security
2012-05-04 16:22:17.223 Music[42300:22b03] Error loading /System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn: dlopen(/System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn, 262): Symbol not found: ___CFObjCIsCollectable Referenced from:
/System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security
2012-05-04 16:22:17.256 Music[42300:22b03] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable Referenced from:
/System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security
2012-05-04 16:22:17.258 Music[42300:22b03] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable Referenced from:
/System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security
2012-05-04 16:22:17.260 Music[42300:22b03] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable Referenced from:
/System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security
2012-05-04 16:22:17.261 Music[42300:22b03] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable Referenced from:
/System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security
2012-05-04 16:22:17.263 Music[42300:22b03] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable Referenced from:
/System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security
2012-05-04 16:22:17.264 Music[42300:22b03] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable Referenced from:
/System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security
These errors seem to be harmless (I have seen them a lot, but not noticed any actual problems).
In any case the errors will be fixed in a future version of MonoTouch.
Related
I have a netcoreapp2.0 test project running against a .net 4.6.1 project. I've started having NotSupportedException thrown on all tests in this project after installing the 3.0 SDK. On machines with only older SDKs or specifying the 2.2 SDK on the global.json file it works.
My point is, how can I find what is throwing the exception? It's being thrown inside a DLL which I don't own and I can't use sourcelink. VS is not displaying any stacktrace and it doesn't stop on the exception even with CLR exceptions set for every exception.
This is the only result I get, by running the tests.
PS (...)> dotnet test
Test run for (...).Tests.dll(.NETCoreApp,Version=v2.2)
Microsoft (R) Test Execution Command Line Tool Version 16.3.0
Copyright (c) Microsoft Corporation. All rights reserved.
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:01.35] (...) [FAIL]
X (...) [1ms]
Error Message:
System.NotSupportedException : Specified method is not supported.
[xUnit.net 00:00:01.43] (...) [FAIL]
[xUnit.net 00:00:01.43] (...) [FAIL]
[xUnit.net 00:00:01.43] (...) [FAIL]
[xUnit.net 00:00:01.43] (...) [FAIL]
[xUnit.net 00:00:01.43] (...) [FAIL]
[xUnit.net 00:00:01.43] (...) [FAIL]
[xUnit.net 00:00:01.43] (...) [FAIL]
[xUnit.net 00:00:01.43] (...) [FAIL]
X (...) [1ms]
Error Message:
System.NotSupportedException : Specified method is not supported.
X (...) [1ms]
Error Message:
System.NotSupportedException : Specified method is not supported.
X (...) [1ms]
Error Message:
System.NotSupportedException : Specified method is not supported.
X (...) [1ms]
Error Message:
System.NotSupportedException : Specified method is not supported.
X (...) [1ms]
Error Message:
System.NotSupportedException : Specified method is not supported.
X (...) [1ms]
Error Message:
System.NotSupportedException : Specified method is not supported.
X (...) [1ms]
Error Message:
System.NotSupportedException : Specified method is not supported.
X (...) [1ms]
Error Message:
System.NotSupportedException : Specified method is not supported.
(REPEATS FOR ALL THE TESTS...)
Test Run Failed.
Total tests: 30
Failed: 30
Total time: 3,2953 Seconds
Update:
I don't know how or why after updating the VS to 16.3.9 (I was on 16.3.8) and/or restarting the machine it didn't happen anymore. All the tests are now working without any modification to the source.
git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
Test run for (...).Tests.dll(.NETCoreApp,Version=v2.0)
Microsoft (R) Test Execution Command Line Tool Version 16.3.0
Copyright (c) Microsoft Corporation. All rights reserved.
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Test Run Successful.
Total tests: 431
Passed: 431
Total time: 10,5425 Seconds
Although I couldn't reproduce the error in the exact same scenario, I could get the same error message on purpose and perhaps it's related.
All our tests are decorated with Xunit.TheoryAttribute, a couple of Xunit.TraitAttribute and many JsonDataSourceAttribute. This last one is developed inhouse and creates a test scenario from a JSON file, pretty much like DataSourceAttribute does (like explained on How to: Create a data-driven unit test).
Even activating "Break When Thrown" and adding breakpoints on the test method and constructor, when the test scenario file can't be found I get this same error message and no stacktrace is provided.
TestClassName
Source: (...)Test.cs line 35
Duration: 1 ms
Message:
System.NotSupportedException : Specified method is not supported.
Perhaps the previous problem was related to the files not being copied to the output, but I still don't know why I don't get a stacktrace or a more specific error related to the file not being found. I'll check the attribute source and verify if it could be improved and if it's, somehow, hiding the issue.
By adding the JsonDataSourceAttribute source to the same solution I could make it stop where it should (on the "file not found", in this case).
This is the original source. The exception (when forced to happen) is thrown on if (!File.Exists(inputfile)), but Xunit.Sdk.DataAttribute hides it.
public sealed class JsonDataSourceAttribute : DataAttribute
{
public string InputFilePath { get; }
/// <summary>
/// Retrieves a collection of context data
/// </summary>
/// <param name="inputFilePath">Json source file path</param>
public JsonDataSourceAttribute(string inputFilePath)
{
this.InputFilePath = inputFilePath;
}
public override IEnumerable<object[]> GetData(MethodInfo testMethod)
{
if (testMethod == null) { throw new ArgumentNullException(nameof(testMethod)); }
var inputfile = Path.IsPathRooted(this.InputFilePath)
? this.InputFilePath
: Path.Combine(Directory.GetCurrentDirectory(), this.InputFilePath);
if (!File.Exists(inputfile))
{
throw new ArgumentException($"Input file not found at '{inputfile}'.");
}
return this.LoadFileData(inputfile, this.EnumMap);
}
(...)
}
By moving the file existence check to the constructor, I was able to get what I wanted.
public JsonDataSourceAttribute(string inputFilePath)
{
var inputfile = Path.IsPathRooted(inputFilePath)
? inputFilePath
: Path.Combine(Directory.GetCurrentDirectory(), inputFilePath);
if (!File.Exists(inputfile))
{
throw new ArgumentException($"Input file not found at '{inputfile}'.");
}
this.InputFilePath = inputfile;
}
This is not the "find the root cause" answer, but I guess it wouldn't be possible since the original exception is omitted on Xunit.Sdk.DataAttribute.
After updating 'Microsoft.ApplicationInsights' from 2.4.0 to 2.5.1
and it installing implicitly following packages
1.'Microsoft.ApplicationInsights.Agent.Intercept'
2.'Microsoft.ApplicationInsights.DependencyCollector'
3.'Microsoft.ApplicationInsights.PerfCounterCollector'
4.'Microsoft.ApplicationInsights.WindowsServer'
5.'Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel'
and error is coming on this line of code
config.LoggerFactory = loggerFactory.AddApplicationInsights("", filter.Filter);
Could not load type 'Microsoft.ApplicationInsights.WindowsServer.Channel.Implementation.SamplingPercentageEstimatorSettings' from assembly 'Microsoft.AI.ServerTelemetryChannel', Version=2.5.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
I'm trying to connect to CRM using steps declared in this link
https://msdn.microsoft.com/en-us/library/gg695790.aspx
Error
Server Error in '/' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0012: The type 'System.Data.Services.IUpdatable' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
Source Error:
Line 192816: /// </summary>
Line 192817: [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "7.0.0000.3543")]
Line 192818: public partial class XrmServiceContextr : Microsoft.Xrm.Client.CrmOrganizationServiceContext
Line 192819: {
Line 192820:
Source File: c:\Users\Gevor\Documents\Visual Studio 2013\Projects\TestCRM\TestCRM\App_Code\Xrm.cs Line: 192818
Command line parameters
c:\DynamicsCRM\SDK\Bin>CrmSvcUtil.exe /out:Xrm.cs
/url:https://Organization/XRMServices/2011/Organization.svc
/domain:DOMAIN /username:USERNAME /password:PASSWORD /namespace:Xrm
/serviceContextName:XrmServiceContextr
/codeCustomization:"Microsoft.Xrm.Client.CodeGeneration.CodeCustomization,
Microsoft.Xrm.Client.CodeGeneration"
If System.Data.Services is not the GAC, it neeeds to be merged in your assembly, not only referenced.
You need to add a System.Data.Services reference to your TestCRM application.
In Product display page showing proper image but when I click any product Image it is throw bellow error.
Server Error in '/' Application.
Compilation Error
Description: An error occurred during the compilation of a resource
required to service this request. Please review the following specific
error details and modify your source code appropriately.
Compiler Error Message: CS1061:
'System.Web.Mvc.HtmlHelper'
does not contain a definition for 'GenerateCaptcha' and no extension
method 'GenerateCaptcha' accepting a first argument of type
'System.Web.Mvc.HtmlHelper'
could be found (are you missing a using directive or an assembly
reference?)
Source Error:
Line 47: {
Line 48: <div class="captcha-box">
Line 49: #Html.Raw(Html.GenerateCaptcha())
Line 50: </div>
Line 51: }
Source File: h:\root\home\raaisoma-001\www\site1\Plugins\SevenSpikes.Nop.Plugins.NopQuickTabs\Views\ProductTab\_ProductReviews.cshtml Line: 49
But When I click on QuickView product display properly.
You're missing appropaite namespace. Add
using Nop.Web.Framework.UI.Captcha;
to this file
I'm attempting to build a library (Medsphere.Widgets) on Ubuntu, and it's throwing me an error. I've had a good search around, but nobody seems to have an answer for it. The configure script works fine, and completes with no warnings or errors. When I go to run the make, it does this:
polynomial#ubuntu:~/Projects/Medsphere/$ make
Making all in src
make[1]: Entering directory `/home/polynomial/Projects/Medsphere/src'
/usr/bin/mcs /target:library /out:Medsphere.Widgets.dll -r:/usr/lib/pkgconfig/../../lib/cli/pango-sharp-2.0/pango-sharp.dll -r:/usr/lib/pkgconfig/../../lib/cli/atk-sharp-2.0/atk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/cli/gdk-sharp-2.0/gdk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/cli/gtk-sharp-2.0/gtk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/cli/glib-sharp-2.0/glib-sharp.dll -r:/usr/lib/mono/2.0/Mono.Cairo.dll ./CPaned.cs ./FBox.cs ./GridView.cs ./CairoHelper.cs ./IconLayout.cs ./ICairoCellRenderer.cs ./BoxCellRenderer.cs ./PixbufCellRenderer.cs ./TextCellRenderer.cs ./graph/AxisLocation.cs ./graph/AxisSizeGroup.cs ./graph/BaseTreeModelPlot.cs ./graph/DateTimeAxis.cs ./graph/EventPlot.cs ./graph/Graph2D.cs ./graph/Graph.cs ./graph/GtkStyleProvider.cs ./graph/HistogramPlot.cs ./graph/IAxis.cs ./graph/IPlot.cs ./graph/IStyleProvider.cs ./graph/ITreeModelPlot.cs ./graph/LabelAxis.cs ./graph/Legend.cs ./graph/LinearAxis.cs ./graph/LinePlot.cs ./graph/LinkedLinePlot.cs ./graph/PlotColor.cs ./graph/PointShape.cs ./graph/ReferenceRangePlot.cs
./IconLayout.cs(414,25): error CS0029: Cannot implicitly convert type `Cairo.Context' to `Cairo.Context'
./IconLayout.cs(414,25): The type `Cairo.Context' has two conflicting definitions, one comes from `Mono.Cairo, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' and the other from `Mono.Cairo, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' (in the previous error)
Internal(1,1): The type `Cairo.Context' has two conflicting definitions, one comes from `Mono.Cairo, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' and the other from `Mono.Cairo, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' (in the previous error)
./IconLayout.cs(920,41): error CS1502: The best overloaded method match for `Gdk.CairoHelper.SetSourceColor(Cairo.Context, Gdk.Color)' has some invalid arguments
/usr/lib/cli/gdk-sharp-2.0/gdk-sharp.dll (Location of the symbol related to previous error)
./IconLayout.cs(920,41): error CS1503: Argument `#1' cannot convert `Cairo.Context' expression to type `Cairo.Context'
./IconLayout.cs(920,41): (equally named types possibly from different assemblies in previous error)
/usr/lib/mono/gac/Mono.Cairo/2.0.0.0__0738eb9f132ed756/Mono.Cairo.dll (Location of the symbol related to previous error)
/usr/lib/mono/gac/Mono.Cairo/1.0.5000.0__0738eb9f132ed756/Mono.Cairo.dll (Location of the symbol related to previous error)
Compilation failed: 3 error(s), 0 warnings
I can only imagine that two versions of Cairo are conflicting, but I can't figure out how to fix it. Any ideas?
Just to clear this one up:
I modified config.status to use gmcs rather than just mcs and patched all Mono.Cairo references so that they point at the version-specific DLL, rather than the generic one in the GAC. After patching a couple of cast bugs in the lib, it works great!