My off switch didn't switch anything off
20 weeks as an Android dev on the Monash Study App (90,000+ students a day). The off switch that still made the request, a date past 2038 that rewrote itself to 1909, and the crash that only happened with two links.
By Ojas KekreCyber security, Monash University
I turned a feature off and the app kept calling the server anyway. It was one of three bugs that taught me more than the rest of my placement combined. From July to November 2026 I was an Android dev on the Monash Study App team (eSolutions, the uni's central IT), on a 20-week placement.
More than 90,000 students open the app every day during semester, so every bug has an audience.
- Students a day in semester
- 90,000+
- PRs to move News to Compose
- 11
- Lines of dead XML deleted in one go
- 1,565
Bug 1: the off switch that didn't switch anything off
The team wanted to kill a feature from a server, with no app update, for when a backend is having a bad day. The app already used Firebase Remote Config, so I added switches for News and My results.
| Rule | Why |
|---|---|
| A missing value means on | A config hiccup can't hide a working feature |
| The switch is read when you open the screen, never live | Nothing vanishes under your thumb |
- 01scr to feed: Subscribe. The screen is being built, and it subscribes to the feed while it does. Feed: subscribed.
- 02feed to net: Request. Paging starts loading the second something subscribes, so the network request goes out. Network: request sent.
- 03The switch is off, so the screen shows "switched off". The request has already gone. News screen: shows "switched off".
- 04sw to feed: Off. The fix is at the flow. A cold flow does nothing until collected, so with the switch off, don't collect it, and hand the list an empty page so everything downstream still works. Network: no request; News screen: empty page; Feed: not collected.
Checking the switch before the fetching state fixed it.
Bug 2: a date in 2046 that came back as 1909
- 119 Jan 20382,147,483,647 secondsThe last second a signed 32-bit int can hold
- 219 Jan 20462,400,000,000 secondsMade-up value
- Fits in a signed 32-bit int0 seconds to 2,147,483,647 seconds
- Too big for it2,147,483,648 seconds to 4,294,967,295 seconds
| Grades | Timetable | |
|---|---|---|
| How the timestamp was read | As an Int field | Through a helper that did toInt() |
| What happened | Gson refused it, and one bad field fails the whole response | In Kotlin toInt() doesn't throw. It wraps |
| What the user saw | A crash | A date silently turned into 1909 |
| Fix | Widened the field to Long | Split the helper into a Long one for timestamps and an Int one for small counts, labelled which is which |
1val seconds = 2_400_000_000L // 19 Jan 2046
2val narrowed = seconds.toInt() // -1_894_967_296
3// as a date: 14 Dec 1909- 1L2Keeps the low 32 bits. No exception, no warning, just a different number.
So the screen that crashed was the lucky one. The timetable path never complained. I added tests right at the 32-bit edge.
Bug 3: it only crashed with two links
- 01
Post cards
Built and tested, unused
- 02
Detail, then feed
LazyColumn, stable keys, load-state rows
- 03
Groups + channels
Old toolbar bridged with nested-scroll interop
- 04
Delete dead code
28 files
- 05
One Explore screen
Logic into the ViewModel
- 06
Collapsing header
One clamped float
- 01One number, how collapsed the header is, clamped from 0 to its full height, drives everything. Collapse amount: 0 to full height.
- 02nsc to num: Collapse first. A
NestedScrollConnectionsees every scroll before the list. Scrolling down spends it collapsing the header first. - 03nsc to num: Restore first. Scrolling up restores the header first. It is the same maths in both directions, so it can't get stuck half open.
- 04The list's scroll state is hoisted above the tab switch, so coming back to News puts you where you were. List: state kept across tabs.
scroll news feed ... ok open post with 1 link ... ok scroll past post with 2+ links ... crash painterResource: only vector or bitmap images, got a shape drawable1
- 1L4Posts with 2+ links draw a little bullet, an XML shape
- 01
Bullet is an XML shape
Loaded through
painterResource, which only takes vectors and bitmaps - 02
Can't convert it
Its colour came from a theme attribute
- 03
Draw the dot in Compose
No file to load
- 04
Patched the same day
Every test I'd written for that card used one link. The regression test uses two.
Also shipped
| What | Detail |
|---|---|
| Android 17 | Target SDK 36 to 37, ahead of Play's deadline |
| WebView headers for the in-app assistant | reload() dropped the headers given to loadUrl (in my testing), so retry re-issues loadUrl instead |
| Testing | Regression and product verification for 2.42.0 and 2.43.0, and 2.44.0 end to end |
| Review | The team's reviews and CI behind every change |
The part that isn't Android
- 39%Errors for enrolled studentsAbout 15.5 million, 39%
- 61%Everything else
I wrote a read-only Python tool to sample accounts at scale. The pattern wasn't about students at all: failures were a property of the course offering. If an offering failed, it failed for everyone in it. That points at caching per offering, so I proposed a fix aimed at that ~2-in-5 share.
- 01
Agreed
With the team that owns the service
- 02
Built and tested
- 03
Reviewed and approved
- 04
Live in production
I found an auth weakness on the way, responsibly disclosed it, and it has since been fixed. The fix for the 404s has its own post: Why 39% of our API calls came back 404.