High: Null safety bugs and fragile puzzle generation #28
Labels
No labels
blocked:needs-attention
blocked:needs-decision
blocked:needs-human
blocked:verify-failed
bug
chore
critical
decompose
feature-request
high
in-progress
medium
quality
quickfix
security/medium
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/activity-book-app#28
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Findings
gridarray accessed ingeneratePuzzle()before it's initialized whenchapteris null. NPE path.mazeSize=8initialized at construction, butloadConfig()may reassign it. Works by accident when config returns null because both paths land on 8.sqrt(pieceCount).toInt()for column count is incorrect — cell count won't match grid, causing layout glitches or index crashes.Affected files
android/app/src/main/java/com/storyplay/activitybook/ui/WordSearchActivity.ktandroid/app/src/main/java/com/storyplay/activitybook/ui/MazeActivity.ktandroid/app/src/main/java/com/storyplay/activitybook/ui/JigsawActivity.ktImpact
NullPointerExceptions and broken puzzles at runtime.