|
Hi All ,
I have an application written in C# , that has multi threading , While I am debugging the code the process flow suddenly jumps to an unknown position in the solution. I am sure that the current method it is in now is not called by the previous one I was debugging. But I am close to sure that a thread is running parallel to the current thread I am debugging, Is there a way in Visual Studio or is there a 3rd party tool that will help me visualise the threads parallely or is there a way that we can debug the 2 threads on same go simultaneously? If I put more time and effort and a lot of jotting down on the paper I can figure out what is happening but wouldnt it be good if I know of a better way to do my job!
Hoping for the best ,
Thank You
Nikhil Pagidala
Happy Programming!
Regards,
Nikhil Pagidala
|
|
|
|
|
My answer is that I don't know, but I can offer a couple of tips: you can set breakpoints and see the executing thread to see if things are going like expected. You can also use a log (with Debug.Print) to see things as they are happening (use a timestamp).
Nikhil Pagidala wrote: If I put more time and effort
Multithreading debugging has always been *very* hard. If you multithreading bugs, you will spend a lot of time tracking them down. Good luck
|
|
|
|
|
I had that happen many times to me. The problem is that the compiler has not compiled your changes into the executable. I saw this happen many times with Visual Studio .Net 2003. The solution to this is to shutdown Visual Studio, start it back up again, then compile and start your debug information.
Phil
|
|
|
|
|
What about using the Threads window and freezing/thawing threads as you need them?
|
|
|
|
|
hello
i was connect to oracle database using oracleadapter and generate for this adapter a dataset ,the dataset contain data from database when i display it on datagride but it dose not contain anything on the crystal report ????!!!!!
i write these linwe on the load form event
oraqcleadapter1.fill( dataset1 )
and i use .NET2005
how i can solve this problem ????? !!!!!!!!!!!!!!!!!!!
|
|
|
|
|
Please, when you have a question, choose one forum to ask it in, instead of spamming the site. Are you using C#, or VB ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Looking through the fog of his other two spam posts, I think he's asking about why his dataset is coming up empty in Crystal Reports. Two problems, first, I haven't used Oracle in a very long time and don't plan on using it anytime soon, and secondly, my Crystal Reports skills are very meager
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
F*** U Christian...
If U dont want to answer his question, then dont answer it
|
|
|
|
|
Hello everyone, I hope this is the right place to ask.
I am currently designing an user interface on top of a commercial 3d engine.
I was wondering if anyone has some insights about the algorithms behind a texture atlas generation.
By texture atlas, I mean a fairly big 2^n sized texture which will contain several variable-sized textures.
The basic scenario is letting the end-user load custom textures and then store them in this atlas, preventing too many texture changes.
However, despite having tried a practical approach, I am pretty sure this requires some extended knowledge about data structs which I don't think I am proficient with yet.
Has anybody worked to obtain something similar for a MDX application, for instance?
I've found some resources in the net but sadly I couldn't use them to avail. nVidia's code is not clear enough for me to understand the algorithm behind it.
Any help, links or advices would be great and greatly appreciated. Thanks in advance for reading!
|
|
|
|
|
I am creating an ArrayList in C# then passing it to a javascript in a webbrowser.
When trying to read values, I keep getting an "undefined" value for the Array item , i.e. sData[3] in the javascript.
If I do an alert(sData.Count) it does display the correct count for the Array.
Everything up to reading the Array works, the select box gets cleared, etc. But then nothing is passed.
Any help would be appreciated.
C# code:
public class MainForm : Form
{
ArrayList SelectDisplay = new ArrayList();
ArrayList SelectData = new ArrayList();
void PassData_BtnClick(object sender, EventArgs e)
{
FillSelectArrays("Start","none");
FillSelectArrays("One Test","one");
FillSelectArrays("Two Test","two");
FillSelectArrays("Three Test","three");
browser.Document.InvokeScript("FillSelectFromArrays", new object[] { ch.Name, SelectDisplay, SelectData });
}
private void FillSelectArrays(string display, string data)
{
//The Arrays are already defined
SelectDisplay.Add(display);
SelectData.Add(data);
}
private void ClearSelectArrays()
{
SelectDisplay.Clear();
SelectData.Clear();
}
html & javascript:
Test Array:
Values Will Appear Here
function FillSelectFromArrays(sName, sDisplay, sData)
{
var stot = document.forms[0][sName]
EmptySelect(stot)
with (stot)
{
//Rewrites the text and values
alert("sData[3] = " + sData[3]);
for(i=0; i < sDisplay.Count; i++)
{
options[i]=new Option(sDisplay[i], sData[i]);
}
options[0].selected=true
}
}
function EmptySelect(sName)
{
var tot = sName.options.length
for (i=0;i<tot;i++)
{
sName.options[i]=null
}
sName.options.length=0;
}
Thanks!
Sean Murphy
"All things great and small start at the same point, the first step."
|
|
|
|
|
have you tried using an old-school array instead of ArrayList? (i.e. yourArrayList.ToArray())
javascript is probably not capable of handling non-basic .NET types
|
|
|
|
|
Definitely a great idea and one I hadn't thought of, but unfortunately it didn't work. I even tried creating it as an object[] then putting that into a collection.
Arg
Thanks!
Sean Murphy
"All things great and small start at the same point, the first step."
|
|
|
|
|
I hope this query has been put in the right forum
I have a windows application which i need to move from the production environment to deployment
Upon execution of the EXe for the first time the user should be able to enter the server name / initial catalog / user id / pwd have the connection validated and then a custom conection string should be generated and written on to the app.config file (or any other config file) as for that matter
I have already handled everything upto the writing of the connection string in the app.config file
Need to know how exactly will this connection string be added to the config file
Any help will be appreciated and suggestions / alternative approaches are welcome
Regards
-- modified at 16:37 Wednesday 25th July, 2007
Romi
|
|
|
|
|
what you need to do is have methods that allow you to read and write to your app.config file. Follow this article it will show you how to modify an app.config file.
http://www.codeproject.com/csharp/ReadWriteXmlIni.asp
http://ryanfarley.com/blog/archive/2004/07/13/879.aspx
|
|
|
|
|
Thanks for your reply...
is there anyway I can use any of classes in the System.Configuration namespace instead of using XML ?
Also the question may contradict the one above !
Is writing directly to the app.config file once on deployment an accepted practice ?
In case it is not what would be the best way or is there a best practice for storing a connection ?
Regards
Romi
|
|
|
|
|
Thanks for our help everyone....
This issue I have been able to close.....What a relief !!
Romi
|
|
|
|
|
Also, remember the app.config file is a text file, so you must encrypt the connection string. If you don't, the password will be available for everyone to see.
Another thing, DON'T EVER use the sa account. If you are giving an SQL Server account to your users (to put in the connection string), be sure to give it the least priviledges possible (like only executing stored procedures for example).
|
|
|
|
|
In visual studio 2005, when I add a tab control to a form with a gradiant background image, the tabs flicker when I hover over them. Is there a solution to this?
As a side note, I am coding in C#. I found many custom tab controls but they all seemed ugly, or not written in C#.
Help!
|
|
|
|
|
Justin,
I'm guessing that it is just your computer (or mine), cause it doesn't happen to me. I grabbed a gradient background image from the web and placed it as the background. Then placed a tab control on the form. I compiled it and didn't get any flickering. Is there a missing step here you didn't mention?
Hogan
|
|
|
|
|
well I am using vista and the tab control is set to system. The flickering occurs when going back and forth several times showing the hover state. I have antother system on vista that does the same thing.
|
|
|
|
|
I'm using XP. I tried going back and forth several times and I did see it occasionally. Not sure what it is, sorry.
Hogan
|
|
|
|
|
I am using this control to allow users to upload images. I have specifications to validate the file size (.5 mg), deminsions (600x600), and file type (.jpg or .jpeg only). I had to put code around to allow it to see .pdf files but when I load a bitmap the app blows up. It doesn't hit the button click event or even the page_load. It goes straight to the IE "This page cannot be found". Any suggestions.
|
|
|
|
|
Normally, when I have seen upload files blow up right away it has to do with the 4mb limit default for files. I would guess that your web.config has a value that is causing a problem.
maxRequestLength="4096" is the 4mb default. I would probably leave it at that and then check the file size after you have uploaded the file.
Hope that helps.
Ben
|
|
|
|
|
Thanks for the reply, Ben.
However, I don't have the "maxRequestLength" key in my web.config. Also, I don't even get an opportunity to check the size of the file because as soon as you hit the upload/submit button, it jumps straight to "page cannot be found". Weird?!?
|
|
|
|
|
I have in window a graphic. In the same window i have a pictureBox. How can i determin if the pictureBox is on top of the graphic. Is there a method whick determines if a point is inside of an area?
Good gives us the power of creating the future. Use this power with reason.
|
|
|
|