I do not believe it's a python mismatch as I am operating in the conda environment for all operations, build, test, and debug.
I managed to get LLDB attached after downgrading openssl (current conda version causes an invalid instruction). The issue is triggered when attempting to read an integer from the iostream at the end of the BRep file. The integer is the last component of the BRep file as a part of the ShapeSet.
Not only am I encountering an exception when attempting to read a file, I am also getting a bad access error when attempting to write to a new file.
Code: Select all
(lldb) c
Process 24310 resuming
2023-03-16 10:11:56.547660-0700 FreeCAD[24310:11488514] +[CATransaction synchronize] called within transaction
Process 24310 stopped
* thread #1, name = 'CrBrowserMain', queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x28)
frame #0: 0x000000019e34d09c libc++.1.dylib`std::__1::istreambuf_iterator<char, std::__1::char_traits<char> > std::__1::num_get<char, std::__1::istreambuf_iterator<char, std::__1::char_traits<char> > >::__do_get_signed<long>(std::__1::istreambuf_iterator<char, std::__1::char_traits<char> >, std::__1::istreambuf_iterator<char, std::__1::char_traits<char> >, std::__1::ios_base&, unsigned int&, long&) const + 68
libc++.1.dylib`std::__1::num_get<char, std::__1::istreambuf_iterator<char, std::__1::char_traits<char> > >::__do_get_signed<long>:
-> 0x19e34d09c <+68>: ldr w8, [x3, #0x8]
0x19e34d0a0 <+72>: mov w9, #0x4a
0x19e34d0a4 <+76>: ands w8, w8, w9
0x19e34d0a8 <+80>: str x5, [sp, #0x10]
Target 0: (FreeCAD) stopped.
When looking into what may be causing the issue, I again encounter an
iostream issue:
Code: Select all
(lldb) up
frame #2: 0x0000000297ad0330 Sketcher.so`Sketcher::PropertyConstraintList::Save(this=0x000000010dba18a0, writer=0x000000016fdf8fb8) const at PropertyConstraintList.cpp:306:67
303
304 void PropertyConstraintList::Save(Writer &writer) const
305 {
-> 306 writer.Stream() << writer.ind() << "<ConstraintList count=\"" << getSize() <<"\">" << endl;
307 writer.incInd();
308 for (int i = 0; i < getSize(); i++)
309 _lValueList[i]->Save(writer);
LLDB highlights the
<< getSize() as the source of the error.
I am quite confused now. I would suspect a possible locale issue, but OCCT is quite explicit throughout in setting the locale to
std::locale::classic() as seen here:
https://git.dev.opencascade.org/gitweb/ ... ac855#l597
I have been working with
@JohnOCFII on Discord to try and get the compile to work, but he's encountering the same issue. It's a real bummer I cannot get Homebrew to build the dependencies, but also that conda produces a build that's broken. I think I may have to return to Linux for development if there are no obvious solutions.