Video Game Developer
1390 stories
·
21 followers

Rebecca Stand and the phone reason

1 Comment

If you saw my tweet from earlier today then you’ll already know the punchline to this particular bug report. But for those of you who don’t follow my every dumb online comment, I present to you the strangest corner case I’ve come across in fifteen years of professional development.

The app I work on during my day job was originally written in Swift in 2016, but some of the larger framework components are older Objective-C code dating back to 2012. The major development focus since I joined the project earlier this year has been on rewriting the UI layer. And given all the upheaval that in itself would cause, we’ve left the majority of the lower level code that talks to our API alone. No reason to throw out working, battle-tested code, right?

Anyway, a week or so ago we received a bug report from a customer who said the app crashed shortly after launch every time. The report they submitted was verbatim as follows…

Change the phone reason to Rebecca Stand and the app will crash

That didn’t give us much to go on, and QA wasn’t seeing any crashes on launch in their testing. And the logs coming to us from our crash reporting service didn’t show any bugs consistently crashing early in the app’s lifecycle. So, we filed the ticket away and moved on with the sprint.

Not to be deterred (and I don’t blame them), the customer got in touch with our 800 number and eventually got escalated to the head of QA.

Fast forward to today. He (the QA head) drives two hours outside Boston to visit the customer in person and install a special TestFlight build with extra logging onto their device.

He reproduces the crash. Every. Single. Time.

Being there in person with a debug build, QA is able to email me the log files directly, and every crash points to the same code…

let df = DateFormatter()
let someDate = df.date(from: dateStringFromServer)!

First off, yes. The problem is obviously that the code is force-unwrapping a string coming back from an API request. That’s a Bad Idea™.

In mine and my coworkers’ defense, this comes from that older layer of code we inherited from another company. This is nothing we’ve ever really touched because, previously, it had always Just Worked™.

Also, in defense of whoever did write the code originally, there was a contract in place with the API that guaranteed the string coming from the server was in the correct format. Sure, it’s still playing fast and loose, but, meh. I’ve certainly done worse things.

But, still. Why wasn’t it crashing for us in our testing? The customer graciously even let us log into the app as them, and we still couldn’t reproduce it on our devices.

I thought back to their original bug report…

Change the phone reason to Rebecca Stand and the app will crash

Who is Rebecca Stand? What is “the phone reason”?

And then I stopped thinking about what line of code was crashing and started thinking more closely about how it could crash.

Apple’s documentation for that method says…

Returns a date representation of a given string interpreted using the receiver’s current settings.

The “receiver’s current settings”.

“Rebecca Stand”.

I called the QA guy still at the customer’s home. “Open up Settings.app and check their date and time settings, language, etc.”

30 seconds of silence and then…

“Phone is set to English. They’re using military time. And, oh. Huh. His phone’s region is…Uzbekistan.”

Phone region. Phone reason.

Uzbekistan. Rebecca Stand.

The customer dictated their bug report to us via email using Siri. They speak English, live outside Boston, but their phone’s region was set to Uzbekistan instead of United States (or anything else more common).

The string coming from the server was the same format it had always been. But this was the first time (to our knowledge) our NSDateFormatter had tried to parse it as an Uzbekistanian format, couldn’t do it, returned nil, and crashed.

I’m not sure what the moral of this bug report is. Maybe to always program defensively? To take the time to really listen to your customers?

Anyway. That was my Monday.

Read the whole story
tingham
1 hour ago
reply
This is fantastic.
Cary, NC
Share this story
Delete

Amazon Will Pay $0 in Taxes on $11,000,000,000 in Profit for 2018

1 Comment

Kristin Myers, reporting for Yahoo Finance:

According to a report from the Institute on Taxation and Economic Policy (ITEP), Amazon will pay nothing in federal income taxes for the second year in a row.

Thanks to the new Tax Cuts and Jobs Act (TCJA), Amazon’s federal tax responsibility is 21% (down from 35% in previous years). But with the help of tax breaks, according to corporate filings, Amazon won’t be paying a dime to Uncle Sam despite posting more than $11.2 billion in profits in 2018.

THat’s fucked up. Not Amazon’s fault. It’s our corrupt tax laws.

Read the whole story
tingham
2 hours ago
reply
I'm staring at this $2k state tax bill I've been trying to pay off since February and wondering what the fuck.
Cary, NC
mxm23
1 hour ago
You need to spend more on lobbying.
Share this story
Delete

The Steven Universe sequel miniseries gets a December release date

1 Comment
Jasper in steven universe future Cartoon Network

Jasper, Eyeball, and Aquamarine are all back — and two of them have fused

Continue reading…

Read the whole story
tingham
3 hours ago
reply
Should have waited for HBO Max
Cary, NC
Share this story
Delete

Energy Startup Backed by Bill Gates Achieves Solar Breakthrough

3 Comments

Matt Egan, reporting for CNN Business:

Heliogen, a clean energy company that emerged from stealth mode on Tuesday, said it has discovered a way to use artificial intelligence and a field of mirrors to reflect so much sunlight that it generates extreme heat above 1,000 degrees Celsius. […]

The breakthrough means that, for the first time, concentrated solar energy can be used to create the extreme heat required to make cement, steel, glass and other industrial processes. In other words, carbon-free sunlight can replace fossil fuels in a heavy carbon-emitting corner of the economy that has been untouched by the clean energy revolution. […] Cement, for example, accounts for 7% of global CO2 emissions, according to the International Energy Agency.

Sounds like a fantastic breakthrough.

Read the whole story
tingham
1 day ago
reply
Plutes gonna plute
Cary, NC
Share this story
Delete

Walmart is offering a great Nintendo Switch Bundle ahead of Black Friday

1 Comment

Stressing about getting the perfect Nintendo Switch deal during Black Friday? You may not need to wait until the big day to get Nintendo’s latest console! Walmart is offering a Switch bundle ahead of Black Friday and grabbing it now means you don’t have to deal with digital or physical lines come next week.

If you head to Walmart’s website, you can get a Nintendo Switch console and Minecraft for $298.60. It’s essentially the normal price of the Switch, plus a free copy of Minecraft to boot! Given that the only other Nintendo Switch bundle announced for US Black Friday is an older console with Mario Kart 8 Deluxe, it might be best to grab this instead of dealing with the holiday rush.

nintendo switch + Minecraft

This Walmart bundle comes with the new Nintendo Switch model, which boasts a higher battery life than the launch model of the system. You can choose between the Red/Blue Joy-Cons or the Grey Joy-Cons, and you’ll get a copy of Minecraft to go with the system.

Of course, if you get a Nintendo Switch, you’ll want more games to go with the new console, and other retailers will have deals on Nintendo Switch titles. In fact, Amazon US currently has The Legend of Zelda: Breath of the Wild for $43.99, which is cheaper than its price during Black Friday. You really can’t go wrong with the latest Zelda title! Meanwhile, you’ll have to wait until Black Friday itself, but if you do you can grab Just Dance 2020 for $26.66. Finally, if Mario is more your speed, at Walmart you can grab Super Mario Odyssey for $49.94.

rca roku 60 inch

There’s still time before Black Friday, but Walmart is already offering some great deals ahead of the biggest shopping day of the year. If you’re in the market for a new TV, this RCA 60″ 4K Roku Smart TV is $319.00. A TV of that size is perfect to game and watch Netflix on!

Waiting on more deals? Make sure to keep an eye on our Nintendo Switch Black Friday deals hub! If you’re looking for something for Sony or Microsoft, you can visit the PS4 Black Friday and Xbox One Black Friday hubs. Happy shopping, and make sure to save some money for the big day itself.

The post Walmart is offering a great Nintendo Switch Bundle ahead of Black Friday appeared first on VG247.

Read the whole story
tingham
1 day ago
reply
They should offer these deals with free Kevlar vests.
Cary, NC
MotherHydra
1 day ago
I missed the news that Popeyes was selling them. HEYOOO
Share this story
Delete

Stadia nearly doubles line-up just days before launch

1 Comment
Ten titles pulled forward to November 19 as Google gears up to take streaming service live
Read the whole story
tingham
2 days ago
reply
um
Cary, NC
Share this story
Delete
Next Page of Stories