Archived

This forum has been archived. Please start a new discussion on GitHub.

Ice 3.4.1 UnsupportedEncodingException

Hi,

My PC has windows XP SP3 32-bit and the Ice version is 3.4.1. I use the MS visual studio 2010 express toolchain.

I built a C++ app using the Ice::Service class. I marked the start() function as virtual and did the whole initialization stuff, here's the code:
try
{
//create the object adapter
	adapterPtr = communicator()->createObjectAdapterWithEndpoints("KeychainAdapter", "default -p 10000");

	//inform the object adapter of the servant and set an identity
	adapterPtr->add(new UserAuthorization(), communicator()->stringToIdentity("UserAuthorizationService"));

	//activate the adapter
	adapterPtr->activate();

	status = EXIT_SUCCESS;
	return true;
}
catch (const Ice::Exception& e)
{
	cout << "Error initializing the service: " << e.what() << endl;
	status = EXIT_FAILURE;
	return false;
}

Now, when I debug, I run step by step through the start function and everything works as expected, after that the debugger jumps to the main() function and stops at return svc.main() as it should, but after about 20 or 30 seconds and then periodically every 20 seconds or so of running the application, without any clients connecting or anything, just the app waiting for connections, on the debugger output console, I get these exception messages:


Exception at 0x7c812afb, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) in ice34d!Ice::UnsupportedEncodingException::ice_name

Exception at 0x7c812afb, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) in ice34d!Ice::UnsupportedEncodingException::ice_name


I've searched the documentation about that Exception, but the information doesn't really help me, It says something about protocol not supported, but the thing is nobody is connecting! the app is just running by itself waiting for connections. And I've followed the execution with my debugger and all of my code runs as it should, I don't even know where those exceptions come from.

Any ideas?

Thanks!



EDIT: I just found out using a dummy client, when the client exits without calling destroy(), then I get the same exception in the server, the problem is, I still don't know why I get the exceptions if no client is trying to connect, and I've even disconnected the computer from the network to discard even port scanning or anything external, and still get the same thing.

Comments

  • Ok, I changed the Ice::Service class and initialized everything by myself, and for starting an event loop, I tried both Qt with QtCoreApplication and POCO Application, and using both of those event loops I stopped getting the exceptions randomly, I only get them when a client connection drops, but I guess that's expected.

    It would be nice if someone else tries it as well, to see if it's something else, like a bug in Ice::Service or something.
  • xdm
    xdm La Coruña, Spain
    Hi Raul,

    It will help if you can attach a complete stack trace of your program when this exception is throw.

    Or if you can create a small test case that allow us to reproduce the problem.