Skip to content

Segfault With Single Energy Bin #2

@tjlaboss

Description

@tjlaboss

MCNPTools experiences a Segmentation Fault when processing a meshtal file with only a single energy bin. A MWE will be posted.

MCNPTools attempts to compare to the "Total" bin, regardless of whether it exists. This occurs both in meshtal2vtk...

std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare (this=0x0, __s=0x47379d "Total")

...and the Python API:

import mcnptools
>>> mt = mcnptools.Meshtal("example.mesht")
>>> mt.GetTally(4)
Segmentation fault (core dumped)

Temporary workaround: Use emesh=0,1 instead of emesh=1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions