Home Help Center

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

JohnBJohnB Member John BasraiOrganization: VeriFoneProject: Trident ✭✭
I'm using Ice 3.3.1 on Solaris 9. This is my Ice source:
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?

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:
class PlayBackObserverImpl : virtual public ipa::PlayBackObserver
    {
        virtual ~PlayBackObserverImpl();

        ... Methods for both interfaces ...
    };

Comments

  • JohnBJohnB Member John BasraiOrganization: VeriFoneProject: Trident ✭✭
    Wrong forum!

    :eek: 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
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    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
  • JohnBJohnB Member John BasraiOrganization: VeriFoneProject: Trident ✭✭
    It's built on Solaris 9 using Gcc 3.4.1; I have a version of Ice built using that compiler.
    mes wrote: »
    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.
    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:
    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
  • JohnBJohnB Member John BasraiOrganization: VeriFoneProject: Trident ✭✭
    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
Sign In or Register to comment.