Code Monkey home page Code Monkey logo

Comments (2)

dwmkerr avatar dwmkerr commented on May 27, 2024

Hi @Buddha1996 can you let me know the details of the crash you got?

I am able to use StartProcess without issues (for example, in the example application). Would be great to know why it doesn't for you!

from consolecontrol.

Buddha1996 avatar Buddha1996 commented on May 27, 2024

Hello @dwmkerr , I've managed to rebuild the problem (found an older build from me) and gather some information. Beside it, I got another strange and interesting point.

General Information: Targetted Framework is .Net Framework 4.7.2, your ConsoleControl.WPF nuget package is in the version 1.2.1

Excuse me, my VS2019 is in german so I will translate it..
Error thrown is:

Ein Ausnahmefehler des Typs "System.InvalidOperationException" ist in WindowsBase.dll aufgetreten.
Der aufrufende Thread kann nicht auf dieses Objekt zugreifen, da sich das Objekt im Besitz eines anderen Threads befindet.

Exception type "System.InvalidOperationException" occured in WindowsBase.dll.
The calling thread can't be opened because it's in control of another thread.

System.InvalidOperationException
HResult=0x80131509
Nachricht = Der aufrufende Thread kann nicht auf dieses Objekt zugreifen, da sich das Objekt im Besitz eines anderen Threads befindet.
Quelle = WindowsBase
Stapelüberwachung:
bei System.Windows.Threading.Dispatcher.VerifyAccess()
bei System.Windows.DependencyObject.GetValue(DependencyProperty dp)
bei ConsoleControl.WPF.ConsoleControl.get_ShowDiagnostics()
bei ConsoleControl.WPF.ConsoleControl.processInterace_OnProcessExit(Object sender, ProcessEventArgs args)
bei ConsoleControlAPI.ProcessInterface.FireProcessExitEvent(Int32 code)
bei ConsoleControlAPI.ProcessInterface.currentProcess_Exited(Object sender, EventArgs e)
bei System.Diagnostics.Process.OnExited()
bei System.Diagnostics.Process.RaiseOnExited()
bei System.Diagnostics.Process.CompletionCallback(Object context, Boolean wasSignaled)
bei System.Threading._ThreadPoolWaitOrTimerCallback.WaitOrTimerCallback_Context(Object state, Boolean timedOut)
bei System.Threading._ThreadPoolWaitOrTimerCallback.WaitOrTimerCallback_Context_f(Object state)
bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
bei System.Threading._ThreadPoolWaitOrTimerCallback.PerformWaitOrTimerCallback(Object state, Boolean timedOut)

It's getting even more curious.
I just created a simple test wpf application and implemented the console the same way as in my main application (the build where the error occured). and it worked (in the new test app) .. So i don't really get exactly what the problem causes. Maybe my project is a little bit too large and I miss something.
It's always called this way for example:
ConsoleName.StartProcess("cmd.exe", "");
Mostly I used to start self written console applications^^

As above mentioned, my project is now fine so this has no hurry. :D

But what me wonders is the following thing.
I downloaded your source binaries and if I opened your code everything was fine.. IntelliSense didn't highlight anything.

But at the moment I copied the ConsoleControl.WPF code to my usercontrol and made the changes which had to be done to get this working... it highlighted an error on the above described position in StartProcess. So.. that's why I had opended this issue..
Unbenannt

Well if I find a reason why this happens I will let you know! :)

Best wishes and have a fine weekend
Julian

from consolecontrol.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.