Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 02-24-2003
mike mike is offline
Registered User
 
 
Join Date: Feb 2003
Posts: 3
NullHandleException

Hi,

I've downloaded and installed Ice on Linux (LFS 4) without any obvious problems. I've tried building the Printer example from the docs. Compiles and links OK. When I try to run the server or client I get an exception:
../../include/IceUtil/Handle.h:44 IceUtil::NullHandleException
thrown in ic = Ice::initialize(argc,argv)

Running make test fails in test/Ice/exceptions, testing checked cast.

Any suggestions as to what might be wrong?
I've probably missed something obvious so prepared to be embarrassed!

Mike
Reply With Quote
  #2 (permalink)  
Old 02-24-2003
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: 962
Hi Mike,

We like to know what compiler version you're using, as well as the versions of any supporting libraries (STL, OpenSSL, etc.).

Can you try to find out where in Ice the exception is occurring, either in a debugger or with judicious use of print statements?

Thanks,
- Mark
Reply With Quote
  #3 (permalink)  
Old 02-24-2003
mike mike is offline
Registered User
 
 
Join Date: Feb 2003
Posts: 3
Mark,

I'm using gcc 3.2, xerces-c++ 2.1.0, OpenSSL 0.9.6, e2fsprogs 1.27, bzip2 1.0.2, Berkeley DB 4.1.25. Are there any others I need to check?

Putting in some print statements, I end up in DefaultsAndOverrides.cpp

getProperty("Ice.Default.Host") succeeds
defaultHost.empty() is true, if-block entered.

const_cast<string&>(defaultHost) =getLocalHost(true); fails

Does this help?

Mike
Reply With Quote
  #4 (permalink)  
Old 02-24-2003
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: 962
Quote:
Originally posted by mike
Mark,

I'm using gcc 3.2, xerces-c++ 2.1.0, OpenSSL 0.9.6, e2fsprogs 1.27, bzip2 1.0.2, Berkeley DB 4.1.25. Are there any others I need to check?
No, thanks.

Quote:

Putting in some print statements, I end up in DefaultsAndOverrides.cpp

getProperty("Ice.Default.Host") succeeds
defaultHost.empty() is true, if-block entered.

const_cast<string&>(defaultHost) =getLocalHost(true); fails

Does this help?

Mike
I might be missing something, but I don't see how getLocalHost can cause a NullHandleException. Can you narrow it down a bit further? The getLocalHost function is defined in src/Ice/Network.cpp.

- Mark
Reply With Quote
  #5 (permalink)  
Old 02-24-2003
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: 962
Sorry Mike, there's an easier way to diagnose a NullHandleException: set the property Ice.NullHandleAbort=1 and the program will abort when the exception is created, leaving a core file from which you can obtain a stack trace.

- Mark
Reply With Quote
  #6 (permalink)  
Old 02-25-2003
mike mike is offline
Registered User
 
 
Join Date: Feb 2003
Posts: 3
I didn't see your suggestion in time but I've got some more information anyway:

In Network.cpp, IceInternal::getLocalHost(bool numeric)
gethostbyname() returns 0

(the machine doesn't have a DNS entry so I guess this could be the source of the problem)

This results in the exception:
Network.cpp:646: Ice:NSException:
DNS error: temporary error, try again

Following the exception back up we go through:

DefaultsAndOverrides.cpp - no try...catch

Instance.cpp, IceInternal::Instance::Instance(...)
Network.cpp:646: Ice:NSException:
DNS error: temporary error, try again

CommunicatorI.cpp, Ice::CommunicatorI::CommunicatorI(...)
../../include/IceUtil/Handle.h:44: IceUtil::NullHandleException

Initialize.cpp, Ice::initialize(...) - no try...catch

Server.cpp
../../include/IceUtil/Handle.h:44: IceUtil::NullHandleException

Does this explain what's going on?

Mike
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Operator Error - NullHandleException eric.hill Help Center 3 07-19-2006 06:10 PM


All times are GMT -4. The time now is 03:49 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.