Results 1 to 3 of 3

Thread: inferior stopped, write access violation win32 MSVC2010

  1. #1
    raulgd's Avatar
    raulgd is offline Registered User
    Name: Raul Guerrero
    Organization: Jimi
    Project: RI of mexican standard of Electronic Health Record
    Join Date
    Mar 2011
    Location
    Queretaro, Mexico
    Posts
    15

    inferior stopped, write access violation win32 MSVC2010

    Hi everyone,

    I was just running tests of ICE using MSVS 2010 C++ express, now, I did everything, changed from /lib to /lib/vc100 and everything, but some weird things happen.

    First, when I run it as debug with iced and iceutild, I get an error saying "The inferior stopped because it triggered an exception" and the disassembler code shows Memory access error, and the debugger shows write access violation.

    Now, I used MSVC2008 with the normal libraries and had no issues, I even used MSVS 2010 professional and it worked with /lib/vc100, but now that I use express I get this issue.

    When I build it as release instead of debug, the program actually runs, but when running I get the message: ObjectAdapterI.cpp:1215: Ice::EndpointParseException: error while parsing endpoint `invalid object adapter endpoint `

    Now, from what I know the error is using createObjectAdapterWithEndpoints, I searched the forum, and it happened with MSVC2010 when not using the vc100 build, but I am using it, and still, I'm not able to debug and on release I get the Endpoint exception, here's the code, I'm sure it works because I tested with MSVC2010 professional and MSVC2008, and no, I don't use MSVC2010 pro anymore because it was just the trial, so developing with it is not an option.


    Code:
    //the main handler of the Ice runtime
    	Ice::CommunicatorPtr ic;
    
    	try {
    		//initialize the Ice runtime
    		ic = Ice::initialize(argc, argv);
    		cout << "initialize the Ice runtime" << endl;
    
    		//create the servant of Printer and add the runtime to the servant so it can be deleted on aboutToQuit()
    		PrinterI *p = new PrinterI();
    		Ice::ObjectPtr object = p;
    		cout << "create the servant of Printer" << endl;
    
    		//create the object adapter, here's where it throws the exception
    		Ice::ObjectAdapterPtr adapter = ic->createObjectAdapterWithEndpoints("SimplePrinterAdapter", "default -p 10000");
    		cout << "create the object adapter" << endl;
    
    		//inform the object adapter of the printer servant and set an identity for the servant
    		adapter->add(object, ic->stringToIdentity("SimplePrinter"));
    		cout << "inform the object adapter of the printer servant and set an identity for the servant" << endl;
    
    		//activate the adapter
    		adapter->activate();
    		cout << "activate the adapter" << endl;
    	}
    	//catch any Ice initialization exception
    	catch (const Ice::Exception& e) {
    		//Ice::Exception.what()
    		cout << "Error: " << e.what() << endl;
    	}
    Any ideas? thanks for your time everyone!
    Raul Guerrero
    Software developer
    Jimi.mx

  2. #2
    xdm's Avatar
    xdm
    xdm is offline ZeroC Staff
    Name: Jose Gutierrez de la Concha
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Sep 2003
    Location
    La Coruņa, Spain
    Posts
    588
    Hi Raul,

    Are you sure that you have the correct PATH, to use VC100 you need to have c:\Program Files\Ice-3.4.1\bin\vc100\

    If that isn't the problem you should do as Bernard suggest in this similar post

    MS Visual Studio 2010 built .exe fails to run outside

  3. #3
    raulgd's Avatar
    raulgd is offline Registered User
    Name: Raul Guerrero
    Organization: Jimi
    Project: RI of mexican standard of Electronic Health Record
    Join Date
    Mar 2011
    Location
    Queretaro, Mexico
    Posts
    15
    Quote Originally Posted by xdm View Post
    Hi Raul,

    Are you sure that you have the correct PATH, to use VC100 you need to have c:\Program Files\Ice-3.4.1\bin\vc100\
    Thanks, I already had it in the PATH, I just fixed it, but just to let anyone know about this who may bump into this problem as well.

    I did have the PATH set with vc100, but the problem is in MSVC2010 express, it's not resolving correctly the bin path where the DLL are, I ran DependencyWalker and it wasn't resolving the path correctly, there's no issue in MSVC2010 professional because it uses the professional linker and compiler, but the latest express edition comes with another toolchain named Windows SDK for Windows 7 v7.1, so it was an issue with that.

    I had to manually copy the DLLs to the debug and release folder, it's really annoying, but I guess that the price you pay for using the express edition with the windows SDK 7.1.

    By the way, I use the SDK 7.1 with MSVC2010 express because that's the only way to use cdb for debugging, as the express edition comes with a light debugger, if you want all of the debugger features, you need to do a separate download of the debugger tools for windows.

    So, anyone who has issues with the express edition 2010, remember to download and install the windows SDK 7.1, install the debugger tools with it, and then install VS express, and copy the DLLs straight into your debug and release tools, as placing the PATH in the environment variables won't work.

    Thanks for the quick response though! you guys have a really active forum, it's nice that you can get help asap!
    Raul Guerrero
    Software developer
    Jimi.mx

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 04-12-2010, 10:59 AM
  2. Replies: 1
    Last Post: 09-17-2008, 02:55 AM
  3. ICE PHP requires write access?
    By trivian in forum Help Center
    Replies: 3
    Last Post: 08-28-2008, 10:32 AM
  4. DLL access violation
    By youkind in forum Help Center
    Replies: 2
    Last Post: 08-15-2006, 04:47 AM
  5. Access Violation using ICE with Automation DLL
    By amrufon in forum Help Center
    Replies: 2
    Last Post: 08-06-2003, 11:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •