You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are encountering an issue with the latest release of the following packages:
syncfusion_flutter_pdf (version: 28.1.33)
syncfusion_flutter_pdfviewer (version: 28.1.33)
The problem occurs when generating PDFs on demand. Specifically, it arises when we modify the text content of the PDF document. Each time the text is updated, the application crashes.
We are uncertain of the exact cause, but it seems to be realted to _extractText function. When debugging with breakpoints set in this function, the issue disappears, and the crash no longer occurs.
The issue also shows an error on SwiftSyncfusionFlutterPdfViewerPlugin.getTileImageForPlugin
Steps to reproduce
Generate a PDF and save the bytes using the package:pdf/pdf.dart.
Display the generated bytes using SfPdfViewer.memory.
Regenerate the PDF, modifying the text content of the document.
* thread #55, queue ='syncfusion_flutter_pdfviewer', stop reason =Swift runtime failure:Double value cannot be converted to Int because the result would be less than Int.min
frame #1:0x00000001033d649c syncfusion_flutter_pdfviewer`SwiftSyncfusionFlutterPdfViewerPlugin.getTileImageForPlugin(pageNumber=<unavailable>, scale=<unavailable>, width=NaN, height=NaN, x=NaN, y=<unavailable>, documentID="1ce0e290-cdcb-11ef-b80b-3fb4f322863c") at SwiftSyncfusionFlutterPdfViewerPlugin.swift:206:22 [opt]
203 y:-(pageHeight * scale /2) + (pageHeight /2) +CGFloat(y),
204 width: pageWidth * scale, height: pageHeight * scale)
205->206 let stride =Int(width) *4^207 let bufSize = stride *Int(height);
208 let buffer =UnsafeMutablePointer<UInt8>.allocate(capacity: bufSize)
209 buffer.initialize(repeating:0, count: bufSize)
Target0: (Runner) stopped.
warning: syncfusion_flutter_pdfviewer was compiled with optimization - stepping may behave oddly; variables may not be available.
On which target platforms have you observed this bug?
iOS
Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.24.3, on macOS 14.7 23H124 darwin-arm64, locale en-ES) • Flutter version 3.24.3 on channel stable at /Users/david/fvm/versions/3.24.3 • Upstream repository https://github.com/flutter/flutter.git • Framework revision 2663184aa7 (4 months ago), 2024-09-11 16:27:48 -0500 • Engine revision 36335019a8 • Dart version 3.5.3 • DevTools version 2.37.3[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /Users/david/Library/Android/sdk • Platform android-34, build-tools 34.0.0 • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874) • All Android licenses accepted.[✓] Xcode - develop for iOS and macOS (Xcode 16.0) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 16A242d • CocoaPods version 1.15.2[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome[✓] Android Studio (version 2023.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)[✓] VS Code (version 1.96.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.102.0[✓] Connected device (4 available) • iPhone de David (mobile) • 00008030-00126158369A802E • ios • iOS 16.7 20H19 • macOS (desktop) • macos • darwin-arm64 • macOS 14.7 23H124 darwin-arm64 • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 14.7 23H124 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 131.0.6778.264[✓] Network resources • All expected network resources are available.
The text was updated successfully, but these errors were encountered:
@davicorpedev We are able to replicate the reported issue, where the application crashes in single-page layout mode, when loading a PDF document which is created by adding text using the syncfusion_flutter_pdf library in the syncfusion_flutter_pdfviewer. We are currently validating this issue and will provide further updates once we identify the root cause.
Bug description
We are encountering an issue with the latest release of the following packages:
The problem occurs when generating PDFs on demand. Specifically, it arises when we modify the text content of the PDF document. Each time the text is updated, the application crashes.
We are uncertain of the exact cause, but it seems to be realted to _extractText function. When debugging with breakpoints set in this function, the issue disappears, and the crash no longer occurs.
The issue also shows an error on SwiftSyncfusionFlutterPdfViewerPlugin.getTileImageForPlugin
Steps to reproduce
Code sample
Code sample
Screenshots or Video
Screenshots / Video demonstration
Stack Traces
Stack Traces
On which target platforms have you observed this bug?
iOS
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: