|
A question
I am making a new thread so my program have two threads (main thread) and worker thread then I am testing this code but the problem is same ?
could you explain it ?
Thanks
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Hamid. wrote: I am making a new thread
Solution is simple. Don't let threads throw exceptions.
|
|
|
|
|
static void Main(string[] args)
{
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(MyException);
throw new ArgumentException("for test");
}
static void MyException(object sender, UnhandledExceptionEventArgs e)
{
Console.WriteLine("CAUGHT: " + e.ExceptionObject.ToString());
}
Works for me; displays the exception with the custom text in the console, and then switches to the debugger. What did you expect it to do, and what behaviour are you observing?
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Its the result of event viewver
Faulting application name: Mydynamic.exe, version: 1.0.0.0, time stamp: 0x507ac6d7
Faulting module name: KERNELBASE.dll, version: 6.1.7601.17514, time stamp: 0x4ce7bafa
Exception code: 0xe0434352
Fault offset: 0x0000b727
Faulting process id: 0x4b4
Faulting application start time: 0x01cdaa154403b39d
Faulting application path: c:\users\apple\documents\visual studio 2010\Projects\Mydynamic\Mydynamic\bin\Debug\Mydynamic.exe
Faulting module path: F:\Windows\syswow64\KERNELBASE.dll
Report Id: 81b9c3ff-1608-11e2-bc0d-005056c00008
but I dont know why the path is c:\ all my programs are on f:\
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Hamid. wrote: Its the result of event viewver
Doesn't contain much hints on what went wrong. I hope you're logging the full text of the exceptions?
Hamid. wrote: Faulting application path: c:\users\apple\documents\visual studio 2010\Projects\Mydynamic\Mydynamic\bin\Debug\Mydynamic.exe
Faulting module path: F:\Windows\syswow64\KERNELBASE.dll
Report Id: 81b9c3ff-1608-11e2-bc0d-005056c00008
but I dont know why the path is c:\ all my programs are on f:\
Looks like it's (also) being run from Visual Studio, debugging on it's C-drive.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Im using of visual studio 2010 SP1
I got this message of e.ExceptionObject
System.ArgumentException: for test
at ConsoleApplication1.Program.Main(String[] args) in c:\users\apple\documents\visual studio 2010\Projects\Mydynamic\Mydynamic\Program.cs:line 17
and it clr shows this window
Windows can check online for a solution to the problems.
Check online for a solution and close the program
Close the program
Debug the problem
when I click on the "Debug the problem" item, visual sutdio Just In-Time debugger asks
"Do you want to debug using the selected debugger?"
after yes it goes to my code
exception details are
System.ArgumentException was unhandled
Message=for test
Source=Mydynamic
StackTrace:
at ConsoleApplication1.Program.Main(String[] args) in c:\users\apple\documents\visual studio 2010\Projects\Mydynamic\Mydynamic\Program.cs:line 17
InnerException:
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
That seems to work as expected; the AppDomain-handler correctly gets the message and processes it. And no, it doesn't prevent the app from closing - you'll have to fix the exception.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Hello,
The problem is, when I run a method from other form (example: From form1 I call form2.mymethod) , it show me error in MessageBoxManager.cs
in:
hHook = SetWindowsHookEx(WH_CALLWNDPROCRET, hookProc, IntPtr.Zero, AppDomain.GetCurrentThreadId());
How can I solve this ?
Best regards
Manolis Saridakis
|
|
|
|
|
Saridakis Manolis wrote: How can I solve this ?
Disable the hook when debugging. It's not even related to the error you are reporting.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Why are you using AppDomain.GetCurrentThreadId() ?? That's been obsolate since .NET 2.0 because it doesn't return the correct ID in all cases.
Any why are you setting this hook at all??
|
|
|
|
|
Hi, i'm trying to get OpenCvSharp runing and i couldn't manage to make it work. Google tutorials haven't help, or i just can't get it right. Anyone that can help me installing and a basic tutorial?
I'm trying to make my program recognize a PS3 Eye (hopefull could choose in the differents resolutions settings), and show live video.
|
|
|
|
|
Daniel Heinsohn wrote: Google tutorials haven't help, or i just can't get it right. Anyone that can help me installing and a basic tutorial?
What makes you think my tutorials are better than those of Google? What does "couldn't manage to make it work" mean? Did you get an exception, some kind of error? Did the library not compile?
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Those from google are probably the same ones you or anyone here post, i just can make them work i think. Whenever i want to run a code for recognizing camera, an error pops about the P/invoke. Give me 3 possible solutions, but non of them of my understanding.
OpenCV's DLL files exist in the same directory as the executable file....
Visual C++ Redistributable Package has been installed....
The target platform(x86/x64) of OpenCV's DLL files and OpenCvSharp is the same as your project's....
Maybe i got a wrong OpenCvSharp.dll
|
|
|
|
|
Daniel Heinsohn wrote: Whenever i want to run a code for recognizing camera, an error pops about the P/invoke. Give me 3 possible solutions, but non of them of my understanding.
The problem with other tutorials is that they'll use a comparable technique, and you'd be running into the same wall.
If the PC is 64 bits, might be a conflict with incompatible versions. What did the P/Invoke exception say?
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
i want to use 1 page in C#.. when we use MDI. like as web page... can it possible....?
|
|
|
|
|
Tehn you don't need MDI as it stands for MULTIPLE Document Interface. A single editor that let's you edit mulitple documents of the same type. That was it's intended design and you would be trying to make it do something it's NOT designed to do.
You don't need MDI for this and from the sounds of it, you don't even need a Windows Forms app.
|
|
|
|
|
Hello all!
I have to draw a 3D terain (polygon) using openGL and Tao Framework in C#. The problem is, i have never done such things before and i dont know how to start. I have my KML file and i wonder, how to read data or use coordinates, to draw a 3D terain of the path i've walked (or drove with a car).
Can anyoone give me any advice or help how to start making the 3D object of it?
Thnx.
The point of the program is, to create a 3D polygon which can rotate around, so i could see in 3D where i walked, if u can understand what i mean with that.
modified 13-Oct-12 11:39am.
|
|
|
|
|
I highly suggest picking up a book on 3D graphics. You're not going to get all the information you need from a couple of forum posts.
|
|
|
|
|
Yes, i can imagine that. I thought some directons would help me from people who are already familiar with such things.
The thing was told to be 'easy' to make.
Any help given, will be apreciated, like your reply. Thnx.
Greets, Tom
|
|
|
|
|
tokano wrote: The thing was told to be 'easy' to make.
"Easy" is a term relative to the skill level of the person doing it, not the task itself.
|
|
|
|
|
How to Display fingerprint images from fingerprint Device?
|
|
|
|
|
By consulting the SDK documentation for the device.
|
|
|
|
|
namespace NecRoutines
{
public class Invoke
{
private System.Windows.Forms.Timer TrzTimer = new System.Windows.Forms.Timer();
private void TrzInitialize()
{
this.TrzTimer.Tick += new System.EventHandler(this.TrzTimer_Tick);
TrzTimer.Interval = 1000;
TrzTimer.Enabled = true;
TrzTimer.Start();
}
private void TrzTimer_Tick(object sender, EventArgs e)
{
}
public static void TrzStart()
{
TrzInitialize();
}
}
}
this is the error message that i get for calling TrzInitialize() during building this
DLL program. Consider that TrzInitialize() must be non static because of timer routine definition and TrzStart() must be static to be known for main program. thanks
|
|
|
|
|
You cannot call TrzInitialize from static method.
Its common sense. Since Invoke.TrzStart is static and you have 10 instances if Invoke class which of them you want to use to call TrzInitialize?
You have to explicilty set that instance like
public static void TrzStart(Invoke instance)
{
instace.TrzInitialize();
}
No more Mister Nice Guy... >: |
|
|
|
|
|
thanks, it works properly I appreciate your knowledge. So I am still a novice.
|
|
|
|