Results 1 to 5 of 5

Thread: First time trying multiple inheritance, getting C++ exception at run time.

  1. #1
    JohnB is offline Registered User
    Name: John Basrai
    Organization: Northrop Grumman
    Project: Airborne Payload Command Control Interface
    Join Date
    Feb 2005
    Posts
    49

    First time trying multiple inheritance, getting C++ exception at run time.

    I'm using Ice 3.3.1 on Solaris 9. This is my Ice source:

    Code:
        interface PlayBackObserver extends ReportObserver, NavDataObserver  {
            void playBackFinsihed(bool wasCancled);
        };
    This worked fine until I added the second interface.

    Not at run time I get the following exception. It appears to be trying to construct a Proxy for NavDataObserver but crashes. What am I doing wrong?


    Code:
     0002a6e4 IceProxy::ipa::NavDataObserver::NavDataObserver() (21e088, 15a200, 0, 15a280, 21e030, fffffff4) + 2c
     0002a3c8 IceProxy::ipa::PlayBackObserver::PlayBackObserver() (21e038, 2063a0, 15a280, ffffffff, 21cbd8, 15a000) + 54
     0002a2c8 IceInternal::ProxyHandle<IceProxy::ipa::PlayBackObserver> IceInternal::checkedCastImpl<IceInternal::ProxyHandle<IceProxy::ipa::PlayBackObserver> >(IceInternal::ProxyHandle<IceProxy::Ice::Object> const&, std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const*) (ffbfd3e8, 0, ffbfd248, 21c040, 218d38, c) + 17c
     0002903c IceInternal::ProxyHandle<IceProxy::ipa::PlayBackObserver> IceInternal::checkedCastHelper<IceProxy::ipa::PlayBackObserver, IceProxy::Ice::Object>(IceInternal::ProxyHandle<IceProxy::Ice::Object> const&, void*, std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const*) (ffbfd3e8, 0, 0, ffbfd2ec, ffbfd310, ffbfd310) + 20
     00027cc4 IceInternal::ProxyHandle<IceProxy::ipa::PlayBackObserver> IceInternal::ProxyHandle<IceProxy::ipa::PlayBackObserver>::checkedCast<IceProxy::Ice::Object>(IceInternal::ProxyHandle<IceProxy::Ice::Object> const&) (ffbfd3e8, ffbfd3f8, a, 21b1a8, 21b1a8, ffbfd3e8) + 24
     0001e7c8 ipa::EcmsServerTest::TestSetup() (2173c0, 741f4, fe9c29bc, fe9bc000, 2173c0, 217ae8) + 7b8
     00032e38 CppUnit::TestCaller<ipa::EcmsServerTest>::runTest() (217ae8, ff000000, fe9c29bc, fe9bc000, 0, 35) + 80
     00141c74 CppUnit::TestCaseMethodFunctor::operator()() const (ffbfd880, 0, fe9c29c8, fe9bc000, 3, 1b3860) + 34
     001527a8 CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (217320, ffbfd880, ffbfd7f0, ffbfd768, 219888, 152794) + 14
     00153bf4 CppUnit::ProtectorChain::ProtectFunctor::operator()() const (208640, 0, 219478, 219278, 21968c, 153be0) + 14
     001538d0 CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (21ac88, ffbfd880, ffbfd7f0, ffbfd738, ffbfd6e4, 1b42a8) + 1e0
    ...
    The C++ source code is:

    Code:
        class PlayBackObserverImpl : virtual public ipa::PlayBackObserver
        {
            virtual ~PlayBackObserverImpl();
    
            ... Methods for both interfaces ...
        };
    Last edited by JohnB; 08-18-2009 at 06:57 PM.

  2. #2
    JohnB is offline Registered User
    Name: John Basrai
    Organization: Northrop Grumman
    Project: Airborne Payload Command Control Interface
    Join Date
    Feb 2005
    Posts
    49

    Wrong forum!

    After I posted this I noticed that I put this in the wrong forum. I intended to put it in "Help Center" not "Bug Reports" but I can't find a way to move it or delete it. Any way sorry for the confusion.
    -John

  3. #3
    mes's Avatar
    mes
    mes is offline ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,445
    Hi John,

    I've moved this thread to the Help Center.

    You didn't specify your compiler, so I took a guess and built Ice with GCC on Solaris 10 and tried to reproduce your problem by tweaking the Slice definitions of the 'hello' demo, but it worked correctly. Do you have a small, self-contained example that reproduces the problem?

    Regards,
    Mark

  4. #4
    JohnB is offline Registered User
    Name: John Basrai
    Organization: Northrop Grumman
    Project: Airborne Payload Command Control Interface
    Join Date
    Feb 2005
    Posts
    49
    It's built on Solaris 9 using Gcc 3.4.1; I have a version of Ice built using that compiler.

    Quote Originally Posted by mes View Post
    Hi John,

    I've moved this thread to the Help Center.

    You didn't specify your compiler, so I took a guess and built Ice with GCC on Solaris 10 and tried to reproduce your problem by tweaking the Slice definitions of the 'hello' demo, but it worked correctly. Do you have a small, self-contained example that reproduces the problem?

    Regards,
    Mark
    I built the hello demo as is first to verify that it worked then modified it create a example and does repo the problem but the stack trace is different.

    Here are my mods to hello demo.

    Code:
    module Demo
    {
        interface base1
        {
            void base1Method(string msg);
        };
        interface base2
        {
            void base2Method(string msg);
        };
    
        interface Hello extends base1, base2
        {
            idempotent void sayHello(int delay);
            void shutdown();
        };
    
    };
    The stack trace I get is:

    Code:
    core 'core' of 15574:   ./server --Ice.Config=config.server
    -----------------  lwp# 1 / thread# 1  --------------------
     000319d4 IceInternal::Handle<Ice::Object>::Handle<Demo::Hello>(IceInternal::Handle<Demo::Hello> const&) (ffbfda60, ffbfda50, ffbfda5
    0, 4dec0, ffbfda58, ffbfda50) + a0
     0003104c HelloServer::run(int, char**) (ffbfdd28, 1, ffbfdda4, 4dec0, ffbfdb28, 8) + 254
     fee4dfb0 Ice::Application::mainInternal(int, char**, Ice::InitializationData const&) (ffbfdd28, 2, ffbfdda4, ffbfdc98, 0, ff0cff8c) 
    + 70c
     fee4ccb0 Ice::Application::main(int, char**, Ice::InitializationData const&) (ffbfdd28, 2, ffbfdda4, ffbfdc98, ffbfdc88, 40) + dc
     fee4cb78 Ice::Application::main(int, char**, char const*) (ffbfdd28, 2, ffbfdda4, 35e90, 258, ff3cdc4c) + 3b8
     00030d9c main     (2, ffbfdda4, ffbfddb0, 4b7cc, 0, 0) + 34
     0001b858 _start   (0, 0, 0, 0, 0, 0) + 5c
    Thanks
    John

  5. #5
    JohnB is offline Registered User
    Name: John Basrai
    Organization: Northrop Grumman
    Project: Airborne Payload Command Control Interface
    Join Date
    Feb 2005
    Posts
    49
    It is working with a gcc built version of Ice on Solaris 10 so this may be a problem either with Solaris 9 or with how I have built Ice on Solaris 9. I may have to try to rebuild Ice on Solaris 9 from a clean install to see if I can repair this.
    -John

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. how to control the time?
    By russule in forum Help Center
    Replies: 9
    Last Post: 01-26-2007, 09:07 PM
  2. How can I make a server run long time?
    By level in forum Help Center
    Replies: 4
    Last Post: 02-14-2006, 02:02 PM
  3. Zero value for IceUtil::Time
    By catalin in forum Help Center
    Replies: 1
    Last Post: 10-05-2004, 07:28 AM
  4. Sample Application run time error
    By chenhong_sz in forum Help Center
    Replies: 3
    Last Post: 09-23-2004, 10:09 AM
  5. Multiple Inheritance problem
    By brian in forum Help Center
    Replies: 4
    Last Post: 03-11-2004, 07:20 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
  •