-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I turn pages faster, pdfrx crashes. #102
Comments
This is my code: PdfViewer.asset(
'assets/hello.pdf',
passwordProvider: () => passwordDialog(context),
controller: controller,
params: PdfViewerParams(
enableTextSelection: true,
maxScale: 8,
),
), My hello.pdf have 47 pages. |
There seems some problem on analyzing text data on the PDF. And, also, please provide |
flutter --version |
flutter doctor -v [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 14.3.1) [✓] Chrome - develop for the web [✓] Android Studio (version 2022.3) [✓] VS Code (version 1.87.2) [!] Proxy Configuration [✓] Connected device (3 available) [✓] Network resources ! Doctor found issues in 1 category. |
I'm testing the issue but I'm not sure why so many RangeError caused on your environment. I could not reproduce your issue... |
This problem can be reproduced by quickly sliding the file。 |
At some zoom ratio (zoom-upped), I reproduces the issue. And under profiling mode, it seems RSS memory gets 800MB+ and I suspect that the RSS is the actual cause of the issue. But I don't know how to fix it so far... |
@zengchanghuan 1.0.52 fixes certain memory leaks and related issues. Please check it. |
|
@zengchanghuan Please quote your stacktrace with ```. It's too large. The exception causes some flicker on user operation and I've found the actual casue. |
I also found a deeper cause for the RSS exploding issue. It's I also notice there is a |
I know that. But I think it's relatively small. Do you think it impacts the memory usage? I'm not sure which is better (for any/certain kind of efficiency) to open/close page instance every timeor keep the handle on memory. |
In my experience, you can provide a method to release memory, and it is up to the developer to decide whether to actively release memory when closing the page. |
Anyway, 1.0.53 fixes the flicker that was introduced by the previous version. |
For FPDF_RenderPageBitmap memory issue, if you really need such function, please create another issue. |
The text was updated successfully, but these errors were encountered: