Skip to content

Assert fail const SbVec3f& SoCoordinateElement::get3(int) index == 1 and this->numCoords == 1 #445

@jharvell

Description

@jharvell

I have a simple file with only a slab and a few walls created using BIM Workbench. Will add link to file if that will help.

When I load the file, I see the following output on the terminal:
ArchSite.py(1139)|TopoShape.cpp(1110): failed to get bounding box: Bnd_Box is void
ArchSite.py(1139)|TopoShape.cpp(1110): failed to get bounding box: Bnd_Box is void
Coin warning in [indexedlineset]::GLRender(): Erroneous coordinate index: 1 (Should be within [0, 0]). Aborting rendering. This message will be shown once, but there might be more errors

Then when I set the view to Top and move the cursor to the bottom left corner of one of the walls, FreeCAD asserts as follows:
FreeCAD: /var/tmp/portage/media-libs/coin-4.0.0/work/coin/src/elements/SoCoordinateElement.cpp:179: const SbVec3f& SoCoordinateElement::get3(int) const: Assertion `index >= 0 && index < this->numCoords' failed.
Aborted (core dumped)

GDB shows the following:
#0 __pthread_kill_implementation (threadid=, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1 0x00007f97d8be55cf in __pthread_kill_internal (signo=6, threadid=) at pthread_kill.c:78
#2 0x00007f97d8b998a2 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3 0x00007f97d8b84469 in __GI_abort () at abort.c:79
#4 0x00007f97d8b84395 in __assert_fail_base (fmt=, assertion=, file=, line=, function=)
at assert.c:92
#5 0x00007f97d8b92b12 in __GI___assert_fail
(assertion=0x7f97dbd707e8 "index >= 0 && index < this->numCoords", file=0x7f97dbd70698 "/var/tmp/portage/media-libs/coin-4.0.0/work/coin/src/elements/SoCoordinateElement.cpp", line=179, function=0x7f97dbd707b0 "const SbVec3f& SoCoordinateElement::get3(int) const") at assert.c:101
#6 0x00007f97db916a53 in SoCoordinateElement::get3(int) const (this=0x55b38a037ca0, index=1)
at /var/tmp/portage/media-libs/coin-4.0.0/work/coin/src/elements/SoCoordinateElement.cpp:179
#7 0x00007f97dbb87320 in SoIndexedLineSet::generatePrimitives(SoAction*) (this=0x55b389765160, action=0x55b389194310)
at /var/tmp/portage/media-libs/coin-4.0.0/work/coin/src/shapenodes/SoIndexedLineSet.cpp:726
#8 0x00007f97dbbbaa40 in SoShape::rayPick(SoRayPickAction*) (this=0x55b389765160, action=0x55b389194310)
at /var/tmp/portage/media-libs/coin-4.0.0/work/coin/src/shapenodes/SoShape.cpp:459
#9 0x00007f9754037225 in PartGui::SoBrepEdgeSet::rayPick(SoRayPickAction*) (this=0x55b389765160, action=0x55b389194310)
at /mnt/etretat/home/jharvell/git/FreeCAD/src/Mod/Part/Gui/SoBrepEdgeSet.cpp:653
#10 0x00007f97df305d9f in Gui::SoFCRayPickAction::doPick(SoNode*) (this=0x55b389194310, node=0x55b389765160)
at /mnt/etretat/home/jharvell/git/FreeCAD/src/Gui/SoFCSelectionAction.cpp:1643
#11 0x00007f97df3055c4 in operator()(SoAction*, SoNode*) const (__closure=0x0, action=0x55b389194310, node=0x55b389765160)
at /mnt/etretat/home/jharvell/git/FreeCAD/src/Gui/SoFCSelectionAction.cpp:1559
#12 0x00007f97df305682 in _FUN(SoAction*, SoNode*) () at /mnt/etretat/home/jharvell/git/FreeCAD/src/Gui/SoFCSelectionAction.cpp:1564
#13 0x00007f97db7ed9a5 in SoAction::traverse(SoNode*) (this=0x55b389194310, node=0x55b389765160)
at /var/tmp/portage/media-libs/coin-4.0.0/work/coin/src/actions/SoAction.cpp:950
#14 0x00007f97dba175f5 in SoChildList::traverse(SoAction*, int, int) (this=0x55b38975bf70, action=0x55b389194310, first=0, last=7)
at /var/tmp/portage/media-libs/coin-4.0.0/work/coin/src/misc/SoChildList.cpp:357
#15 0x00007f97dba1781f in SoChildList::traverse(SoAction*) (this=0x55b38975bf70, action=0x55b389194310)
at /var/tmp/portage/media-libs/coin-4.0.0/work/coin/src/misc/SoChildList.cpp:427
#16 0x00007f97dbb250e6 in SoGroup::doAction(SoAction*) (this=0x55b3897698c0, action=0x55b389194310)
at /var/tmp/portage/media-libs/coin-4.0.0/work/coin/src/nodes/SoGroup.cpp:548
[...]
#99 0x00007f97d5e9006f in g_main_context_iteration (context=0x7f97cc005010, may_block=1) at ../glib-2.70.0/glib/gmain.c:4240
#100 0x00007f97da2130f8 in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) (this=0x55b386c6e180, flags=...) at /var/tmp/portage/dev-qt/qtcore-5.15.2-r10/work/qtbase-a4f9e56975fa6ab4a1f63a9b34a4d77b1cfe4acd/src/corelib/kernel/qeventdispatcher_glib.cpp:423
#101 0x00007f97da1c1093 in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) (this=0x7fff0ae87900, flags=...) at ../../include/QtCore/../../../qtbase-a4f9e56975fa6ab4a1f63a9b34a4d77b1cfe4acd/src/corelib/global/qflags.h:69
#102 0x00007f97da1cc490 in QCoreApplication::exec() () at ../../include/QtCore/../../../qtbase-a4f9e56975fa6ab4a1f63a9b34a4d77b1cfe4acd/src/corelib/global/qflags.h:121
#103 0x00007f97dec17500 in Gui::Application::runApplication() () at /mnt/etretat/home/jharvell/git/FreeCAD/src/Gui/Application.cpp:2564
#104 0x000055b385c2fa64 in main(int, char**) (argc=1, argv=0x7fff0ae884c8) at /mnt/etretat/home/jharvell/git/FreeCAD/src/Main/MainGui.cpp:293
(gdb) f 6
#6 0x00007f97db916a53 in SoCoordinateElement::get3 (this=0x55b38a037ca0, index=1)
at /var/tmp/portage/media-libs/coin-4.0.0/work/coin/src/elements/SoCoordinateElement.cpp:179
179 assert(index >= 0 && index < this->numCoords);
(gdb) p *this
$1 = { = { = {_vptr.SoElement = 0x7f97dbf7f9a8 <vtable for SoCoordinateElement+16>, static classStackIndex = -1, typeId = {
index = 158}, stackIndex = 34, static stackToType = 0x55b387261310, depth = 6, static classTypeId = {index = 112}, nextup = 0x55b38d423b40,
nextdown = 0x55b38d693290}, static classStackIndex = -1, static classTypeId = {index = 157}, nodeId = 81666}, static classStackIndex = 34,
static classTypeId = {index = 158}, numCoords = 1, coords3D = 0x55b38976a0b0, coords4D = 0x0, areCoords3D = 1, dummy3D = {vec = {0, 1.821688e-44, 0}}, dummy4D = {
vec = {0, 0, 0, 0}}, static initialdefaultcoords = 0x55b387284410}

FreeCAD version:
jharvell@wolfhound FreeCAD$ git --no-pager log -n1
commit 8cbb872 (HEAD -> LinkDaily, tag: 2022.06.07-edge, link/LinkDaily)
Author: Zheng, Lei realthunder.dev@gmail.com
Date: Tue Jun 7 22:35:49 2022 +0800

PartDesign: fix Loft/Pipe editing task spine selection

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions