Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones
-
-
@wharrgarbl and the cause? Giant 3000x3000 app icon causing OOM in launcher.
One would think the app verification would catch that...
-
A 3500x3500 icon, stored as raw uncompressed pixels, is still only ~36MB big. You'd think that wouldn't crash the entire system in a phone with >1GB of RAM.
-
@Gąska 3000 * 3000 * 4 (32-bit image) = 36 MB uncompressed image data, max.
Sure, that's huge, but even so... how does 36 MB of data cause an OOM error? That's TRWTF!
-
@masonwheeler Buffer overflow exception misinterpreted further up?
-
@PleegWat said in Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones:
@masonwheeler Buffer overflow exception
...in Java?!?
-
CunningLogic 81 points 1 day ago
Cause is MOST likely your icon, its 3556x3556 and causing a OOM error, as identifier by /u/faultexception
Everyone shouting out about breaking sandbox, and big bounties are just talking out the side of their neck. It is worth a fat $0. Resize your icon, update your app, have fun.
PS make it so i can punch chickens in the game please.
-
@masonwheeler said in Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones:
@Gąska 3000 * 3000 * 4 (32-bit image) = 36 MB uncompressed image data, max.
Sure, that's huge, but even so... how does 36 MB of data cause an OOM error? That's TRWTF!
java.lang.RuntimeException: Canvas: trying to draw too large(154902916 bytes) bitmap
Apparently not only is it more (16 bytes per pixel, apparently), but it also runs into some internal canvas limitation rather than OOMing out.
-
@Maciejasjmj OK, that makes a bit more sense.
-
@Gąska said in Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones:
3000x3000 app icon
300×300 would be a big icon…
Also, why didn't the developer test at all? I'm not talking about thorough testing, I'm talking about the most basic “does it launch at all and appear to work on first basic glance?” Sometimes I just
-
@dkf said in Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones:
300×300 would be a big icon…
On mobile? Remember those tiny screens are full HD. For a home screen icon, 256px is likely required.
-
@dkf said in Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones:
@Gąska said in Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones:
3000x3000 app icon
300×300 would be a big icon…
Also, why didn't the developer test at all? I'm not talking about thorough testing, I'm talking about the most basic “does it launch at all and appear to work on first basic glance?” Sometimes I just
If you fire it up straight through ADB attached to your debugger, you never see the icon.
-
@Maciejasjmj said in Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones:
@masonwheeler said in Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones:
@Gąska 3000 * 3000 * 4 (32-bit image) = 36 MB uncompressed image data, max.
Sure, that's huge, but even so... how does 36 MB of data cause an OOM error? That's TRWTF!
java.lang.RuntimeException: Canvas: trying to draw too large(154902916 bytes) bitmap
Apparently not only is it more (16 bytes per pixel, apparently), but it also runs into some internal canvas limitation rather than OOMing out.
Cross-posting what @DCoder said in WTF Bites:
@ben_lubar See https://www.reddit.com/r/gamedev/comments/6575nr/is_it_actually_possible_to_earn_money_from_mobile/dg9nwfr/?context=2 for more analysis:
Their icon is a resource in the hdpi density, and the Nexus 5 is xxhdpi so it may be upscaled to double the resolution, which would mean 7112x7112x4 would be 202,322,176.
-
Android is TRWTF for crashing with a 3 MP icon and not checking icon size before submit. That's large, but not that much larger than a game texture. I have to make note of this.
-
@magnusmaster said in Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones:
and not checking icon size before submit
In a place that's expected to detect and handle tons of specifically crafted malware, no less!
-
The author has very wisely deleted his reddit account. Big fat oops, indeed!
-
from a link in the reddit thread:
tl;dr: It seems the Android team are basically doubling the amount of memory needed per icon for the sake of OOP purity, rather than looking at the totality of circumstances for the problem at hand.
On Dalvik, each object has 4 bytes of overhead. A byte value as a variable or field is word-aligned to 4 bytes. HOWEVER, in an array, it would not be. So if you had a class Pixel, with three separate fields of type byte, and a pixel[35563556] array object you'd expect an allocation of around 4+(35563556*(4+4*3)) == 202,322,180 bytes. Outer array == 4 bytes overhead. Per-Pixel overhead of 4 bytes, plus 4 bytes for each of its 3 byte fields. Still leaves is 12 bytes short but that could be the allocator aligning things to quad-word boundaries.
If the Pixel class had a byte[3] field instead of 3 byte fields, you'd expect it to be more like 4+(35563556(4+4+3)) == 139,096,500 bytes, which is way too small. Maybe it's got a byte[4] instead -- alpha channel and all? That puts us at 151,741,636 though, which is still too small.
However, what if they are using a char/short for each component of the pixel instead? That puts it at 4+(35563556(4+4+8)) == 202,322,180 bytes.
So. Working backwards from the numbers, I'd infer that Android probably has a Pixel class with 16-bit-per-component color precision, packing components into an array to save a few bytes of memory without breaking precious OOAD principles too badly.
That said, a single Icon class that contained a single field of short[NN4] they'd have a memory allocation here of 4+4+(355635564*2) == 101,161,096. If they don't actually need 16-bit-per-component color precision it would be half that of course. But for the sake of argument, let's assume the 16bpp part is a feature.
-
May I ask how you developed this app? Did you use a game engine or did you write Java code with Android API?
It was written in Cocosharp using Xamarain. AFAIK it works as virtual machine which just translates C# code to Java
-
@Weng said in Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones:
@dkf said in Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones:
@Gąska said in Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones:
3000x3000 app icon
300×300 would be a big icon…
Also, why didn't the developer test at all? I'm not talking about thorough testing, I'm talking about the most basic “does it launch at all and appear to work on first basic glance?” Sometimes I just
If you fire it up straight through ADB attached to your debugger, you never see the icon.
More accurately, the package manager never sees the icon. It displays fine, until the package manager sees it, then all hell breaks loose
-
@anonymous234 said in Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones:
A 3500x3500 icon, stored as raw uncompressed pixels, is still only ~36MB big. You'd think that wouldn't crash the entire system in a phone with >1GB of RAM.
Normally it wouldn't... but they overbooked the system and there was an issue forcefully removing a few extra bytes that had patients to see in the morning.
-
@WernerCD They should have allocated a Pepsi
-
@El_Heffe said in Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones:
Xamarain
-
@hungrier said in Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones:
@WernerCD They should have allocated a Pepsi
640 kilopepsis should be enough for anyone.
-
I have mixed feelings about this. On one hand, he was extremely irresponsible. On the other, the community were a bunch of dicks in response. While you might argue that the dickishness was justified, I doubt anyone who's worked on a game for more than a year would act that way to another developer.
-
@Groaner said in Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones:
While you might argue that the dickishness was justified, I doubt anyone who's worked on a game for more than a year would act that way to another developer.
I can believe one developer would be that dickish to another. After all, I've seen a dev do everything he possibly can to scare off pretty much everyone who bought his first game, so it's not out of this world to think one dev would be an asshole to another dev.
-
@Groaner Have you forgotten about Jeff and his minions already?
-
@RaceProUK said in Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones:
@Groaner said in Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones:
While you might argue that the dickishness was justified, I doubt anyone who's worked on a game for more than a year would act that way to another developer.
I can believe one developer would be that dickish to another. After all, I've seen a dev do everything he possibly can to scare off pretty much everyone who bought his first game, so it's not out of this world to think one dev would be an asshole to another dev.
Maybe it's anonymity. I've been to a lot of local gamedev meetups, and rarely do you find someone who has sunk more than a year into his/her project. Rarely also do you receive criticism that isn't constructive. I can count on one finger the number of times I got less than constructive criticism*.
*"It doesn't seem like there's a clear objective of what the player is supposed to do," he said somewhat incredulously. "You need feedback about the direction you're going, before you commit to another few years and end up going in the wrong direction."
Then I asked, "So your feedback is that I need feedback?"
-
@AlexMedia said in Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones:
@Groaner Have you forgotten about Jeff and his minions already?
Nope. But I consider a game to be a much different project than a forum or commercial information system.
-
@Groaner said in Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones:
I have mixed feelings about this. On one hand, he was extremely irresponsible.
Was he?? Where? Seems to me he was just ignorant of the potential consequences.
-
@heterodox said in Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones:
@Groaner said in Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones:
I have mixed feelings about this. On one hand, he was extremely irresponsible.
Was he?? Where? Seems to me he was just ignorant of the potential consequences.
Lack of due diligence; therein lies the irresponsibility. I believe he could also be on the hook for any damages caused by his software.
A responsible developer would test builds on a fresh sandbox to at least validate the install. Additionally, s/he would question the fitness of a 3k by 3k pixel icon before using it as an asset. In my project, I frequently resize and atlas multiple textures to reduce draw calls and memory footprint.
If you put something out into the world and stick your name on it, you own the consequences.
-
Blakey, you've really lost your edge.
-
@Groaner said in Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones:
A responsible developer would test builds on a fresh sandbox to at least validate the install.
Wouldn't have caused the issue, unless he installed it from the play store, either by testing after publishing or by setting up a beta branch and testing that way. Plus, the bug isn't his, it's in the package manager, and is (apparently) undocumented. He did something that, while somewhat abnormal, wasn't prohibited in the publishing system nor documented anywhere. Leary as I am to blame Google for things like this, I honestly would lie all the blame at their feet - their package manager done fucked up.
-
@sloosecannon If I understood the comments correctly I think it's the launcher that is blowing up at time of rendering the icon.
-
@El_Heffe said in Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones:
May I ask how you developed this app? Did you use a game engine or did you write Java code with Android API?
It was written in Cocosharp using Xamarain. AFAIK it works as virtual machine which just translates C# code to Java
MOAB is lethal patriarchy, haven't you heard?
-
@sloosecannon said in Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones:
Wouldn't have caused the issue, unless he installed it from the play store, either by testing after publishing or by setting up a beta branch and testing that way.
Wouldn't you want to go through the same experience your customers do to ensure there are no surprises?
Plus, the bug isn't his, it's in the package manager, and is (apparently) undocumented. He did something that, while somewhat abnormal, wasn't prohibited in the publishing system nor documented anywhere.
Yes, Google has a bug, but he's ultimately responsible for the bad experience his users had. Passing the buck is unprofessional.
Leary as I am to blame Google for things like this
?
-
@boomzilla said in Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones:
Blakey, you've really lost your edge.
Impossible! Not only have I not praised the Microsoft alternative to the platform in this instance, I'm holding the developer to task instead of blaming the shitty platform!
-
@Groaner my guess is it wasn't reproduceable in any of his devices, or he would have noticed it
-
@wharrgarbl said in Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones:
@Groaner my guess is it wasn't reproduceable in any of his devices, or he would have noticed it
Then maybe he gets a pass. My project works on all my devices, but it won't work on a raw OS install because it depends on the right MSVC runtime, OpenAL and a couple other things, for example. He certainly wasn't on the right track given his initial flippant responses to the issue.
-
@Polygeekery said in Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones:
MOAB is lethal patriarchy
Again Communism saves you ... with the Father of all Bombs
-
@Luhmann They should get together and raise the Babies of All Bombs, at least until they become the Surly Teenagers of All Bombs…
-
@dkf said in Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones:
@Luhmann They should get together and raise the Babies of All Bombs, at least until they become the Surly Teenagers of All Bombs…
-
One of these is not like the others.
-
@wharrgarbl said in Game dev wonders why his in-game ads are making no money, turns out its been bricking people's phones:
@sloosecannon If I understood the comments correctly I think it's the launcher that is blowing up at time of rendering the icon.
Nope, the launcher renders the icon fine. It's the play store package manager that falls over.