Home Help Center

IceE on Gumstix

pepipepi Member Antonio PepicielloOrganization: Merlino TechnologyProject: Mobile Devices
Hi to all.
I'm using IceE on gumstix HW.
My HW configuration is:
1) Gumstix Basic 400 Bluetooth with MMC card
2) Modem GSM-GPRS connected to Gumstix ttyS2
My SW application have two server Ice. One on Bluetooth PAN network interface and one on PPP GPRS network interface.
I have the following problems:
1) When I try to use different local Ice::CommunicatorPtr ic for client and server the calling to the method ic->destroy() into an Ice Client versus a remote Ice Server causes a crash into my SW on Gumstix.

2) To solve the above problem I used a global Ice::CommunicatorPtr ic for all Ice Server\Client functions. It seems that all runs good but after some minutes of running the SW crash with or Ice exception message or Aborted message or with Illegal Instruction mesage on Gumstix Console.

I followed your forum posts to build IceE library for Gumstix.
Thanks.

Comments

  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    Sorry, its not clear what the problem is from your description nor whether this is specific to gumstix. Did you try your application on a non-gumstix host (such as a regular linux or windows box)?

    The best way to get assistance is to create a small self-contained compilable example that demonstrates your problem.
  • pepipepi Member Antonio PepicielloOrganization: Merlino TechnologyProject: Mobile Devices
    IceE Communicator Destroy Problem on Gumstix

    Hi
    Thanks for the reply.
    I investigate on IceE Communicator Destroy problems on Gumstix platform.
    I use the following Cpp source code:
    int CentralConnectClient(void)
    {
    Ice::CommunicatorPtr ic_central_client;
    int status = 0;
    string endpoint;
    stringstream ss_ip_port;
    stringstream ss_serial;
    string ip_port;
    int argc = 0;

    /*convert Centrl IP port to string*/
    ss_ip_port<<configDevice.GetCentralserverport();
    ss_ip_port>>ip_port;
    //cout << "IpPort="+ip_port << endl;

    endpoint.empty();

    endpoint.append("Central: tcp -h ");
    endpoint.append(configDevice.GetCentralserver());
    endpoint.append(" -p ");
    endpoint.append(ip_port);

    cout << endpoint << endl;

    try {
    ic_central_client = Ice::initialize(argc,NULL);
    Ice::ObjectPrx base = ic_central_client->stringToProxy(endpoint);

    CentralPrx central = CentralPrx::checkedCast(base);


    if (!central)
    throw "Invalid proxy";
    status = central->connect(serial_numb,ppp_ip_address,socket_port);
    } catch (const Ice::Exception& ex) {
    cerr << "CentralConnectClient Error " << ex.toString() << endl;
    status = 0;
    } catch (const char* msg) {
    cerr << "CentralConnectClient Error " << msg << endl;
    status = 0;
    }

    cout << "Central Client before destroy" << endl;

    if (ic_central_client)
    ic_central_client->destroy();

    cout << "Central Client after destroy" << endl;

    return status;
    }

    After calling this client the SW on Gumstix crash with the following message:

    Central Client before destroy
    terminate called after throwing an instance of 'IceUtil::ThreadSyscallException'
    what(): ../../include/IceE/Mutex.h:343: IceUtil::ThreadSyscallException:
    thread syscall exception: Operation not permitted
    Aborted

    I try an IceE Client on Windows CE platform with the following source code:

    Ice::CommunicatorPtr ic;
    int argc = 0;
    char argv;
    try {
    ic = Ice::initialize(argc,NULL);
    Ice::ObjectPrx base = ic->stringToProxy(
    "HiveGBnep:tcp -h 192.168.0.1 -p 8588");
    CentralPrx central = CentralPrx::checkedCast(base);
    if (!central)
    throw "Invalid proxy";
    central->connect(serial_numb,ppp_ip_address,socket_port);
    } catch (const Ice::Exception& ex) {
    AfxMessageBox(CString(ex.toString().c_str()));
    } catch (const char* msg) {

    }
    if (ic)
    ic->destroy();

    and after the destroy calling all works fine.
    Any ideas of the problems on Gumstix platform?
    Thanks for your help
  • pepipepi Member Antonio PepicielloOrganization: Merlino TechnologyProject: Mobile Devices
    IceE Communicator Destroy Problem on Gumstix

    Hi again.
    I'm continuing to investigate on destroy problem on Gumstix platform.
    In the previous post I forgot to say that the CentralConnectClient function was called into a POSIX thread spawned from Main.
    I try to move the call to the Client function into the main function of my SW. My SW still crash with the following error message:

    Central Client before destroy
    terminate called after throwing an instance of 'Ice::ConnectionLostException'
    what(): ../../src/TcpTransport/Transceiver.cpp:264: Ice::ConnectionLostException:
    connection lost: recv() returned zero
    Aborted

    I hope that this new message error can be usefull to understand the problem.
    Thanks
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    Could you please put the full name of your company/organization in the organization field of your profile? Thanks.

    I assume you're using Ice-E 1.2.0. The communicator destroy() call shouldn't fail. It's not clear to me why it doesn't work on your hardware. From the exceptions you're getting, it sounds like some environment issues.

    Which development platform and compiler are you using? Are you using the Gumstix Linux Buildroot revision 1364 runtime on your gumstix hardware? Did you try running the Ice-E demos to see if they worked fine?

    Cheers,
    Benoit.
  • pepipepi Member Antonio PepicielloOrganization: Merlino TechnologyProject: Mobile Devices
    Problem resolved on Gumstix

    Hi
    thanks for your help. I built the IceE1.2 library on gumstix build root 1161. I update the buildroot to 1410 release and rebuild the IceE1.2 library with new toolchains. Now my SW works fine without problems on communicator destroy method.

    Thanks a lot.:)
Sign In or Register to comment.