Opened 5 months ago

Last modified 4 months ago

#70296 assigned defect

sigil crashes on arm64 trying to open an ePub if built with libunwind active

Reported by: barracuda156 Owned by: i0ntempest
Priority: Normal Milestone:
Component: ports Version: 2.9.3
Keywords: sonoma, arm64 Cc:
Port: sigil

Description

Process:               Sigil [55924]
Path:                  /Applications/MacPorts/Sigil.app/Contents/MacOS/Sigil
Identifier:            com.sigil-ebook.Sigil.app
Version:               2.2.1 (2.2.1)
Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2024-06-26 18:20:02.6311 +0800
OS Version:            macOS 14.5 (23F79)
Report Version:        12

Time Awake Since Boot: 490000 seconds
Time Since Wake:       5408 seconds

System Integrity Protection: enabled

Crashed Thread:        30  Thread (pooled)

Exception Type:        EXC_BREAKPOINT (SIGTRAP)
Exception Codes:       0x0000000000000001, 0x00000001aadac960

Termination Reason:    Namespace SIGNAL, Code 5 Trace/BPT trap: 5
Terminating Process:   exc handler [55924]

Thread 30 Crashed:: Thread (pooled)
0   libunwind.dylib               	       0x1aadac960 _Unwind_GetIP + 244
1   libc++abi.dylib               	       0x19e11caa4 __gxx_personality_v0 + 588
2   libunwind.1.dylib             	       0x103c15144 unwind_phase2 + 140
3   libunwind.1.dylib             	       0x103c151d0 _Unwind_Resume + 52
4   Sigil                         	       0x102e3865c FolderKeeper::AddContentFileToFolder(QString const&, bool, QString const&, QString const&, QString const&) + 5128
5   Sigil                         	       0x102faa470 ImportEPUB::LoadOneFile(QString const&, QString const&) + 364
6   Sigil                         	       0x102fab4e4 decltype(std::declval<QtConcurrent::StoredFunctionCall<std::__1::tuple<QString, QString> (ImportEPUB::*)(QString const&, QString const&), ImportEPUB*, QString, QString>::runFunctor()::'lambda'(std::__1::tuple<QString, QString> (ImportEPUB::*)(QString const&, QString const&), ImportEPUB*, QString, QString) const&>()(std::declval<std::__1::tuple<QString, QString> (ImportEPUB::*)(QString const&, QString const&)>(), std::declval<ImportEPUB*>(), std::declval<QString>(), std::declval<QString>())) std::__1::__invoke[abi:ue170006]<QtConcurrent::StoredFunctionCall<std::__1::tuple<QString, QString> (ImportEPUB::*)(QString const&, QString const&), ImportEPUB*, QString, QString>::runFunctor()::'lambda'(std::__1::tuple<QString, QString> (ImportEPUB::*)(QString const&, QString const&), ImportEPUB*, QString, QString) const&, std::__1::tuple<QString, QString> (ImportEPUB::*)(QString const&, QString const&), ImportEPUB*, QString, QString>(QtConcurrent::StoredFunctionCall<std::__1::tuple<QString, QString> (ImportEPUB::*)(QString const&, QString const&), ImportEPUB*, QString, QString>::runFunctor()::'lambda'(std::__1::tuple<QString, QString> (ImportEPUB::*)(QString const&, QString const&), ImportEPUB*, QString, QString) const&, std::__1::tuple<QString, QString> (ImportEPUB::*&&)(QString const&, QString const&), ImportEPUB*&&, QString&&, QString&&) + 100
7   Sigil                         	       0x102faafe0 QtConcurrent::StoredFunctionCall<std::__1::tuple<QString, QString> (ImportEPUB::*)(QString const&, QString const&), ImportEPUB*, QString, QString>::runFunctor() + 48
8   Sigil                         	       0x102faadd4 QtConcurrent::RunFunctionTaskBase<std::__1::tuple<QString, QString>>::run() + 80
9   QtCore                        	       0x107257d38 QThreadPoolThread::run() + 96
10  QtCore                        	       0x107254fec QThreadPrivate::start(void*) + 252
11  libsystem_pthread.dylib       	       0x19e162f94 _pthread_start + 136
12  libsystem_pthread.dylib       	       0x19e15dd34 thread_start + 8

Thread 31:: Thread (pooled)
0   dyld                          	       0x19de267d8 invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 44
1   dyld                          	       0x19ddd62fc dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const + 300
2   dyld                          	       0x19de25930 dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 192
3   dyld                          	       0x19de2ba20 dyld3::MachOLoaded::findSectionContent(char const*, char const*, unsigned long long&, bool) const + 136
4   dyld                          	       0x19de0f7a0 dyld4::APIs::_dyld_find_unwind_sections(void*, dyld_unwind_sections*) + 296
5   libunwind.1.dylib             	       0x103c164f4 libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_arm64>::setInfoBasedOnIPRegister(bool) + 60
6   libunwind.1.dylib             	       0x103c163a0 libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_arm64>::step() + 64
7   libunwind.1.dylib             	       0x103c150e8 unwind_phase2 + 48
8   libunwind.1.dylib             	       0x103c151d0 _Unwind_Resume + 52
9   Sigil                         	       0x102e3865c FolderKeeper::AddContentFileToFolder(QString const&, bool, QString const&, QString const&, QString const&) + 5128
10  Sigil                         	       0x102faa470 ImportEPUB::LoadOneFile(QString const&, QString const&) + 364
11  Sigil                         	       0x102fab4e4 decltype(std::declval<QtConcurrent::StoredFunctionCall<std::__1::tuple<QString, QString> (ImportEPUB::*)(QString const&, QString const&), ImportEPUB*, QString, QString>::runFunctor()::'lambda'(std::__1::tuple<QString, QString> (ImportEPUB::*)(QString const&, QString const&), ImportEPUB*, QString, QString) const&>()(std::declval<std::__1::tuple<QString, QString> (ImportEPUB::*)(QString const&, QString const&)>(), std::declval<ImportEPUB*>(), std::declval<QString>(), std::declval<QString>())) std::__1::__invoke[abi:ue170006]<QtConcurrent::StoredFunctionCall<std::__1::tuple<QString, QString> (ImportEPUB::*)(QString const&, QString const&), ImportEPUB*, QString, QString>::runFunctor()::'lambda'(std::__1::tuple<QString, QString> (ImportEPUB::*)(QString const&, QString const&), ImportEPUB*, QString, QString) const&, std::__1::tuple<QString, QString> (ImportEPUB::*)(QString const&, QString const&), ImportEPUB*, QString, QString>(QtConcurrent::StoredFunctionCall<std::__1::tuple<QString, QString> (ImportEPUB::*)(QString const&, QString const&), ImportEPUB*, QString, QString>::runFunctor()::'lambda'(std::__1::tuple<QString, QString> (ImportEPUB::*)(QString const&, QString const&), ImportEPUB*, QString, QString) const&, std::__1::tuple<QString, QString> (ImportEPUB::*&&)(QString const&, QString const&), ImportEPUB*&&, QString&&, QString&&) + 100
12  Sigil                         	       0x102faafe0 QtConcurrent::StoredFunctionCall<std::__1::tuple<QString, QString> (ImportEPUB::*)(QString const&, QString const&), ImportEPUB*, QString, QString>::runFunctor() + 48
13  Sigil                         	       0x102faadd4 QtConcurrent::RunFunctionTaskBase<std::__1::tuple<QString, QString>>::run() + 80
14  QtCore                        	       0x107257d38 QThreadPoolThread::run() + 96
15  QtCore                        	       0x107254fec QThreadPrivate::start(void*) + 252
16  libsystem_pthread.dylib       	       0x19e162f94 _pthread_start + 136
17  libsystem_pthread.dylib       	       0x19e15dd34 thread_start + 8

From the error it seems that it may be another case of libunwind poisoning other ports. If so, build conflict must be declared.

Change History (4)

comment:1 Changed 5 months ago by barracuda156

Summary: sigil crashes on arm64 trying to open an ePubsigil crashes on arm64 trying to open an ePub if built with libunwind active

I can confirm that rebuilding with libunwind deactivated fixes it.

comment:2 Changed 4 months ago by i0ntempest

libunwind has been causing problems like this since macOS 14 first released. There's no way around it, best I can do is adding a build conflict line.

comment:3 in reply to:  2 Changed 4 months ago by barracuda156

Replying to i0ntempest:

libunwind has been causing problems like this since macOS 14 first released. There's no way around it, best I can do is adding a build conflict line.

Yes, I am aware of the issue, and I agree, build conflict is fine. (Extra line of code won’t hurt and may save someone from unnecessary hassles with a broken app.)

comment:4 Changed 4 months ago by ryandesign (Ryan Carsten Schmidt)

Let's not add a conflicts_build libunwind line to every port. Let's fix libunwind instead. See #66250.

Last edited 4 months ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)
Note: See TracTickets for help on using tickets.