473,396 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Server throws AccessViolation Error when started up

I'm a software tester. My recent task is to test the exposed methods of our C# server which is using WCF as communication layer.

I wrote a piece of C# code to tets our server. for one of the test, I had to test whether the server is throwing up AddressAlreadyUsed exception when multiple instance of the server is started up.

Ex, my pseudocode
while(till count reaches a limit)
{
Process.Start("server info);
}

During the execution, many instance of the server was started up and it throwed AddressAlreadyUsed exception as expected. But, for some server instance it throwed up an AccessViolation exception.

ex code
21-Jul-2009 15:26:32.71 Error: Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at sFabServer.returnEntry(sFabServer* , sTString<char>* )
at SSM.BCT.Legacy.FabServerConfig.ReturnEntry(String name)
at SSM.BCT.ProcessServer.Server.ServerContext..ctor(P rocessServerConfig config,

Can any one let me know why this was thrown up and is there any un-safe code/thread in the server that spaned up but not killed?
Jul 25 '09 #1
5 1986
Plater
7,872 Expert 4TB
I would guess it has to do with one of the Servers being at a certain state when the next one called.
Try doing a thread sleep in your loop and see if that lowers the number that produce AccessViolations?
Jul 27 '09 #2
Hi Platter,

Thanks for your reply. I will try your suggestion.

I have a question.

I just wondered about what this "System.Runtime.InteropServices.SEHException: External component has thrown an exception." could be, which was thrown for this scenario). Going through the internet related to this error, I came across some people complaining about similar problem and found out that the issue was because of the CLR of the dotnet.

link:
http://objectmix.com/dotnet/97977-i-...pservices.html

I'm not sure about this because those people are using com components which is not in our case, but we are making a call to unmanaged C++ from our C#.
So do you think that this could be a reason for this problem?

We are using CLR version 3.5, but the problem was reported against CLR 2.0.
Is the CLR 3.5 also contains same problem?
Jul 28 '09 #3
Plater
7,872 Expert 4TB
unmanaged code can be considered a COM object for these purposes I think
Jul 28 '09 #4
Hi Plater,

I tried your suggestion, introduced a sleep between the subsequent calls of the server, surprisingly the problem didn't occur with this scenario.

So, What could be the problem? Is it my code?

Thanks,
Sendil
Jul 30 '09 #5
Plater
7,872 Expert 4TB
What object you are starting, is in the middle of "starting up" when the next one tries to start. Since the first one hasn't finished "starting up", it hasn't finished releasing its startup data (which is also probably used in the next object's startup). Depending on how far the first one has gotten at starting up could change the exception you are receiving. (AccessViolation vs AddressInUse)
You could maybe try to put a mutex around the data that is used in startup, but I am rather unfamiliar with how all that works
Jul 30 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: lawrence | last post by:
How do I get PHP to tell the server that when I echo text to the screen, I need for the text to be sent as UTF-8? How does Apache know the right encoding when all the text is being generated by...
1
by: Eduard Ralph | last post by:
Hi, I have a weird exception happening when calling the new operator. I'm not sure if this is the intended reaction to the situation or is actually a problem I've got. In any case a different...
0
by: Marisha | last post by:
Hi guys, I have some issue. Recently we moved our servers to different location and ip addressed have changed,now we started to use dsn everywhere. I have an existing web service that uploads...
0
by: Suresh | last post by:
Hi Guys I have Db2 server installed on remote server. i am connecting to that remote server by using VPN. I want to connect that remote DB2 server instance using my local machine DB2...
1
by: eldoctorSylvain | last post by:
Hello. I Used CSharp express to create a sample remoting app. Pretty simple, a shared interface returning a serialized List<string>, http client channel through default IE proxy, binary...
1
by: BethH | last post by:
Hello! I'm developing a webpage locally. I originally started it on PHP 5 and XP (where it was working). We've recently changed my machine to a dual boot with most of the important stuff on...
1
by: TJ | last post by:
I created a windows service using VS2005. I created/adjusted the install class using the designer controls. I set the user to be 'local system'. I installed the service using the VS2005 cmd...
2
by: gbasilveira | last post by:
Hello all. for all the tay long I have been having this problem and I have beed surfing all the web for help, but I can't find a solution. I am working on a project to open INI Files all the code...
7
by: Anil | last post by:
I have a Javascript program which runs in the browser and has functions work(), and stop(). It listens to commands from the server to work() and can be interrupted by the server to stop(). I am...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.