Skip to content

Crash when opening a book  #489

Closed
@grighakobian

Description

@grighakobian

Describe the bug

We recently released a new version that included bug fixes for iOS 18. However, after the update, we noticed a significant drop in crash-free users—over 10%. In an attempt to resolve the issue, we downgraded the Readium version to 2.6.0, which previously did not cause any crashes. Unfortunately, this did not resolve the problem. Finally, we tried building the project with Xcode 15.4 instead of Xcode 16.0, and the crash issue was eliminated.

How to reproduce?

  1. Open a book

Readium version

2.6.0 ... 2.7.3

OS version

Mainly iOS 17 and 18

Testing device

Any Device

Environment

macOS: 15.0
platform: x86_64
carthage: 0.40.0
Xcode 16.0
Build version 16A242d

Additional context

Crashed: com.apple.root.default-qos
0 libsystem_platform.dylib 0x2a54 platform_memmove + 52
1 libxml2.2.dylib 0x18638 + 216
2 libxml2.2.dylib 0x6a58 xmlParserInputBufferCreateMem + 92
3 libxml2.2.dylib 0x67d4 xmlCreateMemoryParserCtxt + 72
4 libxml2.2.dylib 0x6610 xmlReadMemory + 60
5 0x101c55c XMLDocument.__allocating_init(string:encoding:) + 130 (Document.swift:130)
6 0x1171cb4 FuziXMLDocument.init(string:namespaces:) + 14 (Fuzi.swift:14)
7 0x1161dc8 MediaTypeSnifferContext.contentAsXML.getter + 74 (MediaTypeSnifferContext.swift:74)
8 0x115d170 specialized static MediaType.sniffHTML(context:) + 115 (MediaTypeSniffer.swift:115)
9 0x115b028 implicit closure #1 in variable initialization expression of static MediaType.sniffers + 32
10 0x115c704 specialized static MediaType.of(content:mediaTypes:fileExtensions:sniffers:) + 804 (Archive.swift:804)
11 0x115ca88 specialized static MediaType.of(
:mediaTypes:fileExtensions:sniffers:) + 280 (MediaTypeSnifferContent.swift:280)
12 0x115a6e8 static MediaType.of(:mediaTypes:fileExtensions:sniffers:) + 28 (:28)
13 0x11c1a84 PublicationServer.resourceHandler(
:) + 341 (PublicationServer.swift:341)
14 0xd81ddc thunk for @escaping @callee_guaranteed (@guaranteed GCDWebServerRequest) -> (@owned GCDWebServerResponse?) + 48 (:48)
15 0x122b680 __82-[GCDWebServer(Handlers) addHandlerForMethod:pathRegex:requestClass:processBlock:]_block_invoke + 923 (GCDWebServer.m:923)
16 0x122f704 -[GCDWebServerConnection(Subclassing) processRequest:completion:] + 762 (GCDWebServerConnection.m:762)
17 0x122cb94 -[GCDWebServerConnection _startProcessingRequest] + 152 (GCDWebServerConnection.m:152)
18 0x122d960 __45-[GCDWebServerConnection _readRequestHeaders]_block_invoke + 346 (GCDWebServerConnection.m:346)
19 0x122e2c8 __64-[GCDWebServerConnection(Read) readHeaders:withCompletionBlock:]_block_invoke + 461 (GCDWebServerConnection.m:461)
20 0x122e044 __68-[GCDWebServerConnection(Read) readData:withLength:completionBlock:]_block_invoke + 432 (GCDWebServerConnection.m:432)
21 libdispatch.dylib 0x31234 + 60
22 libdispatch.dylib 0x213c + 32
23 libdispatch.dylib 0x3dd4 + 20
24 libdispatch.dylib 0x15a6c + 864
25 libdispatch.dylib 0x1609c + 156
26 libsystem_pthread.dylib 0x48f8 _pthread_wqthread + 228
27 libsystem_pthread.dylib 0x10cc start_wqthread + 8

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