Downloaded the most recent CSCORE project, set the AudioPlayerSample as startup, compiled an debugged. Immediately an error: The method or operation is not implemented. Running on Lenovo Windows 10 Home and Visual Studio 2017 Community
Edit. This is a STUPID error, each Windows has a different path for the SDK, CSCore has only one, so CSCore, without changing the project file, runs on Windows 8.1 not on 7 or 10: see my comment in the: CSCore issues
The stacktrace (with the sourcelines added below each stackentry) is:
System.NotImplementedException
HResult=0x80004001
Message=The method or operation is not implemented.
Source=CSCore
StackTrace:
at CSCore.CoreAudioAPI.InteropCalls.CallI(Void* _basePtr, IntPtr intPtr, Void* p) in C:\Users\mpmvd\Documents\Visual Studio 2017\Projects\cscore-master\CSCore\CoreAudioAPI\InteropCalls.cs:line 204 :
throw new NotImplementedException();
at CSCore.CoreAudioAPI.MMDeviceEnumerator.RegisterEndpointNotificationCallbackNative(IMMNotificationClient notificationClient) in C:\Users\mpmvd\Documents\Visual Studio 2017\Projects\cscore-master\CSCore\CoreAudioAPI\MMDeviceEnumerator.cs:line 267 :
result = InteropCalls.CallI(UnsafeBasePtr,
Marshal.GetComInterfaceForObject(notificationClient, typeof(IMMNotificationClient)),
((void**)(*(void**)UnsafeBasePtr))[6]);
at CSCore.CoreAudioAPI.MMDeviceEnumerator.RegisterEndpointNotificationCallback(IMMNotificationClient notificationClient) in C:\Users\mpmvd\Documents\Visual Studio 2017\Projects\cscore-master\CSCore\CoreAudioAPI\MMDeviceEnumerator.cs:line 253 :
CoreAudioAPIException.Try(RegisterEndpointNotificationCallbackNative(notificationClient), InterfaceName,
"RegisterEndpointNotificationCallback");
at CSCore.CoreAudioAPI.MMDeviceEnumerator..ctor() in C:\Users\mpmvd\Documents\Visual Studio 2017\Projects\cscore-master\CSCore\CoreAudioAPI\MMDeviceEnumerator.cs:line 135 :
RegisterEndpointNotificationCallback(_notificationClient);
at AudioPlayerSample.Form1.Form1_Load(Object sender, EventArgs e) in C:\Users\mpmvd\Documents\Visual Studio 2017\Projects\cscore-master\Samples\AudioPlayerSample\Form1.cs:line 126 :
using (var mmdeviceEnumerator = new MMDeviceEnumerator())
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Anyone experienced this and found a solution?
Open the CSCore.csproj file.
at the bottom in the postcompilation script locate the set sdk=%25PROGRAMFILES(x86)%25\Microsoft SDKs\Windows\ line and check in your PROGRAMFILES(x86)\Microsoft SDKs\Windows where the ildasm.exe file is to be found.
change the set sdk such that the directoryname is the one you found on your pc.
Related
Trying to export student exam results from excel to Student OneNote pages.
importing the excel data using QAxObject dynamic calls works flawlessly however a similar setup with OneNote yeilds unkown
getHieracrchy Documentation below is the output of dumpdoc.exe :
void GetHierarchy (QString bstrStartNodeID, HierarchyScope hsScope, QString& pbstrHierarchyXmlOut, XMLSchema xsSchema)
QVariantList params = ...
onenote_object->dynamicCall("GetHierarchy(QString, HierarchyScope, QString&, XMLSchema)", params);
Implementation :
QAxObject* onenote = new QAxObject("OneNote.Application");
QString doc = onenote->generateDocumentation();
qDebug() << onenote->control(); // {dc67e480-c3cb-49f8-8232-60b0c2056c8e}
QVariantList params;
QString xml_out;
params << "" << 4 << xml_out << 0;
onenote->dynamicCall("GetHierarchy(QString, HierarchyScope, QString&, XMLSchema)", params);
Error
QAxBase: Error calling IDispatch member GetHierarchy: Unknown error
I have tried running dumpcpp against the CLSID of the OneNote.Application and the registry entry for the typelib thinking it might be a type error for a none builtin Qt->COM type, but no output is produced.
dumpcpp -nometaobject -getfile {0EA692EE-BB50-4E3C-AEF0-356D91732725} -o onenote
I can manipulate the pages via powershell and see the typelib reference in visual basic but want to access OneNote from C++.
I wrote the following simple program to test:
using System;
using System.IO;
using System.IO.Compression;
namespace HelloZip
{
class Program
{
static void Main(string[] args)
{
string path = Path.Combine(AppContext.BaseDirectory, "test.zip");
using (ZipArchive z = ZipFile.Open(path, ZipArchiveMode.Create))
{
var f = z.CreateEntry("hello.txt");
using (StreamWriter writer = new StreamWriter(f.Open()))
{
writer.Write("Hello World!");
}
}
}
}
}
Per this page, I ran dotnet new nuget from the HelloZip project directory, added the recommended package sources in nuget.config, then ran the following commands:
dotnet add package Microsoft.DotNet.ILCompiler -v 1.0.0-alpha-*
dotnet publish -r win-x64 -c release -o out
out\HelloZip.exe
I got the following error:
Unhandled Exception: System.IO.Compression.ZLibException: The underlying compression routine could not be loaded correctly. ---> System.DllNotFoundException: Unable to load DLL 'clrcompression.dll': The specified module could not be found.
at HelloZip!<BaseAddress>+0x1199e7
at HelloZip!<BaseAddress>+0x119904
at Interop.zlib.DeflateInit2_(ZLibNative.ZStream&, ZLibNative.CompressionLevel, ZLibNative.CompressionMethod, Int32, Int32, ZLibNative.CompressionStrategy) + 0x48
at System.IO.Compression.ZLibNative.ZLibStreamHandle.DeflateInit2_(ZLibNative.CompressionLevel, Int32, Int32, ZLibNative.CompressionStrategy) + 0x4f
at System.IO.Compression.Deflater.DeflateInit(ZLibNative.CompressionLevel, Int32, Int32, ZLibNative.CompressionStrategy) + 0x59
--- End of inner exception stack trace ---
at System.IO.Compression.Deflater.DeflateInit(ZLibNative.CompressionLevel, Int32, Int32, ZLibNative.CompressionStrategy) + 0x1db
at System.IO.Compression.Deflater..ctor(CompressionLevel, Int32) + 0x50
at System.IO.Compression.DeflateStream.InitializeDeflater(Stream, Boolean, Int32, CompressionLevel) + 0x39
at System.IO.Compression.ZipArchiveEntry.GetDataCompressor(Stream, Boolean, EventHandler) + 0x4b
at System.IO.Compression.ZipArchiveEntry.OpenInWriteMode() + 0x65
at HelloZip.Program.Main(String[]) + 0x75
at HelloZip!<BaseAddress>+0x1716a2
Am I making a mistake, or does the AOT compiler just not properly support System.IO.Compression yet?
You're hitting a known unimplemented functionality. The workaround is to copy clrcompression.dll next to the compiled executable manually for now. See details here: https://github.com/dotnet/corert/issues/5496
I am trying to diagnose a memory leak, and I'm getting some strange numbers, perhaps someone can point out why I'm seeing what I'm seeing.
The first step that I performed, was attempting to see where the leak was occurring, in managed or unmanaged space.
I profiled the process, and got the following chart
According to the various documentation on leak diagnostics, I should see either, the private bytes run away while the "all heaps" don't (indicating an unmanaged leak) or they both run away in parallel, indicating a managed one.
It appears I do have a leak - (chart is CPU+Private Bytes+Managed Heaps).
What is puzzling me - is - why do my managed heaps consume only about 30MB between 9am and just before 5pm (but private bytes grow), then all of a sudden - BOOM my managed heaps jump to 3 gigs consumed?
Why would this happen?
UPDATE:
654cf3d8 199671 6389472 System.Web.HttpCacheValidateHandler
719c25e8 559507 6714084 System.Object
654b82e8 95499 6875928 System.Web.HttpServerVarsCollection
05e90a24 253641 7101948 System.Web.Mvc.NameValueCollectionValueProvider+ValueProviderResultPlaceholder+<>c__DisplayClass8
654e42e4 97208 7776640 System.Web.HttpWriter
04c2a5c8 264802 8473664 Castle.MicroKernel.BurdenReleaseDelegate
04c2ab68 264813 9533268 Castle.MicroKernel.Burden
06bde0a8 507282 10145640 System.Lazy`1[[System.Web.Mvc.ValueProviderResult, System.Web.Mvc]]
6fb5348c 267697 10707880 System.Collections.Generic.HashSet`1[[System.String, mscorlib]]
654e9388 160209 11535048 System.Web.HttpHeaderCollection
654ad44c 194416 12442624 System.Web.HttpCookieCollection
6fd1abbc 170480 14202840 System.Collections.Generic.HashSet`1+Slot[[System.String, mscorlib]][]
654b2204 95203 15613292 System.Web.HttpCachePolicy
06bde010 507282 16233024 System.Func`1[[System.Web.Mvc.ValueProviderResult, System.Web.Mvc]]
719c3a6c 469961 18106904 System.Int32[]
654e87e4 97208 18275104 System.Web.Hosting.IIS7WorkerRequest
654e2590 97208 19441600 System.Web.HttpRequest
654e285c 97208 19830432 System.Web.HttpResponse
715fbc80 422170 20264160 System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[System.Object, mscorlib]]
654e2160 97208 23329920 System.Web.HttpContext
654e9614 388836 23330160 System.Web.HttpValueCollection
719c45c8 919071 47791692 System.Collections.Hashtable
654d5220 4808083 115393992 System.Web.HttpServerVarsCollectionEntry
719bfc20 4849839 116396136 System.Collections.ArrayList
719c4584 105080 119191278 System.Byte[]
70d45bec 9064979 145039664 System.Collections.Specialized.NameObjectCollectionBase+NameObjectEntry
719afe88 5391401 175028320 System.Object[]
719c5ed4 919078 237147240 System.Collections.Hashtable+bucket[]
719c2248 7055089 454532758 System.String
Ok, so I've run windbg over the crash dump, (!dumpheap -live -stat) and I've found that there are LOT of objects relating to the Http context, which are still held in memory (98,000 after a typical work day in fact).
Can anyone confirm... I shouldn't be seeing this right? There are Types occurring 97,208 times in the log - This means that the HttpRequest/HttpResponse, etc are being held in memory, causing ALOT of leakage.
What could be causing this? I know they're not being stored in the session..my session is set to default timeout, and when inspecting, it only contains 3 small string objects.
Figured it out. Running GCroot highlighted the problem. See how there is a Castle.MicroKernel.Releasers.LifecycledComponentsReleasePolicy in the reference list?
Castle wasn't being told to release the controller after the request had completed. Mystery solved.
0:000> !gcroot 95963d2c
HandleTable:
00bb12f0 (pinned handle)
-> 03062490 System.Object[]
-> 021501dc Castle.Windsor.WindsorContainer
-> 02150200 Castle.MicroKernel.DefaultKernel
-> 02150304 System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[Castle.MicroKernel.ISubSystem, Castle.Windsor]]
-> 02150af8 System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[Castle.MicroKernel.ISubSystem, Castle.Windsor]][]
-> 02150b74 Castle.Windsor.Diagnostics.DefaultDiagnosticsSubSystem
-> 02150b8c System.Collections.Generic.List`1[[Castle.Windsor.Diagnostics.IContainerDebuggerExtension, Castle.Windsor]]
-> 02150d00 System.Object[]
-> 02150d30 Castle.Windsor.Diagnostics.Extensions.ReleasePolicyTrackedObjects
-> 02150d3c Castle.Windsor.Diagnostics.TrackedComponentsDiagnostic
-> 02150e04 System.EventHandler`1[[Castle.Windsor.Diagnostics.TrackedInstancesEventArgs, Castle.Windsor]]
-> 02150d54 Castle.MicroKernel.Releasers.LifecycledComponentsReleasePolicy
-> 02150d84 System.Collections.Generic.Dictionary`2[[System.Object, mscorlib],[Castle.MicroKernel.Burden, Castle.Windsor]]
-> 038da530 System.Collections.Generic.Dictionary`2+Entry[[System.Object, mscorlib],[Castle.MicroKernel.Burden, Castle.Windsor]][]
-> 9596f3a4 WebController
-> 9596f9cc System.Web.Mvc.ControllerContext
-> 95965b5c System.Web.HttpContextWrapper
-> 95964078 System.Web.HttpContext
-> 95963d2c System.Web.Hosting.IIS7WorkerRequest
I'm getting the following error trying to execute a unit test from Visual Studio. I've poked around a little, and have re-installed both Gallio and TD.Net, but still get the same error. I'm kind of clueless on where to begin, and searching google turns up next to nothing...
Gallio.Loader.LoaderException: Gallio.Loader.LoaderException: Failed to setup the runtime. ---> Gallio.Runtime.RuntimeException: The runtime could not be initialized. ---> Gallio.Runtime.RuntimeException: Could not register component 'TDNetRunner.UI.PlaceholderPreferencePaneProvider' of plugin 'Gallio.TDNetRunner.UI' because it implements service 'Gallio.UI.PreferencePaneProvider' which was not found in the registry.
at Gallio.Runtime.Extensibility.PluginCatalog.RegisterComponents(IRegistry registry, IList1 topologicallySortedPlugins, IList1 pluginDescriptors) in c:\Server\Projects\MbUnit v3.3\Work\src\Gallio\Gallio\Runtime\Extensibility\PluginCatalog.cs:line 225
at Gallio.Runtime.Extensibility.PluginCatalog.ApplyTo(IRegistry registry) in c:\Server\Projects\MbUnit v3.3\Work\src\Gallio\Gallio\Runtime\Extensibility\PluginCatalog.cs:line 69
at Gallio.Runtime.DefaultRuntime.RegisterLoadedPlugins() in c:\Server\Projects\MbUnit v3.3\Work\src\Gallio\Gallio\Runtime\DefaultRuntime.cs:line 270
at Gallio.Runtime.DefaultRuntime.Initialize() in c:\Server\Projects\MbUnit v3.3\Work\src\Gallio\Gallio\Runtime\DefaultRuntime.cs:line 170
--- End of inner exception stack trace ---
at Gallio.Runtime.DefaultRuntime.Initialize() in c:\Server\Projects\MbUnit v3.3\Work\src\Gallio\Gallio\Runtime\DefaultRuntime.cs:line 197
at Gallio.Runtime.RuntimeBootstrap.Initialize(RuntimeSetup setup, ILogger logger) in c:\Server\Projects\MbUnit v3.3\Work\src\Gallio\Gallio\Runtime\RuntimeBootstrap.cs:line 74
at Gallio.Runtime.Loader.GallioLoaderBootstrap.SetupRuntime(String runtimePath) in c:\Server\Projects\MbUnit v3.3\Work\src\Gallio\Gallio\Runtime\Loader\GallioLoaderBootstrap.cs:line 49
--- End of inner exception stack trace ---
at Gallio.Loader.LoaderManager.LoaderImpl.SetupRuntime()
at Gallio.Loader.Isolation.IsolatedEnvironmentManager.IsolatedInitializer.SetupRuntime()
at Gallio.Loader.Isolation.IsolatedEnvironmentManager.IsolatedEnvironment.UnwrapException(Exception ex)
at Gallio.Loader.Isolation.IsolatedEnvironmentManager.IsolatedEnvironment.SetupRuntime()
at Gallio.Loader.SharedEnvironment.SharedEnvironmentManager.CreateSharedEnvironment()
at Gallio.Loader.SharedEnvironment.SharedEnvironmentManager.GetSharedEnvironment()
at Gallio.TDNetRunner.Core.LocalProxyTestRunner.CreateRemoteProxyTestRunner()
at Gallio.TDNetRunner.Core.LocalProxyTestRunner.RunImpl(IFacadeTestListener testListener, String assemblyPath, String cref, FacadeOptions facadeOptions)
at Gallio.TDNetRunner.Core.BaseProxyTestRunner.Run(IFacadeTestListener testListener, String assemblyPath, String cref, FacadeOptions facadeOptions)
System.Runtime.Remoting.ServerException: Gallio.Loader.LoaderException: Gallio.Loader.LoaderException: Failed to setup the runtime. ---> Gallio.Runtime.RuntimeException: The runtime could not be initialized. ---> Gallio.Runtime.RuntimeException: Could not register component 'TDNetRunner.UI.PlaceholderPreferencePaneProvider' of plugin 'Gallio.TDNetRunner.UI' because it implements service 'Gallio.UI.PreferencePaneProvider' which was not found in the registry.
at Gallio.Runtime.Extensibility.PluginCatalog.RegisterComponents(IRegistry registry, IList1 topologicallySortedPlugins, IList1 pluginDescriptors)
at Gallio.Runtime.Extensibility.PluginCatalog.ApplyTo(IRegistry registry)
at Gallio.Runtime.DefaultRuntime.RegisterLoadedPlugins()
at Gallio.Runtime.DefaultRuntime.Initialize()
--- End of inner exception stack trace ---
at Gallio.Runtime.DefaultRuntime.Initialize()
at Gallio.Runtime.RuntimeBootstrap.Initialize(RuntimeSetup setup, ILogger logger)
at Gallio.Runtime.Loader.GallioLoaderBootstrap.SetupRuntime(String runtimePath)
--- End of inner exception stack trace ---
at Gallio.Loader.LoaderManager.LoaderImpl.SetupRuntime()
at Gallio.Loader.Isolation.IsolatedEnvironmentManager.IsolatedInitializer.SetupRuntime()
at Gallio.Loader.Isolation.IsolatedEnvironmentManager.IsolatedEnvironment.UnwrapException(Exception ex)
at Gallio.Loader.Isolation.IsolatedEnvironmentManager.IsolatedEnvironment.SetupRuntime()
at Gallio.Loader.SharedEnvironment.SharedEnvironmentManager.CreateSharedEnvironment()
at Gallio.Loader.SharedEnvironment.SharedEnvironmentManager.GetSharedEnvironment()
at Gallio.TDNetRunner.Core.LocalProxyTestRunner.CreateRemoteProxyTestRunner()
at Gallio.TDNetRunner.Core.LocalProxyTestRunner.RunImpl(IFacadeTestListener testListener, String assemblyPath, String cref, FacadeOptions facadeOptions)
at Gallio.TDNetRunner.Core.BaseProxyTestRunner.Run(IFacadeTestListener testListener, String assemblyPath, String cref, FacadeOptions facadeOptions)
at Gallio.TDNetRunner.Core.BaseProxyTestRunner.Run(IFacadeTestListener testListener, String assemblyPath, String cref, FacadeOptions facadeOptions)
at Gallio.TDNetRunner.GallioResidentTestRunner.Run(ITestListener testListener, String assemblyFile, String cref)
at TestDriven.TestRunner.AdaptorTestRunner.Run(ITestListener testListener, ITraceListener traceListener, String assemblyPath, String testPath)
at TestDriven.TestRunner.ThreadTestRunner.Runner.Run()
0 passed, 1 failed, 0 skipped, took 4.01 seconds (MbUnit v3.3).
I recently encountered a similar issue running Visual Studio 2012 on Windows 8 (32-bit) with JetBrains ReSharper 7.1.10000.900, GallioBundle 3.4.14.0 and TestDriven.NET 3.4.2808 installed, assuming you are running a setup similar to the above mine, I was able to resolve this situation by doing the following:
Shutdown all copies of Visual Studio
Uninstall ReSharper and TD.Net
First re-install Gallio and ReSharper
Install the latest TestDriven (in my case 3.4.2808 Personal)
Start Visual Studio and right click to run tests.
I got such crash log in one of Qt application, Any idea how qt application is implemented to get such good crash report ?
//=====================================================
Crash Time: Fri Aug 20 15:05:51 2010
Tool Version: 1.6 (08/21/09)
Exception code: C0000005 ACCESS_VIOLATION
Fault address: 06706000 00:01FED9E4
Registers:
EAX:067689A0
EBX:00000000
ECX:067689A0
EDX:026304C0
ESI:00000012
EDI:01FEF018
CS:EIP:001B:06706000
SS:ESP:0023:01FEE4B4 EBP:01FEE4CC
DS:0023 ES:0023 FS:003B GS:0000
Flags:00010206
Call stack:
Address Frame
06706000 01FEE4B0 0000:00000000
39DE15ED 01FEE4CC QWidget::reparent+2D
39E7F560 01FEE6F4 QMenuBar::calculateRects+2D0
39E7E4B1 01FEE708 QMenuBar::performDelayedContentsChanged+41
39E7E600 01FEE714 QMenuBar::performDelayedChanges+20
39E7FF24 01FEE88C QMenuBar::drawContents+24
39E4162E 01FEEA88 QFrame::paintEvent+3BE
39DE060E 01FEEB00 QWidget::event+39E
39D56AE8 01FEEB38 QApplication::internalNotify+1E8
39D56785 01FEEC68 QApplication::notify+865
39D0A89B 01FEEC7C QApplication::sendSpontaneousEvent+3B
39D13DEF 01FEED2C QApplication::winMouseButtonUp+20DF
39D1095E 01FEEFB0 QApplication::winFocus+FBE
7E418734 01FEEFDC GetDC+6D
7E418816 01FEF044 GetDC+14F
7E41B4C0 01FEF098 DefWindowProcW+184
7E41B50C 01FEF0C0 DefWindowProcW+1D0
7C90EAE3 01FEF12C KiUserCallbackDispatcher+13
7E418A10 01FEF13C DispatchMessageW+F
39D25EED 01FEF194 QEventLoop::processEvents+2AD
39D76814 01FEF1AC QEventLoop::enterLoop+74
39D766CD 01FEF1B8 QEventLoop::exec+1D
39D56CCC 01FEF1C8 QApplication::exec+1C
0044847A 01FEFED8 0001:0004747A c:\QtTest\too\main.exe
004465C0 01FEFEE8 0001:000455C0 c:\QtTest\too\main.exe
00F17729 01FEFF18 0001:00B16729 c:\QtTest\too\main.exe
00F148E7 01FEFFC0 0001:00B138E7 c:\QtTest\too\main.exe
7C816FD7 01FEFFF0 RegisterWaitForInputIdle+49
Crash Log:
( 54350.189194700) T> Compile_And_Link_User_Code_Body
( 54350.191276250) T> Create_Header_Expanded_Driver called for: testQt
( 54350.197348809) T> computil.adb:Get_Preprocessed_File called SOURCE_FILE=QtTest_TMP.8.20.54350.2.10156.40.c
( 54350.786834903) T> Create_Header_Expanded_Driver called for: testQt
( 54350.792789012) T> computil.adb:Get_Preprocessed_File called SOURCE_FILE=QtTest_TMP.8.20.54350.8.10156.49.c,
( 54351.056315801) G> add_all_testcase_user_code_to_harness failure COMPILER_PKG.COMPILE_ERROR_EXCEPTION
( 54351.056962252) G> HierarchyView::initCoverage() ...
( 54351.068467625) G> starting Parser::build_testobjectlist_from_xml()
There is no crash report creation provided as part of Qt.
The application in question probably just registers an exception filter with the operating system, e.g. SetUnhandledExceptionFilter on Windows, and compiles and writes this crash report out itself.
If you didn't fancy rolling your own crash reporter, there are some nice open source libraries you could use for generating verbose crash reports like Google's Breakpad.
http://code.google.com/p/google-breakpad/