slice2java "terminate called"

ngambek2003ngambek2003 Member Budyanto HimawanOrganization: WMS Inc.Project: Casino back end services ✭✭
I'm seeing a weird issue with slice2java and slice2cpp.

Right now I have a project that has the following problem.

I'm running slice2java and outputing the generated files to /project/generated/java.

I have several .ice files in /project/slice.

The first time I run slice2java, it will generate source files for some .ice files and then fail with the following error
terminate called after throwing an instance of 'IceUtil::NullHandleException'
  what():  ../../include/IceUtil/Handle.h:46: IceUtil::NullHandleException

The next time I run it it's fine. So everytime I clean the generated directory I see the problem.

Ice version: 3.3.1
OS: CentOS 5.3

My ice installation is done using the RPMS (including the mcpp RPM) provided at the zeroc website.

Thanks
Budyanto

Comments

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi Budyanto,

    Is the output directory on a local filesystem or a network file system? If it's a network file system, does the problem also occur when you generate to a local filesystem?

    It might also help us if you could provide the Slice file (or files) that reproduce this problem. You can send them to me by email if you prefer not to attach them here.

    Regards,
    Mark
  • ngambek2003ngambek2003 Member Budyanto HimawanOrganization: WMS Inc.Project: Casino back end services ✭✭
    The output dir is local.
    Sure I can send you the ice files. Which email address should I send it to?

    An even stranger thing is this.

    My current project is at say /path/project, I tried moving my project to another directory, say /path/project_new/project. I don't see the problem in the new directory. Does slice2java maintain any info somewhere?

    Both locations are local directories.

    Thanks
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Does slice2java maintain any info somewhere?
    Are you using the slice2java ant task to compile your Slice files? The ant task does create a .depend file in the output directory.

    Thanks for sending me the Slice files. I'll reply when I have more information.

    Regards,
    Mark
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    I'm pretty sure this is caused by a bug in the version of MCPP (the preprocessor used by the Slice compilers) included in Ice 3.3.1. There are two ways to fix this:
    • Upgrade to 3.4b
    • If you need to continue using 3.3.1, you can install a newer version of the mcpp-devel RPM (such as the one from 3.4b) and rebuild the 3.3.1 Slice library and translators
    Let us know if you're still having trouble.

    Regards,
    Mark
  • ngambek2003ngambek2003 Member Budyanto HimawanOrganization: WMS Inc.Project: Casino back end services ✭✭
    Yes that fixes it.

    Thanks
Sign In or Register to comment.