|
Hi )
Sorry for my English (
I hope you can help me with this:
We created 1000+ tests in our solution. The problem is that they can't be run all in one batch - VSTestHost process simply dies with System.OutOfMemoryException. That's because it is 32 bit process and when it exceeds 2GB it dies. Ok.. Now the question is why is it happens?
I've tried to profile testlist with 3-4 tests with JetBrains in order to find memory leaks. By the way - did anyone do such thing? I've created .bat-file with MsTest.exe. Then in [TestInitialize()] i've added MessageBox.Show("Start"); and began to make snapshots when this dialogbox appeared. The magic is that there are no memory leaks(+2000 bytes - almost no), but also there are no our classes. So, obviously, what I do to find memory leaks is wrong. I see that VSTestHost process eats a lot of memory with each passing test. Even 50 tests kills process with Memory exception.
So did anyone encountered such problem? And how to profile VsTestHost on memory leaks?
Maybe you can advise me where can I post this message to get an answer?
modified on Tuesday, November 16, 2010 2:08 AM
|
|
|
|
|
As with all memory issues it could be a trillion different things (that's a scientific fact ). I'm guessing it's got to do with your SetUp/TearDown process - can you post a small sample of your test harness code? I think the SetUp/TearDown for the whole harness, the per-test SetUp/TearDowns and also at least one test should be enough to figure something out.
Is it the SUT that's causing this? Wild guess: static collections/instances that are constantly being added to by your tests and therefore the GC never disposes because the SUT still has references to it?
I dunno, as I said, I think a little code may help your question get answered.
|
|
|
|
|
Sure. Here it is:
[TestClass]
public class SS_Identity_Types_Edit_Tests : TestsVS
{
SS_Identity_Types_FullEdit_Form view = null;
[TestInitialize] public override void RunBeforeAllTests()
{
base.RunBeforeAllTests();
view = new SS_Identity_Types_FullEdit_Form(this.basicWindow.DS);
PrepareEditForm(view, GetNamedContextOrCreate("SS_Identity_Types", false), false);
view.IsRunLoadActions = false;
view.Visible = true;
view.Visible = false;
}
[TestMethod] public void TestPrerequisites()
{
Assert.IsNotNull(view);
}
[TestCleanup] public override void RunAfterAllTests()
{
view.Close();
view = null;
base.RunAfterAllTests ();
}
}
it inherits from sthm like this:
[TestInitialize()]
public virtual void RunBeforeAllTests()
{
basicWindow = DoCreateMainWindow();
DoActionsOnLoad();
basicWindow.LoadDataFromDataBase();
}
[ClassCleanup]
public static void ClassCleanup()
{
}
[TestCleanup()]
public virtual void RunAfterAllTests()
{
InvokePrivateMethod(basicWindow, new object[] { new EventArgs() }, "OnClosed");
this.basicWindow.Close();
this.basicWindow = null;
}
I'm pretty sure there are leaks, but I can't get how to find them. As i've said JetBrains attached to test process doesn't show my classes, so, obviousely, I do sthm wrong in my profiling.
|
|
|
|
|
Hello guys,
The developers of GData (YouTube API) don't reply, so I hope somebody from cp can help me.
I am trying to upload a video to YouTube using their API with private proxy. I always get 403 forbidden error.
If I removed the proxy, and upload normally, it works fine.
I tested the proxy with Firefox and it uploads correctly (from their web interface... youtube.com), but in my app ... well it does not work. The proxy is valid (tested with myip.com and it tells the proxy IP).
The source code of the YouTube uploader is here: http://www.sodevrom.net/TestUpload.zip
Open the sln (Visual STudio 2010 C# .net) and in the form class, double click on the button and edit your username/password/developer key.
After that, simply run the app and press the upload button. You will see that it fails
If you go to DownloadYouTube.cs file and remove the proxy (simply comment the liens from the constructor) you will see that it works.
What can be the problem ? How can this be solved?
Hope somebody has experience with this and can help me.
Thanks!
Vlad
|
|
|
|
|
Can I mash up C# (Windows Forms) with Java code. Can you give me examples of what' s possible and most important practical with both combined?
|
|
|
|
|
I think this[^] may be what you are looking for.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
Well this is really nice, but paid.
modified on Wednesday, November 10, 2010 3:39 PM
|
|
|
|
|
Not everything in life is free! The secondary point I was making was that it is impossible to answer your question in a forum like this. You need to start by researching the products available and then try some of them. When you have more specific questions then try posting them back here.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
You can make use of JNI or JNBridge to make them communicate. Though this will depend one your application details which way is most suitable for you. You can also opt to write a Java web service and use that in C# code.
Never forget to Dispose any of the ODP.NET object
|
|
|
|
|
TCPMem wrote: of what' s possible and most important practical with both combined?
IMO, its not practical. If programs from different vendors need to communicate, web services are the best way.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
TCPMem wrote: Can you give me examples
I've got this Ja[^] between my bookmarks that I still haven't tried, so I can't tell you if it's practical - but it looks promising
I are Troll
|
|
|
|
|
32 bits 3. party library in a 64 bits server.
Hi experts.
I have a problem that I need help to solve, so I’m reaching out for help.
My current wcf service is using a 3. party library. This library is only supporting 32 bits operating systems, and my wcf service is moving to 64 bits windows server os.
The vendor is large and we are small, getting a 64 bits version of the library was a big NO.
Unfortunately I can not change to another vendor so I’m stuck with the problem.
My wcf is going to be run in IIS6, and the server hosts multiple wcf services in the IIS, each with it’s own app pool.
I have tried this
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/405f5bb5-87a3-43d2-8138-54b75db73aa1.mspx?mfr=true
but it won’t work to set the flag Enable32BitAppOnWin64 on only the app pool to my wcf service in IIS 6. I can only set the flag on all the app pools to 32 bits. Witch is a no go from the rest of the company. And we did test it on our test server, It didn’t work.
IIS7 might work, but migrating to IIS7 based upon it might work, is a no go from the rest of the company.
My co-worker found this blog on how to get this to work.
http://www.dnjonline.com/article.aspx?id=jun07_access3264
Basically make a .net com wrapper for the library, and the com library runs on a 32 bits process. Than make another .net wrapper with communicate with the com library.
Now this where promising so I tried this, but ran into trouble immediately.
A .net library in com needs to be strongly type, with a public key.
Therefore any reference need to be strongly typed as well, which my 3. party library is not.
So to my questions.
Do anyone now a better way to get my 32 bit 3. party library to work on a 64 bit os?
Does anyone now how to create a strongly typed library with a reference that is not a strongly typed.
Regards
Frode Sætre
|
|
|
|
|
There are a couple of things you can look at - first of all, you could look at using corflags on the 32 bit DLL (assuming it's a .NET assembly). Secondly, you can update the 3rd party library using a cool tip that my good mate Marlon Grech posted about here[^].
|
|
|
|
|
Hi.
Thanks for the response.
Coreflags are to manipulate .exe files, which I don't have. I will use the IIS 6 as hosting for my wcf services. If I got this wrong and I can use coreflags on my wcf service dll, I humbly apologise, and please tell me how.
The trick of using the ILDASM and ILASM did not work.
Even though I tried a bunch of different output encoding and dumped everything.
The ILSAM failed with the informative error message
***** FAILURE *****
What it failed on is uncertain as no other error message where shown.
Any other tips on how to get this to work will be much appreciated.
Regards
Frode Sætre
|
|
|
|
|
I don't know any easy solution for you. I have some comments though:
1.
I expect CORFLAGS handles all kinds of executable code, including DLL files. However:
If you update a strong-named assembly, you must sign it again before executing its code.
That is what MSDN says on CORFLAGS.EXE here[^].
2.
I expect the ILDASM/ASM trick would fail when some obfuscation got applied to the original executable.
3.
The hard way to get it solved would be by creating a wrapper (a 32-bit process) that is *not* a COM wrapper. Maybe remoting can be of help here.
|
|
|
|
|
I am using a DirectoryCatalog in MEF to satisfy imports in my application. However, there are sometimes obfuscated assemblies in the directory that cause a ReflectionTypeLoadException when I try to compose the catalog.
I know I can get round it by using a separate directory or by using a search filter on the DirectoryCatalog but I want a more general way to solve the problem. Is there some way I can handle the exception and allow composition to continue? Or is there another more general solution?
Phil
The opinions expressed in this post are not necessarily those of the author, especially if you find them impolite, inaccurate or inflammatory.
|
|
|
|
|
I need to Create employee leave management system in C#.net using mysql database. I need some details regarding leave management and also if sample application available in google. i am searching for that. If anybody knows, please reply me.
If anybody knows the proper website reference or links for creating that leave management, please provide me the details and downloadable links.
Thanks in advance.
modified on Wednesday, November 10, 2010 7:27 AM
|
|
|
|
|
I'm confused. You need to create this system but you want somebody to give you the code??? Surely that isn't you creating the system, is it?
|
|
|
|
|
No i am asking the reference of proper link of leave management application which is created in asp.net which is available in google and not the code. I need some details regarding leave management and also if sample application available in google. i am searching for that. If anybody knows, please reply me.
|
|
|
|
|
sr159 wrote: i am asking the reference of proper link of leave management application which is created in asp.net
You're, more than likely, not going to find one.
If you want to details about what the app should do, the rules it has to follow, and what needs to tracked and reported, be a developer and start asking those questions of the client. It's called "Requirementes Gathering". They want the app, they have the expectations and requirements.
|
|
|
|
|
sr159 wrote: No i am asking the reference of proper link of leave management application which is created in asp.net which is available in google and not the code.
If you are trying to gather requirements, then the technology is irrelevant. Why should a PHP version differ, from a users point of view, from an ASP.NET one? As Dave says, talk to your users. Find out what they want - after all, if they wanted somebody else's free solution, they could just download it themselves.
|
|
|
|
|
What you want is a Business Analyst to get you some information about what this system is supposed to do. "Leave Management" is a pretty general subject and can and will go wrong in so many ways if you don't nail down at least some of the general requirements up front, at which point you can start thinking of design. If you are on your own on this project, then you need to do this BA work first.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
Good morning,
I want to report that Thunder Unit Conversion has a bug in temperature conversion between degree Centigrade and Fahrenheit.
Kind Regards
|
|
|
|
|
can anyone help me to resolved this bug!?
|
|
|
|
|
Have some patience. It takes more than two minutes for anyone to respond. This is also a volunteer site; people will answer on their time, not yours.
I know the language. I've read a book. - _Madmatt
|
|
|
|