Too stringy to digest



  •  I've been teaching myself Android lately. I'm about 90% impressed by it, and 10% boggled by the random showstoppers I might trip over at any time. Here's one...

     So I got an idea for a silly little free "word-of-the-day" calendar app (finished product here, for the curious). Now, Android has a handy feature where a bunch of static data-- say, a list of strings for words, pronunciations, and definitions-- can be set up in an XML file and packaged with your program. Having tested the interface with filler text generated inside the program, I then formatted up my real data, threw the full program into the emulator, aaaaand...

     Normally, when an Android program crashes, you get a popup informing you of the fact before you're kicked back out to the home or applications screen. In this case, I didn't even get that-- just a quick flash of back screen and back out.

     After a lot of searching around, I found the answer: If your imported array is larger than some magic number x, Android's Java VM crashes. There's no way around it other than to cut your array up into smaller pieces and load them separately. This is a statement I'd be perfectly willing to accept in the abstract, simply presuming that x is some very large number, but by my experience just now, x is somewhere below 366.

     This bug was allegedly fixed in Android 2.3.3. In other words, it took them over three years to work out that "load an array of nontrivial size" was a needed enough feature to bother with.



  • @Petrea Mitchell said:

    This bug was allegedly fixed in Android 2.3.3.
    My Android phone is on version 4.0.3. I note that there are various 3.x major versions still around. Are you trying to make it backward compatible to the 'stone ages,' or (cynic) trying to promote your app on your first post?



    I thought the latter, before ceding you might have a point rather than edit your post...



    Not that

    1. you're the first to try and advertise your app on here on your first post
    2. other mods may decide to either remove the URL, or this entire thread....


  • @PJH said:

    My Android phone is on version 4.0.3. I note that there are various 3.x major versions still around. Are you trying to make it backward compatible to the 'stone ages,' or (cynic) trying to promote your app on your first post?

    Oh come on, you're being a jerk.

    1) He doesn't say when this all took place; for all we know he was writing this code before Android 2.3 even came out, and just summarized the story for us now.
    2) There are tons and tons of phones around with Android 2.1-2.3 around. My own phone is running 2.3 at this very moment, and I can't even trade-up until March, so it'll be running Android 2.3 for another few months. Besides, since when is "making software compatible with last year's OS" such a horrible, unbelievable thing?
    3) The app's freakin' FREE so who cares if he's pimping it? He's not profiting from it.
    4) He's posted a genuine WTF and even put a funny subject line on the thread.



  • @PJH said:

    My Android phone is on version 4.0.3. I note that there are various 3.x major versions still around.

    There are plenty 2.x around, in fact. Half the installs on the first app I ever put on the Android Market are on 2.x versions. The update that fixed this problem was only released this past February, so it seems a bit soon to cut out potential users just to avoid dealing with it.

     

    Are you trying to make it backward compatible to the 'stone ages,' or (cynic) trying to promote your app on your first post?

     I've posted here before, actually, but under an assumed identity. I saw an opportunity to provide some proof the story might be real, but it required me to either out my pseudonym or create an account for real me. If the URL gets deleted, I don't mind-- it's not like I expect a lot of readers here to be interested in actually using the program.



  • @blakeyrat said:

    Oh come on, you're being a jerk.
    Hello Mr. Pot.



  • @Petrea Mitchell said:

    There are plenty 2.x around, in fact. Half the installs on the first app I
    ever put on the Android Market are on 2.x versions. The update that fixed this
    problem was only released this past February, so it seems a bit soon to cut out
    potential users just to avoid dealing with it.

    I'll admit to being ignorant about the lifecycle of Android, but are they really expecting dev's to support 2.x through 4.x? Or are they going 'Firefox' with the versioning?

    @Petrea Mitchell said:

     

    Are you trying to make it backward compatible to the 'stone
    ages,' or (cynic) trying to promote your app on your first post?

     I've posted here before, actually, but under an assumed identity. I saw an opportunity to provide some proof the story might be real, but it required me to either out my pseudonym or create an account for real me. If the URL gets deleted, I don't mind-- it's not like I expect a lot of readers here to be interested in actually using the program.

    At least my gut instinct appeared to be right.

    Mildly interested in why, if you have a pseudo here, you decided to create yet another to post this. Unless the other was tied to othe crap...

    Soofles - that you? Or are you swampie? 🙂


  • @blakeyrat said:

    3) The app's freakin' FREE so who cares if he's pimping it? He's not profiting from it.

    4) He's posted a genuine WTF and even put a funny subject line on the thread.

     Thanks. To be fair to PJH, there is a lot of malware in the Android Market disguised as free apps. You'll just have to accept my assurances that I'm not an elite enough Android programmer yet to write competent malware. (Plus, you would think a competent malware author would know to disguise it as an app that looks interesting to more than just language geeks.)

     And, um, it's awkward to be correcting someone who's rushing to my defense, but I'm afraid I'm not a "he".

     



  • @PJH said:

    I'll admit to being ignorant about the lifecycle of Android, but are they really expecting dev's to support 2.x through 4.x? Or are they going 'Firefox' with the versioning?

    Given the general attitude of the Android documentation, I don't think they expect developers to expect any version more than a couple months old. However, I expect backwards compatibility within a reasonable timeframe, and 3.0 only came out this last year, and never seemed to have caught on the way it was supposed to. Heck, the Galaxy Tab I got this summer only runs 2.2.1.

    Mildly interested in why, if you have a pseudo here, you decided to create yet another to post this. Unless the other was tied to othe crap...

    It's tied to stories I'd like to allow to remain pseudonymous for personal reasons. No links.

    (Quick edit: yes, it took me a moment to remember it's 2012 now. Welcome to Checkuary...)



  • @PJH said:

    My Android phone is on version 4.0.3. I note that there are various 3.x major versions still around. Are you trying to make it backward compatible to the 'stone ages,' or (cynic) trying to promote your app on your first post?

    Most application frameworks still target Android 2.2; Titanium, PhoneGap, Corona, etc. Because it's considered one of the more stable releases.



  • @Petrea Mitchell said:

     I've been teaching myself Android lately. I'm about 90% impressed by it, and 10% boggled by the random showstoppers I might trip over at any time. Here's one...

     So I got an idea for a silly little free "word-of-the-day" calendar app (finished product here, for the curious). Now, Android has a handy feature where a bunch of static data-- say, a list of strings for words, pronunciations, and definitions-- can be set up in an XML file and packaged with your program.

    Just for the record, are you referring to Resources.getStringArray() here? 

    @Petrea Mitchell said:

    Having tested the interface with filler text generated inside the program, I then formatted up my real data, threw the full program into the emulator, aaaaand...

     Normally, when an Android program crashes, you get a popup informing you of the fact before you're kicked back out to the home or applications screen. In this case, I didn't even get that-- just a quick flash of back screen and back out.

     After a lot of searching around, I found the answer: If your imported array is larger than some magic number x, Android's Java VM crashes. There's no way around it other than to cut your array up into smaller pieces and load them separately. This is a statement I'd be perfectly willing to accept in the abstract, simply presuming that x is some very large number, but by my experience just now, x is somewhere below 366.

    Hm.  I've experienced very similar untrapped fast aborts in the Android JVM when I loaded too many image large resources at the same time once.  I think it may be a broader generic problem with untrapped out-of-memory errors.

    @Petrea Mitchell said:

    This bug was allegedly fixed in Android 2.3.3. In other words, it took them over three years to work out that "load an array of nontrivial size" was a needed enough feature to bother with.

    Do you know the url of the relevant bug report?  It sounds a lot like http://code.google.com/p/android/issues/detail?id=5287.

     



  • @PJH said:

    My Android phone is on version 4.0.3. I note that there are various 3.x major versions still around. Are you trying to make it backward compatible to the 'stone ages,' or (cynic) trying to promote your app on your first post?

    I may be missing the sarcasm here, but 2.3.3 isn't the 'stone ages' in Android terms. Smartphones made the jump from 2.3.3 to 4.X directly (3.x is tablet-only), and the bulk of currently available Android products ship with a 2.x OS and no official way to upgrade to 4.x (or if there is one, it's not for the near future). Developing an app for 4.x+ means only a fraction of Android users will be able to run it.



  • @PJH: not me; good or bad, I post with my own id...



  • @DaveK said:

    Just for the record, are you referring to Resources.getStringArray() here?

    Yup. And the bug you linked to is approximately what was happening-- a crash after an error message about more than 512 reference table entries, only I found it can take a lot fewer than 512 strings in one array to produce it.

     



  • @PJH said:

    @blakeyrat said:
    Oh come on, you're being a jerk.
    Hello Mr. Pot.

    I always hated that saying. Of course the pot called the kettle black. They're both black. He's just pointing out a fact.

    Me calling you a jerk has no bearing on my being a jerk.



  • @PJH said:

    @Petrea Mitchell said:
    This bug was allegedly fixed in Android 2.3.3.
    My Android phone is on version 4.0.3. I note that there are various 3.x major versions still around. Are you trying to make it backward compatible to the 'stone ages,' or (cynic) trying to promote your app on your first post?

    The majority of Android devices are running 2.x, a small percentage are on 3.x, and a fraction of a percent are on 4.x. Hence if you want to get your app to the majority of users, you need to target it at 2.x - which is problematic because there are a number of pretty major bugs in that version, not to mention complete lack of features like USB support.

    Unfortunately, by making Android completely open, Google has essentially ensured the platform will forever suffer from terrible version fragmentation, since there's no onus on the hardware vendors to force OS updates. While I don't like Apple's closed platform on principle, I'd much rather develop for it because I know I can target a recent release of iOS and my app will still work on 90% of iDevices out there.

    Also the Android dev environment is not bad, but it is stupid. Not only did Google choose a shitty language (Java), they picked the shittiest IDE on the planet (Eclipse). They should've gone with C# Compact Framework and MonoDevelop (or VS Express for Windows users), because not only would that have benefited the Mono project (which consistently produces some of the least shittiest Linux apps), it would also have immediately made the platform attractive to everyone who knows C# and has Visual Studio installed. But as we all know, Google's much better at coming up with ideas than actually turning them into something good (the number of closed Google Labs projects are testament to this).



  • @Petrea Mitchell said:

    [...] I'm afraid I'm not a "he".

    I'm afraid you've made it too easy to figure out your pseudonym.



  • @Jonathan said:

    I'm afraid you've made it too easy to figure out your pseudonym.
     

     And you assume my pseudonym is obviously female because...?

     



  • @Petrea Mitchell said:

    @Jonathan said:

    I'm afraid you've made it too easy to figure out your pseudonym.
     

     And you assume my pseudonym is obviously female because...?

     

    Well, -a endings are usually of feminine gender in romance languagues.




  • @DaveK said:

    Well, -a endings are usually of feminine gender in romance languagues.
     

    In Dutch pronunciation, "DaveK" sounds as if ending with an a.



  • @dhromed said:

    @DaveK said:

    Well, -a endings are usually of feminine gender in romance languagues.
     

    In Dutch pronunciation, "DaveK" sounds as if ending with an a.

    You mean like "Ford Ka"?  In English it ends with an /ay/ dipthong, so the K is pronounced as if it were spelt like the name "Kay".




  • @dhromed said:

    @DaveK said:

    In Dutch pronunciation, "DaveK" sounds as if ending with an a.

    You mean like "Ford Ka"?  In English it ends with an /ay/ dipthong, so the K is pronounced as if it were spelt like the name "Kay".

    I've been saying it in my head to rhyme with "Dalek".



  • @RTapeLoadingError said:

    @dhromed said:
    @DaveK said:

    In Dutch pronunciation, "DaveK" sounds as if ending with an a.

    You mean like "Ford Ka"?  In English it ends with an /ay/ dipthong, so the K is pronounced as if it were spelt like the name "Kay".

    I've been saying it in my head to rhyme with "Dalek".

    It's just a username/handle/sig I use made up of my first name and the first letter of my last name smushed together, but I think it's also a real name in some of the Slavic languages, which probably would be pronounced that way.




  • @DaveK said:

    It's just a username/handle/sig I use made up of my first name and the first letter of my last name smushed together, but I think it's also a real name in some of the Slavic languages, which probably would be pronounced that way.

    It's a pity your parents didn't have the foresight to call you "Dale".



  • @DaveK said:

    In English it ends with an /ay/ dipthong, so the K is pronounced as if it were spelt like the name "Kay".
     

    Yes, I know.

     

    In other news, in "dhromed", the 'e' is silent as in "zoned out" and "fucked up".

     



  •  I've always read it as Dayvkay cause it rolls easier. But thanks for having me read in Dutch now. Daveka(k) Teeheehee!

    Back on topic: 366 strings ought to be enough for anybody!

     



  • @The poop of DOOM said:

    Daveka(k)
     

    Amsterdamsg?



  • @dhromed said:

    In other news, in "dhromed", the 'e' is silent as in "zoned out" and "fucked up".

     

    Aw, I always thought it was pronounced "Drow-Med", like some sort of dark elven health care plan...



  • @dhromed said:

    @The poop of DOOM said:

    Daveka(k)
     

    Amsterdamsg?

     

    Belgsch, en potty humour 😉



  • @Petrea Mitchell said:

     I'm not a "he".

    Ohh, so you are an "it", at last a computer has become self aware (but why our future overlord is making android apps unless....?)



  • @PJH said:

    I'll admit to being ignorant about the lifecycle of Android, but are they really expecting dev's to support 2.x through 4.x? Or are they going 'Firefox' with the versioning?

    You've got it wrong way 'round. It's not "Firefox" versioning; they are just following Google (Chrome). Now guess who produces Android.



  • @ekolis said:

    @dhromed said:

    In other news, in "dhromed", the 'e' is silent as in "zoned out" and "fucked up".

     

    Aw, I always thought it was pronounced "Drow-Med", like some sort of dark elven health care plan...

    Aw, I always thought it was pronounced "droh-med", like the first two thirds of a dromedary.



  •  The ironiy is that I've never actually said it out loud.


  • Discourse touched me in a no-no place

    @Bulb said:

    @PJH said:
    I'll admit to being ignorant about the lifecycle of Android, but are they really expecting dev's to support 2.x through 4.x? Or are they going 'Firefox' with the versioning?

    You've got it wrong way 'round. It's not "Firefox" versioning; they are just following Google (Chrome). Now guess who produces Android.
    Android versioning actually kind of works out. 2.x is the previous major smartphone OS version. 3.x was the first major tablet version and (essentially) skipped except some early tablets. 4.x is an integration of 2.x and 3.x into a single package. Fortunately someone figured out that two forks for different sized devices was fucking stupid, and they figured it out rather early.

     

    If they were following the Chrome versioning system, every single phone ever released would have a different major version.



  • @The_Assimilator said:

    The majority of Android devices are running 2.x, a small percentage are on 3.x, and a fraction of a percent are on 4.x. Hence if you want to get your app to the majority of users, you need to target it at 2.x - which is problematic because there are a number of pretty major bugs in that version,
    Correct.  According to this table, 94% of Android devices are running one of the  2.x versions.


     



  • @El_Heffe said:

    According to this table, 94% of Android devices[1] are running one of the  2.x versions.
    [1] That have accessed Android Market in the past 14 days.



    I haven't accessed it for over 2 weeks.



  • @RTapeLoadingError said:

    @dhromed said:
    @DaveK said:

    In Dutch pronunciation, "DaveK" sounds as if ending with an a.

    You mean like "Ford Ka"?  In English it ends with an /ay/ dipthong, so the K is pronounced as if it were spelt like the name "Kay".

    I've been saying it in my head to rhyme with "Dalek".

    +1



  • @blakeyrat said:

    @PJH said:
    @blakeyrat said:
    Oh come on, you're being a jerk.
    Hello Mr. Pot.

    I always hated that saying. Of course the pot called the kettle black. They're both black. He's just pointing out a fact.

    Me calling you a jerk has no bearing on my being a jerk.

    This is what's known as the "tu quoque" (or "you too") fallacy.



  • @toth said:

    This is what's known as the "tu quoque" (or "you too") fallacy.

    NO U!



  • @blakeyrat said:

    @toth said:
    This is what's known as the "t qoqe" (or "yo too") fallacy.

    NO U!

    Done.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.