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

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Project coverage is 36.26%. Comparing base (90ad768) to head (3dc8f99).
Report is 92 commits behind head on master.

Files Patch % Lines
printing/lib/src/preview/raster.dart 0.00% 8 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1446   +/-   ##
=======================================
  Coverage   36.25%   36.26%           
=======================================
  Files         140      140           
  Lines       21644    21643    -1     
=======================================
  Hits         7848     7848           
+ Misses      13796    13795    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@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.

2 participants