Skip to content
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

Add range check during raster #1446

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

deepak786
Copy link
Contributor

There are the following non-fatal exceptions in the Firebase crashlytics:

Non-fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError
RangeError (start): Invalid value: Not in inclusive range 0..1: 2. Error thrown while rastering a PDF.
Non-fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError
RangeError (length): Invalid value: Valid value range is empty: 0. Error thrown while rastering a PDF.

So added a check before the removeRange.

@codecov-commenter
Copy link

codecov-commenter commented Jul 24, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.01 ⚠️

Comparison is base (90ad768) 36.25% compared to head (22dafd2) 36.25%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1446      +/-   ##
==========================================
- Coverage   36.25%   36.25%   -0.01%     
==========================================
  Files         140      140              
  Lines       21644    21645       +1     
==========================================
  Hits         7848     7848              
- Misses      13796    13797       +1     
Impacted Files Coverage Δ
printing/lib/src/preview/raster.dart 0.00% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@deepak786
Copy link
Contributor Author

deepak786 commented Jul 26, 2023

Not sure how to resolve the below error

RangeError (length): Invalid value: Valid value range is empty: 0. Error thrown while rastering a PDF.

Report

Non-fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: RangeError (length): Invalid value: Valid value range is empty: 2. Error thrown while rastering a PDF.
(PdfPreviewRaster._raster [framework.dart:925]) (BuildId: 349b900323bc41a5af40333a09cbd634)
(_SuspendState._createAsyncStarCallback.<anonymous closure> [async_patch.dart:379]) (BuildId: 349b900323bc41a5af40333a09cbd634)
(_FutureListener.handleValue [zone.dart:1661]) (BuildId: 349b900323bc41a5af40333a09cbd634)
(Future._propagateToListeners.handleValueCallback [future_impl.dart:784]) (BuildId: 349b900323bc41a5af40333a09cbd634)
(Future._propagateToListeners [future_impl.dart:813]) (BuildId: 349b900323bc41a5af40333a09cbd634)
(Future._completeWithValue [future_impl.dart:584]) (BuildId: 349b900323bc41a5af40333a09cbd634)
(_SuspendState._returnAsyncNotFuture [async_patch.dart:365]) (BuildId: 349b900323bc41a5af40333a09cbd634)
(_SuspendState._createAsyncStarCallback.<anonymous closure> [async_patch.dart:379]) (BuildId: 349b900323bc41a5af40333a09cbd634)
(_FutureListener.handleValue [zone.dart:1661]) (BuildId: 349b900323bc41a5af40333a09cbd634)
(Future._propagateToListeners.handleValueCallback [future_impl.dart:784]) (BuildId: 349b900323bc41a5af40333a09cbd634)
(Future._propagateToListeners [future_impl.dart:813]) (BuildId: 349b900323bc41a5af40333a09cbd634)
(Future._complete [future_impl.dart:575]) (BuildId: 349b900323bc41a5af40333a09cbd634)
(_SyncCompleter.complete [future_impl.dart:47]) (BuildId: 349b900323bc41a5af40333a09cbd634)
(_futurize.<anonymous closure> [painting.dart:6632]) (BuildId: 349b900323bc41a5af40333a09cbd634)
(_Image.toByteData.<anonymous closure>.<anonymous closure> [painting.dart:1959]) (BuildId: 349b900323bc41a5af40333a09cbd634)

@DavBfr Could you please check?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants