PAINTROID-761-4: Integrate legacy image parser to app and handle fallback cases#174
Draft
Amit-Matth wants to merge 6 commits into
Draft
PAINTROID-761-4: Integrate legacy image parser to app and handle fallback cases#174Amit-Matth wants to merge 6 commits into
Amit-Matth wants to merge 6 commits into
Conversation
Amit-Matth
marked this pull request as draft
July 9, 2026 01:26
Amit-Matth
force-pushed
the
PAINTROID-761-parser-fixes
branch
2 times, most recently
from
July 13, 2026 15:34
8cbfa8d to
0fb3258
Compare
Amit-Matth
marked this pull request as ready for review
July 13, 2026 15:57
…lizers from binary
… modern Flutter equivalents
Amit-Matth
force-pushed
the
PAINTROID-761-parser-fixes
branch
from
July 19, 2026 15:18
b6bdca6 to
9e08bfd
Compare
Amit-Matth
marked this pull request as draft
July 21, 2026 05:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This Pull Request corresponds to Stage 4 of our backward compatibility integration. It focuses on connecting the legacy model parsing engine to the application's file loader and ensuring robust fallback recovery for corrupted or truncated files.
PAINTROID-761
New Features and Enhancements
LoadImageFromFileManagerto explicitly support.catrobatand.bin(legacycatrobat-image) file extensions, routing them directly through theCatrobatImage.fromBytesparsing engine.!reader.hasRemainingsafeguard inlegacy_model_parser.dartto prevent app crashes when loading.catrobat-imagefiles that were corrupted or cut off early by the legacy Android app. The parser now gracefully stops and recovers whatever strokes were successfully saved before the EOF.VarInts for generic object sizes, but Paintroid wrote explicit 4-byteInt32s for path actions and colors. Updated the parser to properly consume absolute 4-byte integers for these collections.Refactorings and Bug Fixes
catrobat_image_serializer_test.dartto verify that truncated binary files safely decode without throwingIndexOutOfBoundexceptions.Checklist
Your checklist for this pull request
Please review the contributing guidelines and wiki pages of this repository.