I have build an app which shows two direct show graphs in parallel. This application uses WPF, therefore I evaluated different solutions, like WPFMediaKit (http://wpfmediakit.codeplex.com/) and AVCapWPF(https://wpfcap.codeplex.com/).
Both solutions normally works fine. But sometimes i get a grey error window (which looks a lot like Windows 2000) with some information about CPU (but old CPU information, seems like the actual CPU was not known, when this error message was designed) and loaded Dlls, but no error message at all. The title of the window is simply "Error".
The problem is the error occurs sporadically, so I am not sure, whether I know all occurrences, but the following error cases are known:
Error occurs somewhere when building the direct show graph which results in only one graph loaded and displays
Error occurs before both graphs were built, which results in both graphs loaded and displayed
Error does not depend of the used filter in the graph. For rendering the frameworks uses different renderer and the source filter where switched as well, mostly using Montivision DemoSource.
I could only produce the error when both graphs were rendered but could also not find a possibility to produce it regularly.
When the error window is closed, the whole application is finished (crashed). It is impossible to catch the error in .Net. It seems like it comes from a system library.
Error Window Text:
OS: Workstation, SP1
CPU: GenuineIntel, Intel Pentium III Xeon, MMX # 2490 MHz
Module name: D:\[...]\bin\Debug\TestApp.exe
Application data:
VmVyc2lvbjogV2t4dGJIZHFVbTEyYkdsb0oxRmhiR3htS2xwaWUya3N
TMlJpZW1wOVRUd3hTaU0rTXlJNE5DTTVOaVpLT3pnVkUwSXJOQzRxUE
... (a base64 encoded list of loaded dlls)
I hope someone knows that error and a good solution for avoiding it.
Did you tried to run app on clean Windows installation and without Montivision etc. usage?
Also, please show list of used DLL's and graph screenshot.
Related
I've got a very bizarre situation. It appears that, when I load a webpage to my browser,
multiple threads (at least 2) are starting up. The app loads and runs fine on a
Windows XP box, but when I try to run it on my Windows 8 laptop it would seem that
more than one startup event is taking place and causing all kinds of collisions. This
is happening with both Firefox and IE.
To verify this behaviour, I placed a static int within a class, checked it to see if its
value is greater than zero, throw an exception if it is, then increment the int.
Of course, the exception is thrown.
What's very weird about this is that there is no multi-threading/multi-tasking involved
within my app.
When I "touch" the DLL for the webpage (rebuild it), it renders the webpage properly,
but the source for the webpage ("right click" > "View Page Source") has the source
for the unhandled exception webpage, with the message for the exception that my code
throws when the thread count is greater than zero.
I've tried creating a new project, then linking the code to it (Add Item ... Ad As Link),
then building it. It didn't do any good.
The Win XP system has IIS 6 with .NET 4.0, and the Win 8 laptop has IIS 7 with .NET 4.0.
Language is C#.
The truth is that I'm pretty much clueless about IIS.
I hope someone smarter than I am (which isn't saying much) has an idea as to what
is going on.
It appears that, when I load a webpage to my browser, multiple threads (at least 2) are starting up
Maybe onetime initializations. I doubt that every request causes an additional two threads to stay around.
it would seem that more than one startup event is taking place
That's normal This event fires for each instance of HttpApplication being created. This is basically a design error in ASP.NET. They thought that pooling HttpApplication instances and assigning one of them for each request was a good idea. It would have been better to have a singleton per AppDomain. Write this yourself. Like that:
class MyGlobalAppState { ... }
static Lazy<MyGlobalAppState> state = new Lazy<...>(StateFactory);
Be aware, that Lazy<T> stores any exception and just rethrows it. This causes your app to be permanently broken in case StateFactory throws. It will never recover without pool restart. This is a design error in Lazy<T>. Find a way to deal with that.
but the source for the webpage ("right click" > "View Page Source") has the source for the unhandled exception webpage
Some browsers re-GET the page to view the source. This can be annoying or handy.
It is hard to tell what is causing this behavior but as others suggested try to use Fiddler or any other http tracing tool to see what requests are sent.
Also, Win XP should be running IIS5.x while Win8 should be running IIS8.
By default IIS8 AppPool should be running with the integrated pipeline, which may behave differently. I would try changing the AppPool to use the Classic pipeline to see if it makes a difference.
It looks like a duplicate, but believe I checked other answers, nothing worked.
My application started crashing while closing the application with below error. It was working properly few days back, some recent changes is causing the issue. And one this starts on a machine, even though I replace with previous working DLL, still the issue comes.
Microsoft Visual C++ Runtime Library
Runtime Error!
Program:C:\DigiMic\...
This application has requested the Runtime to terminate it in an unusual way...
This pop-up comes for 1 second with OK button, then automatically closes. The main problem is it happens while shutting down my application.
My Application: It is a WPF, C# application which uses Matlab used business DLL for few functionality. The application works fine while using the Matlab used DLL and its function, only crashes while exiting the WPF.
I tried to Wrap the App.Current.ShutDown with try..catch... but the it never hits catch orfinally block. Then I also tried AppDomain.Current.UnHandledException += new..., it still does not hit the function on exception.
The other problem is, I am not able to see the complete path of the exe that causes this exception.
Question:
Is there a way, I can suppress this error?
Where is this error gets logged in windows?I tried to look into Event Viewer, but nothing is there.
Is there any workaround? Since it's software delivery time for the product. :(
I've got a webbrowser control in a winforms application which automates a tedious form completion process involving hundrends of records each time.
My problem is that I get an unspecified javascript error (code:0) only when I run the application.
The script won't crash when I use IE11.
I've implemented the required registry changes (FEATURE_BROWSER_EMULATION - I use 11000 for IE11).
The application used to work error free with IE9 (9000) and IE10 (left it with 9000 which worked).
I've read elsewhere that there may be a problem with asp.net recognizing IE11 but I can't find a fix for my system (Windows 7 64bit) and I don't want to just supress the script error because it also causes huge delays (it's probably the error since I had no such problems with the older IE versions).
I've read similar questions on the internet but no answer that fits my case was sufficient. For the time being I've set the ScriptErrorsSuppression to true but I'm not happy with that. Any ideas?
I am trying to get the keyboard state in my XNA application with the following code:
this.OldKeyboard = this.NewKeyboard;
this.NewKeyboard = Keyboard.GetState();
this.OldMouse = this.NewMouse;
this.NewMouse = Mouse.GetState();
However, sometimes (I think about 60%) when I start my game, I get an InvalidOperationException with the following message:
An invalid operation occurred when trying to query the keyboard state.
The result code was 126.
at Microsoft.Xna.Framework.Input.Keyboard.GetState(PlayerIndex playerIndex)
at Microsoft.Xna.Framework.Input.Keyboard.GetState()
at GameLib.GameBase.Update(GameTime gameTime) in MY_PATH\GameLib\GameLib\GameBase.cs:Line 58.
at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
at ...
My searches on google and SO did not give me any results on this code.
What could be the cause for this and why doesn't it occur everytime or never, but only sometimes when starting the project?
Edit: My thread layout:
Main thread
starts Game.Run
starts a network initializer in a separate project (in Initialize)
which starts a new thread for network I/O
When creating a new project only containing Keyboard.GetState(), I apparently get an error code of 0, which translates to
ERROR_SUCCESS
0 (0x0)
The operation completed successfully.
See my screenshot below, I do not know why a success would trigger an InvalidOperationException.
Keboard.GetState uses the win32 function GetKeyboardState (MSDN) internally. If that fails, it gives an error code from this list, which XNA fetches and packs into that exception for you.
That error code translates to: "The specified module could not be found."
Where "module" basically means DLL. And "not found" might refer to the DLL being loaded, or a DLL that it, in turn, requires (and so on). It's an extremely unhelpful error message.
I'm not really sure what DLL GetKeyboardState might be trying to load, or why it might fail intermittently.
Probably the first step to try and fix this would be to create a new, blank project and see if you get the same result, so you can figure out if it's your code, or something wrong with your system or XNA install.
(I imagine actually debugging this properly might involve using Process Monitor to catch what DLL it is failing to load.)
Also, Blau is correct - all input in XNA must be done on the main thread.
I don't know how old this thread is, but I heard it has something to do with your firewall. The same error happened to me when I updated my antivirus (do you happen to use Comodo?) Anyway, check that out, and see if it helps. It has nothing to do with XNA, I tested in visual c# express, visual studio 2012, and 2013, with same results, then I tried with a fresh project that only called the keyboard state, and it happened again. And none of that happened before I updated the antivirus...
We are currently trying to incorporate Lync communication (Lync SDK 2010) into our application and we have run into an issue with the VideoWindows (CaptureVideoWindow, RenderVideoWindow) of the AVModality's VideoChannel: They are always null, even after successfully calling BeginStart. The connection is definitely established. We can talk. Our own video is shown in a remote Lync client. AVModalityState is Connected. VideoChannelState goes from Connecting to Receive to Send.
It does not matter when and how we try to access them: Directly after BeginStart, in the AsyncCallback of BeginStart, in response to various state changes or in response to an external trigger (user click event); in the main/UI thread or in an event/callback thread. The two video windows are always null.
In the example application "%PROGRAMFILES%\Microsoft Lync\SDK\Samples\AudioVideoConversation", everything works as intended: As soon as BeginStart has finished, we can access the non-null video windows. In our little stand-alone prototype project, it works, too. But in our real application, it does not.
We have double checked everything and we have really run out of ideas of what might cause this problem.
Any ideas, any hints? Anything that we should be aware of?
(Link to corresponding MSDN forum thread)
Update (4th July 2012, 15:46 CET):
When we take a look at the members of the VideoChannel we find that internally a COMException occured in "Microsoft.Office.Uc": Error loading DLL, HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY). More details in the attached screenshot.
We did some research on this error, but found nothing that worked for us. Any ideas what causes the Exception?
Update (9th July 2012, 16:43 CET):
We did some further testing...
Our software consists of one main application and many plugin-like "apps" loaded via MEF. We created a minimal test app that makes a video call: The video windows did not work (as expected). But when we took the identical code and created a separate solution outside of our architecture, then it did work. So, it was an issue with the environment, not the code.
At first, we suspected MEF might be the problem. So, we hacked the lync code into our main application - circumventing the whole app architecture. Still not working.
Then we sliced off our whole system, bit by bit, until we finally reached a point where it did work. After following wrong tracks several times, we finally found the culprit... Quartz.NET!
For some strange reason the mere presence of an assembly reference to the Quartz.dll v.1.0.3.3, even without a single line of Quartz code, causes the video windows to not work. Unbelievable, but it's 100% reproducible: If we take the previously mentioned test solution and do nothing but add the reference, it stops working.
Any idea how such a thing is possible?
We solved it! Kind of. A reference to a Quartz.NET DLL somehow caused the issue. More details in the updated question.
For now, we have removed the component that used Quartz. We currently do not need it.
But I'm still interested in further input how a mere reference can cause such an issue.