Skip to content

iMergeSegmentsToPoly XM_ASSERT(0) is debug-only with no release-build signal #195

Description

@gagelarsen

Problem

xmsgrid/ugrid/XmUGrid.cpp:704-707 — the failure branch of iMergeSegmentsToPoly calls XM_ASSERT(0) and clears a_polygon. XM_ASSERT is compiled out in non-debug builds (per xmscore/misc/XmError.h:60-70), leaving a_polygon.clear() as the sole failure signal. Combined with the silent-success bug tracked separately, release builds have no observable signal that polygon construction failed.

Suggested fix

Add an XM_LOG(xmlog::warning, ...) next to the assert so release builds at least surface the failure in logs, even before the public-API propagation issue is addressed.

Context

Surfaced during review of #193 (follow-up to #186). Reviewer flagged as out-of-scope for #193 and recommended filing separately. Related to the public-API silent-failure issue filed alongside this one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions