readium / swift-toolkit

A toolkit for ebooks, audiobooks and comics written in Swift
https://readium.org/mobile/
BSD 3-Clause "New" or "Revised" License
222 stars 96 forks source link

[Bug] iOS Reader Search crashed with 4-5 character #456

Open shivshankarglassboxx opened 1 week ago

shivshankarglassboxx commented 1 week ago

Describe the bug

Hi Team, In eBook reader iOS, if we type more than 4 or 5 character in the search the app is getting crashed. on below line any help will be appreciated. Reference Pod- ReadiumShared-> MediaType-> public init?(_ string: String, name: String? = nil, fileExtension: String? = nil) Line getting crashed- let components = string.split(separator: ";") .map { $0.trimmingCharacters(in: .whitespaces) } (edited)

How to reproduce?

In eBook reader iOS, if we type more than 4 or 5 character in the search the app is getting crashed. on below line any help will be appreciated. Reference Pod- ReadiumShared-> MediaType-> public init?(_ string: String, name: String? = nil, fileExtension: String? = nil) Line getting crashed- let components = string.split(separator: ";") .map { $0.trimmingCharacters(in: .whitespaces) } (edited)

Readium version

3.0.0-alpha.1

OS version

iOS 17.0

Testing device

iPhone 15 Pro

Environment

macOS: 13.6.6
platform: x86_64

Additional context

No response

mickael-menu commented 1 week ago

I cannot reproduce this crash in the Test App. Did you or only in your own app? Do you have a stacktrace of the crash, or an error message?