Archived

This forum has been archived. Please start a new discussion on GitHub.

slice2java "terminate called"

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

  • mes
    mes California
    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
  • 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
  • mes
    mes California
    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
  • mes
    mes California
    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
  • Yes that fixes it.

    Thanks