Skip to content

Fix divide by zero error in MainActivity - #259

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
arithmeticexception-divide-by-9kbz4e
Draft

Fix divide by zero error in MainActivity#259
cursor[bot] wants to merge 1 commit into
mainfrom
arithmeticexception-divide-by-9kbz4e

Conversation

@cursor

@cursor cursor Bot commented Aug 18, 2026

Copy link
Copy Markdown

Description

Fixed the ArithmeticException caused by divide-by-zero operation in MainActivity's "div_zero" button click listener.

Changes

  • Removed the hardcoded int t = 5 / 0 operation that was causing crashes on every button click
  • The button now safely handles clicks without throwing an exception

Testing

  • The div_zero button can now be clicked without causing an ArithmeticException
  • The breadcrumb is still logged to Sentry when the button is clicked

Fixes ANDROID-GZ

Open in Web Open in Cursor 

Removed the hardcoded divide-by-zero operation (int t = 5 / 0) from the div_zero button click listener that was causing ArithmeticException on every click.

Fixes [ANDROID-GZ](https://demo.sentry.io/issues/7540223128/)
@sentry

sentry Bot commented Aug 18, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
Android com.example.vu.android 24.12.26 (241226) release
Android com.example.vu.android 24.12.26 (241226) debug

⚙️ android Build Distribution Settings

@sentry

sentry Bot commented Aug 18, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
Android com.example.vu.android 24.12.26 (241226) release
Android com.example.vu.android 24.12.26 (241226) debug
Android com.example.vu.android 24.12.26 (241226) release

⚙️ android Build Distribution Settings

@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (21c77a4) to head (aed8d84).

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #259   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files         16      16           
  Lines        883     882    -1     
  Branches      67      67           
=====================================
+ Misses       883     882    -1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant