Results 1 to 3 of 3

Thread: Ice 3.4.1 UnsupportedEncodingException

  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

    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:

    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.
    Last edited by raulgd; 04-06-2011 at 05:34 PM.
    Raul Guerrero
    Software developer
    Jimi.mx

  2. #2
    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
    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.
    Raul Guerrero
    Software developer
    Jimi.mx

  3. #3
    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,

    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.

Thread Information

Users Browsing this Thread

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

Posting Permissions

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