|
|
|
|||||
|
Change in Behavior in 2.1 from 2.0
Hi,
My server exits with an assertion in 2.1, but didn't in 2.0, when it is aborted with ctrl-C: ^CAssertion failed: _ref > 0, file ../../include/IceUtil/Shared.h, line 233 I'm sure it is something I am doing wrong, since the demos behave correctly, but I didn't see anything in the release notes that would be an issue. Any info appreciated. Code: int main(int argc, char *argv[]) { ConfLog::Server server; std::cerr << "Hello there!\n"; return (server.main(argc, argv)); std::cerr << "Goodbye!\n"; } int ConfLog::Server::run(int argc, char *argv[]) { _adapter = communicator()->createObjectAdapterWithEndpoints("Server", "default -p 10501"); _adapter->add(this, Ice::stringToIdentity("Server")); shutdownOnInterrupt(); _adapter->activate(); cerr << "Ready!\n"; communicator()->waitForShutdown(); return (EXIT_SUCCESS); } -- Andrew Bell andrew.bell.ia@gmail.com |
|
|||||
|
Stack Trace
(gdb) where
#0 0xfed9f81c in _lwp_kill () from /usr/lib/libc.so.1 #1 0xfed50a24 in raise () from /usr/lib/libc.so.1 #2 0xfed36ce0 in abort () from /usr/lib/libc.so.1 #3 0xfed36f80 in _assert () from /usr/lib/libc.so.1 #4 0x000287ec in IceUtil::Shared::__decRef() (this=0x499d0) at Shared.h:233 #5 0xff177284 in ?? () from /local/opt/Ice-2.1.0/lib/libIce.so.21 #6 0x000260b8 in ~Handle (this=0xffbff704) at Handle.h:87 #7 0x000253a8 in ~Server (this=0xffbff700) at Server.cc:11 #8 0x0001db70 in main (argc=1, argv=0xffbff78c) at Server.cc:13 The only thing that I notice that you are doing differently in your samples is that you are dynamically allocating an interface object at the time the adapter is added. In my case the Server class (where run is being called) IS the interface object (on the stack), and "this" is passed as an argument on "adapter->add()". I think that I must have seen the method I used somewhere in your examples or the book, but I don't remember where. Thanks as always, -- Andrew Bell andrew.bell.ia@gmail.com |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to disable Ice's reestablish-connection behavior ? | rc_hz | Help Center | 4 | 08-31-2006 11:25 AM |
| Change IP address during runtime | wgwolf | Help Center | 1 | 05-31-2006 05:35 AM |
| Application Helper class and shutdown behavior | RyanFogarty | Comments | 2 | 11-30-2004 01:30 PM |
| IceStorm change in 1.1.0? | vukicevic | Help Center | 1 | 05-28-2003 07:27 PM |
| Why allow undefined behavior ? | Mogens Hansen | Comments | 2 | 02-19-2003 05:46 PM |