Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 03-26-2005
stephan stephan is offline
Registered User
 
Name: Stephan Stapel
Organization: Stephan Stapel
Project: BristolNG
 
Join Date: Oct 2003
Location: Essen, Germany
Posts: 169
Question on the IcePack implementation

Hi!

As I have some hassle around a Ice::Service implementation I did (probably a nice race condition), I took a look at the implementation of IcePackNode and IcePackRegistry which also implement the Ice::Service interface.

Maybe the question is a bit stupid, but can you tell me why you simply "return true;" in e.g. IcePack::NodeService::shutdown().

I tried to do the same in my app, mimmicking the behaviour of the two apps mentioned above but this didn't lead into progress for the shutdown. Instead, the application was stuck and pressing Ctrl+C (in application mode) again and again yielding in yet new calls of shutdown(). I.e., stop() was never called, where the communicator is shut down.

When calling Ice::Service::shutdown(), i.e.

bool MyService::shutdown()
{
// something
return Ice::Service::shutdown();
}

instead, everything went well. I know what Ice::Service::shutdown() does (I've read the sources ), but why does the code work in your case and doesn't work in mine. Did I miss some other code hidden in the IcePack services that allows your code to work?

Thanks,

Stephan
Reply With Quote
  #2 (permalink)  
Old 03-27-2005
benoit's Avatar
benoit benoit is online now
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,534
I must admit that I don't know why we return a boolean from this method I'll check with my colleagues this week.

As for your issue, the best is to get a dump of the stack traces when the hang occurs and post them here. I'm sure it will be much easier to figure out what's wrong once we see where it hangs.

We're not doing anything special in the IcePack node or registry service implementation to make it work . Note that you must just make sure to call the method main() of the service before creating any threads.

Benoit.
Reply With Quote
  #3 (permalink)  
Old 03-28-2005
stephan stephan is offline
Registered User
 
Name: Stephan Stapel
Organization: Stephan Stapel
Project: BristolNG
 
Join Date: Oct 2003
Location: Essen, Germany
Posts: 169
Thanks for your answer. Sorry that my question was target a bit to far down to the guts of IcePack It'd be cool anyway to find out why you did like you did.

What I'd like to ask, sorry for mis-using the thread, do you have an idea how I can dump a stack trace? The win32 version of strace probably won't help much as I'd have to do something like 'srvany strace myapp.exe' and thus the usual service behavior of my app wouldn't be available. It would run in app mode instead. I've been thinking about this for a couple of days now but don't have no clue how to solve it

On the other hand, when attaching the debugger to the process, everything I have is a disassembly of my app with the point of error being marked but e.g. no call stack...

How do you debug such things during Ice development (if this isn't beyond free support )?

Stephan
Reply With Quote
  #4 (permalink)  
Old 03-29-2005
benoit's Avatar
benoit benoit is online now
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,534
You should be able to attach the Visual C++ debugger with the process and stop its execution when it hangs. If you only see assembly instructions in the call stack it's probably because you didn't compile your binaries with debug information enabled.

Check out the Ice demo projects, you'll see that each project has settings for building in debug or release mode. You can use these projects as an example for your projects. Also, you must make sure to link with iced.lib when building your application in debug mode.

Hope this helps!

Benoit.
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
an old question about icepack emoly Help Center 6 04-01-2005 05:34 AM
IcePack question wodi Help Center 3 08-14-2004 06:03 AM
filesystem implementation/ followup to my previous question stephan Help Center 11 07-08-2004 07:12 PM
IcePack question stephan Help Center 1 05-06-2004 11:29 PM
IcePack Question xdm Help Center 5 02-04-2004 07:14 PM


All times are GMT -4. The time now is 07:29 AM.


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.