Skip to content

Assembly: Solve failed: vector #18626

@oursland

Description

@oursland

Is there an existing issue for this?

  • I have searched the existing issues

Problem description

On my assembly with 147 joints, I get the error:

00:50:56  84.8003 <Assembly> AssemblyObject.cpp(167): Solve failed: vector

Followed by:

00:51:18  107.832 <App> Document.cpp(3211): project_v0_1#Joint still touched after recompute
00:51:18  107.832 <App> Document.cpp(3211): project_v0_1#Joint001 still touched after recompute
00:51:18  107.832 <App> Document.cpp(3211): project_v0_1#Joint002 still touched after recompute
00:51:18  107.832 <App> Document.cpp(3211): project_v0_1#Joint003 still touched after recompute
...

I have added cpptrace to my build and generated a backtrace from the exception and found what appears to be an indexing issue in frame #6 at MbD::GESpMatFullPv::backSubstituteIntoDU() found in src/3rdParty/OndselSolver/OndselSolver/GESpMat.cpp resulting in std::vector::at() throwing an exception:

Cpptrace internal error: Unable to read object file /usr/lib/libc++abi.dylib
Cpptrace internal error: Unable to read object file /usr/lib/system/libunwind.dylib
Cpptrace internal error: Unable to read object file /usr/lib/libc++abi.dylib
Cpptrace internal error: Unable to read object file /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
Cpptrace internal error: Unable to read object file /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
Cpptrace internal error: Unable to read object file /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
Cpptrace internal error: Unable to read object file /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
Cpptrace internal error: Unable to read object file /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
Cpptrace internal error: Unable to read object file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
Cpptrace internal error: Unable to read object file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
Cpptrace internal error: Unable to read object file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
Cpptrace internal error: Unable to read object file /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
Cpptrace internal error: Unable to read object file /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
Cpptrace internal error: Unable to read object file /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
84.8004 <Assembly> AssemblyObject.cpp(168): Stack trace (most recent call first):
#0  0x000000019769975f at /usr/lib/libc++abi.dylib
#1  0x00000001a5272d77 at /usr/lib/system/libunwind.dylib
#2  0x0000000197698c7b at /usr/lib/libc++abi.dylib
#3  0x00000003537ab3cb in std::__1::__throw_out_of_range[abi:ue170006](char const*) at /Users/jso/code/FreeCAD/FreeCAD/.pixi/envs/default/bin/../include/c++/v1/stdexcept:264:5
#4  0x00000003537f856f in std::__1::vector<unsigned long, std::__1::allocator<unsigned long>>::__throw_out_of_range[abi:ue170006]() const at /Users/jso/code/FreeCAD/FreeCAD/.pixi/envs/default/bin/../include/c++/v1/vector:968:7
#5  (inlined)          in std::__1::vector<unsigned long, std::__1::allocator<unsigned long>>::at(unsigned long) at /Users/jso/code/FreeCAD/FreeCAD/.pixi/envs/default/bin/../include/c++/v1/vector:1557:15
#6  0x000000035389853f in MbD::GESpMatFullPv::backSubstituteIntoDU() at /Users/jso/code/FreeCAD/FreeCAD/src/3rdParty/OndselSolver/OndselSolver/GESpMatFullPv.cpp:0:0
#7  0x0000000353897497 in MbD::GESpMat::basicSolvewithsaveOriginal(std::__1::shared_ptr<MbD::SparseMatrix<double>>, std::__1::shared_ptr<MbD::FullColumn<double>>, bool) at /Users/jso/code/FreeCAD/FreeCAD/src/3rdParty/OndselSolver/OndselSolver/GESpMat.cpp:29:8
#8  0x00000003538af443 in MbD::MatrixSolver::timedSolvewithsaveOriginal(std::__1::shared_ptr<MbD::SparseMatrix<double>>, std::__1::shared_ptr<MbD::FullColumn<double>>, bool) at /Users/jso/code/FreeCAD/FreeCAD/src/3rdParty/OndselSolver/OndselSolver/MatrixSolver.cpp:47:8
#9  0x000000035389727b in MbD::GESpMat::solvewithsaveOriginal(std::__1::shared_ptr<MbD::SparseMatrix<double>>, std::__1::shared_ptr<MbD::FullColumn<double>>, bool) at /Users/jso/code/FreeCAD/FreeCAD/src/3rdParty/OndselSolver/OndselSolver/GESpMat.cpp:17:8
#10 0x00000003538d919f in MbD::PosICNewtonRaphson::lookForRedundantConstraints() at /Users/jso/code/FreeCAD/FreeCAD/src/3rdParty/OndselSolver/OndselSolver/PosICNewtonRaphson.cpp:136:20
#11 0x00000003538d8edb in MbD::PosICNewtonRaphson::handleSingularMatrix() at /Users/jso/code/FreeCAD/FreeCAD/src/3rdParty/OndselSolver/OndselSolver/PosICNewtonRaphson.cpp:121:11
#12 0x00000003539102c7 in MbD::VectorNewtonRaphson::solveEquations() at /Users/jso/code/FreeCAD/FreeCAD/src/3rdParty/OndselSolver/OndselSolver/VectorNewtonRaphson.cpp:57:9
#13 0x00000003538d8df7 in MbD::PosICNewtonRaphson::handleSingularMatrix() at /Users/jso/code/FreeCAD/FreeCAD/src/3rdParty/OndselSolver/OndselSolver/PosICNewtonRaphson.cpp:114:13
#14 0x00000003539102c7 in MbD::VectorNewtonRaphson::solveEquations() at /Users/jso/code/FreeCAD/FreeCAD/src/3rdParty/OndselSolver/OndselSolver/VectorNewtonRaphson.cpp:57:9
#15 0x00000003538b760b in MbD::NewtonRaphson::iterate() at /Users/jso/code/FreeCAD/FreeCAD/src/3rdParty/OndselSolver/OndselSolver/NewtonRaphson.cpp:75:9
#16 0x00000003538d844b in MbD::PosICNewtonRaphson::run() at /Users/jso/code/FreeCAD/FreeCAD/src/3rdParty/OndselSolver/OndselSolver/PosICNewtonRaphson.cpp:31:4
#17 0x0000000353904db3 in MbD::SystemSolver::runAllIC() at /Users/jso/code/FreeCAD/FreeCAD/src/3rdParty/OndselSolver/OndselSolver/SystemSolver.cpp:69:4
#18 0x00000003538ff443 in MbD::System::runKINEMATIC(std::__1::shared_ptr<MbD::System>) at /Users/jso/code/FreeCAD/FreeCAD/src/3rdParty/OndselSolver/OndselSolver/System.cpp:86:16
#19 0x00000003537c305f in MbD::ASMTAssembly::runKINEMATIC() at /Users/jso/code/FreeCAD/FreeCAD/src/3rdParty/OndselSolver/OndselSolver/ASMTAssembly.cpp:1447:20
#20 0x0000000350c04c17 in Assembly::AssemblyObject::solve(bool, bool) at /Users/jso/code/FreeCAD/FreeCAD/src/Mod/Assembly/App/AssemblyObject.cpp:164:22
#21 0x0000000350c04987 in Assembly::AssemblyObject::execute() at /Users/jso/code/FreeCAD/FreeCAD/src/Mod/Assembly/App/AssemblyObject.cpp:133:9
#22 0x0000000103b324bb in App::DocumentObject::recompute() at /Users/jso/code/FreeCAD/FreeCAD/src/App/DocumentObject.cpp:167:22
#23 0x0000000103ab3d87 in App::Document::_recomputeFeature(App::DocumentObject*) at /Users/jso/code/FreeCAD/FreeCAD/src/App/Document.cpp:3469:32
#24 0x0000000103ab241f in App::Document::recompute(std::__1::vector<App::DocumentObject*, std::__1::allocator<App::DocumentObject*>> const&, bool, bool*, int) at /Users/jso/code/FreeCAD/FreeCAD/src/App/Document.cpp:3177:31
#25 0x0000000103ba15bf in App::DocumentPy::recompute(_object*) at /Users/jso/code/FreeCAD/FreeCAD/src/App/DocumentPyImp.cpp:690:31
#26 0x0000000103b9a3a7 in App::DocumentPy::staticCallback_recompute(_object*, _object*) at /Users/jso/code/FreeCAD/FreeCAD/build/src/App/DocumentPy.cpp:2025:57
#27 0x00000001049f1307 at /Users/jso/code/FreeCAD/FreeCAD/.pixi/envs/default/lib/libpython3.12.dylib
#28 0x00000001049951cb at /Users/jso/code/FreeCAD/FreeCAD/.pixi/envs/default/lib/libpython3.12.dylib
#29 0x0000000104aafe07 at /Users/jso/code/FreeCAD/FreeCAD/.pixi/envs/default/lib/libpython3.12.dylib
#30 0x0000000104aa1bdb at /Users/jso/code/FreeCAD/FreeCAD/.pixi/envs/default/lib/libpython3.12.dylib
#31 0x0000000104b1919b at /Users/jso/code/FreeCAD/FreeCAD/.pixi/envs/default/lib/libpython3.12.dylib
#32 0x0000000104b1cdd7 at /Users/jso/code/FreeCAD/FreeCAD/.pixi/envs/default/lib/libpython3.12.dylib
#33 0x00000001032df59b in Base::InterpreterSingleton::runString(char const*) at /Users/jso/code/FreeCAD/FreeCAD/src/Base/Interpreter.cpp:249:15
#34 0x0000000105aeb167 in Gui::Command::_runCommand(char const*, int, Gui::Command::DoCmd_Type, char const*) at /Users/jso/code/FreeCAD/FreeCAD/src/Gui/Command.cpp:725:29
#35 0x0000000105aeafa7 in Gui::Command::_doCommand(char const*, int, Gui::Command::DoCmd_Type, char const*, ...) at /Users/jso/code/FreeCAD/FreeCAD/src/Gui/Command.cpp:677:5
#36 0x0000000105b01feb in StdCmdRefresh::activated(int) at /Users/jso/code/FreeCAD/FreeCAD/src/Gui/CommandDoc.cpp:1537:13
#37 0x0000000105ae9ffb in Gui::Command::_invoke(int, bool) at /Users/jso/code/FreeCAD/FreeCAD/src/Gui/Command.cpp:433:17
#38 0x0000000105ae9cf3 in Gui::Command::invoke(int, Gui::Command::TriggerSource) at /Users/jso/code/FreeCAD/FreeCAD/src/Gui/Command.cpp:408:5
#39 0x0000000105177c57 at /Users/jso/code/FreeCAD/FreeCAD/.pixi/envs/default/lib/libQt6Core.6.7.3.dylib
#40 0x00000001088f308b at /Users/jso/code/FreeCAD/FreeCAD/.pixi/envs/default/lib/libQt6Gui.6.7.3.dylib
#41 0x000000010516f93b at /Users/jso/code/FreeCAD/FreeCAD/.pixi/envs/default/lib/libQt6Core.6.7.3.dylib
#42 0x00000001084d309f at /Users/jso/code/FreeCAD/FreeCAD/.pixi/envs/default/lib/libQt6Widgets.6.7.3.dylib
#43 0x00000001084d4003 at /Users/jso/code/FreeCAD/FreeCAD/.pixi/envs/default/lib/libQt6Widgets.6.7.3.dylib
#44 0x0000000105aa42e3 in Gui::GUIApplication::notify(QObject*, QEvent*) at /Users/jso/code/FreeCAD/FreeCAD/src/Gui/GuiApplication.cpp:93:34
#45 0x0000000105222d4f at /Users/jso/code/FreeCAD/FreeCAD/.pixi/envs/default/lib/libQt6Core.6.7.3.dylib
#46 0x00000001052244bf at /Users/jso/code/FreeCAD/FreeCAD/.pixi/envs/default/lib/libQt6Core.6.7.3.dylib
#47 0x0000000116284a1b at /Users/jso/code/FreeCAD/FreeCAD/.pixi/envs/default/lib/qt6/plugins/platforms/libqcocoa.dylib
#48 0x0000000116285b1f at /Users/jso/code/FreeCAD/FreeCAD/.pixi/envs/default/lib/qt6/plugins/platforms/libqcocoa.dylib
#49 0x00000001977c8893 at /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
#50 0x00000001977c8827 at /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
#51 0x00000001977c858b at /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
#52 0x00000001977c7127 at /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
#53 0x00000001977c6723 at /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
#54 0x00000001a2d1e52f at /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
#55 0x00000001a2d24347 at /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
#56 0x00000001a2d24507 at /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
#57 0x000000019b331033 at /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
#58 0x000000019bc952d3 at /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
#59 0x000000019b32405f at /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
#60 0x000000011628370b at /Users/jso/code/FreeCAD/FreeCAD/.pixi/envs/default/lib/qt6/plugins/platforms/libqcocoa.dylib
#61 0x0000000105223b47 at /Users/jso/code/FreeCAD/FreeCAD/.pixi/envs/default/lib/libQt6Core.6.7.3.dylib
#62 0x000000010522378b at /Users/jso/code/FreeCAD/FreeCAD/.pixi/envs/default/lib/libQt6Core.6.7.3.dylib
#63 (inlined)          in (anonymous namespace)::tryRunEventLoop(Gui::GUISingleApplication&) at /Users/jso/code/FreeCAD/FreeCAD/src/Gui/Application.cpp:2205:13
#64 (inlined)          in (anonymous namespace)::runEventLoop(Gui::GUISingleApplication&) at /Users/jso/code/FreeCAD/FreeCAD/src/Gui/Application.cpp:2234:9
#65 0x00000001059e1313 in Gui::Application::runApplication() at /Users/jso/code/FreeCAD/FreeCAD/src/Gui/Application.cpp:2310:5
#66 0x0000000102dcf8e3 in main at /Users/jso/code/FreeCAD/FreeCAD/src/Main/MainGui.cpp:295:13
#67 0x0000000197360273 at /usr/lib/dyld

Full version info

OS: macOS Sequoia (15.2)
Architecture: arm64
Version: 1.1.0dev.39681 (Git) Conda
Build type: Release
Branch: main
Hash: 0609fa2335b0a4a3277875a986618c226a3edbe1
Python 3.12.0, Qt 6.7.3, Coin 4.0.3, Vtk 9.3.1, OCC 7.8.1
Locale: English/United States (en_US)
Stylesheet/Theme/QtStyle: OpenDark.qss/FreeCAD Dark/
Installed mods: 
  * OpticsWorkbench 1.0.26
  * OpenTheme 2024.9.1
  * CfdOF 1.29.4
  * A2plus 0.4.68
  * kicadStepUpMod 11.4.4
  * fasteners 0.5.33
  * AirPlaneDesign 0.4.1
  * A2plus.backup1731435765.889473 0.4.65 (Disabled)
  * CurvedShapes 1.0.13
  * freecad.cross 0.4.0
  * Curves 0.6.52
  * Assembly4 0.50.15

Subproject(s) affected?

Assembly

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

Mod: AssemblyRelated to the Integrated Assembly WorkbenchStatus: ConfirmedThe issue was confirmed by othersStatus: Needs feedbackMissing required feedback from user or developersStatus: Solution proposedThe issue has a solution proposedType: BugThis issue or PR is related to a bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    SYSTEM_READY >> ...MS