Replies

Jan 25, 2018 8 years ago
arixen
User Avatar

I am using Chrome on a 64 bit Windows 7 laptop.

I finished a game of Blackout and clicked the alert link, this happened:

Warning: A non-numeric value encountered in /var/app/current/games/blackout_shared.php on line 133 Warning: A non-numeric value encountered in /var/app/current/games/blackout_shared.php on line 144 Fatal error: Uncaught DivisionByZeroError: Modulo by zero in /var/app/current/games/blackout_shared.php:144 Stack trace: /var/app/current/games/blackout_shared.php(93): blackoutAchievements(Array, Array) /var/app/current/games/blackout.php(45): checkEnd(Array, Array) {main} thrown in /var/app/current/games/blackout_shared.php on line 144

I play pretty regularly and haven't seen this before. Backed up the page and tried clicking the alert link again and got the same error.

For what it's worth, I'm pretty sure I did get paid the sP earned from the game (only once). I have no idea whether an alert was set, but can try to remember to update this next time I'm back with whether the alert went off or not. Since I do blackout in concert with the crypts, I should be able to tell if the crypt alarm goes off and blackout doesn't.

[edit] Since the error occurred, the alert (both of them) did get set because I got two notifications. However, I am unable to play Blackout because all I see when I try to play is the same error and I can not start a new game.

I have tried clearing my cache, logging out of Subeta and back in, and even logging out and restarting Windows but still getting the error.

Looks like maybe the game that got the error never ended properly since I am unable to go to https://subeta.net/games/blackout.php but keep winding up at https://subeta.net/games/blackout.php?act=play (which is the page displaying the error) even if I manually type in the shorter url.

Jan 25, 2018 8 years ago Official
Bug
User Avatar
Segfault

I will fix it :)

[edit] Pushed a fix! Let me know~

🐝 ☕ bug (he/him) | your friendly neighborhood code wrangler. stay in the loop! join and check out the latest admin post highlights

Jan 25, 2018 8 years ago
arixen
User Avatar

- not yet, now it says this:

Warning: A non-numeric value encountered in /var/app/current/games/blackout_shared.php on line 18 Warning: A non-numeric value encountered in /var/app/current/games/blackout_shared.php on line 29 Fatal error: Uncaught DivisionByZeroError: Modulo by zero in /var/app/current/games/blackout_shared.php:29 Stack trace: /var/app/current/games/blackout.php(55): showBoard(Array, Array, '1') {main} thrown in /var/app/current/games/blackout_shared.php on line 29

so the problem is still there, but it's moved

Jan 25, 2018 8 years ago Official
Bug
User Avatar
Segfault

Pushed another fix. Just keep pasting the errors if you get them, it's an old file xD

It's not that the problem is moved, it's that there's more than one problem but we only see one at a time lol

[edit] As always though, 5-10 min wait before the fix goes live!

🐝 ☕ bug (he/him) | your friendly neighborhood code wrangler. stay in the loop! join and check out the latest admin post highlights

Jan 25, 2018 8 years ago
arixen
User Avatar

Quote by Bug
It&;s not that the problem is moved, it&;s that there&;s more than one problem but we only see one at a time lol
So true. Wow - that really brings back memories of my software development/maintenance days. :-)

Now things seem to be getting really interesting. The game starts, but does this:

Then when I try to play (note - it started saying I had already made 1 move) it does this: Warning: A non-numeric value encountered in /var/app/current/games/blackout_shared.php on line 60 Warning: A non-numeric value encountered in /var/app/current/games/blackout_shared.php on line 62 Warning: A non-numeric value encountered in /var/app/current/games/blackout_shared.php on line 62 Warning: A non-numeric value encountered in /var/app/current/games/blackout_shared.php on line 63 Fatal error: Uncaught DivisionByZeroError: Modulo by zero in /var/app/current/games/blackout_shared.php:63 Stack trace: /var/app/current/games/blackout_ajax.php(16): makeMove(Array, 1, Array) {main} thrown in /var/app/current/games/blackout_shared.php on line 63

This time though, I can start again (back to the image, so still not working right, but no longer stuck in the old game).

Jan 25, 2018 8 years ago Official
Bug
User Avatar
Segfault

Urgh I'm starting to think we need to just rewrite this file... So far, these errors have been type coercion related, or related to failing to do a zero check before division and modulo. But this is a bit of a headache because these things are everywhere in this file. PHP7 is just a lot more vocal about them :P

Anyway, pushing another fix in a sec to address these new errors x_x

🐝 ☕ bug (he/him) | your friendly neighborhood code wrangler. stay in the loop! join and check out the latest admin post highlights

Jan 25, 2018 8 years ago
arixen
User Avatar

Quote by Bug
I&;m starting to think we need to just rewrite this file...
I was actually just wondering if it wouldn't be easier to just recode the game. :-)

Interesting that the game has survived all this time if it regularly divides by zero. Actual type checking is probably a good thing but I can see it would be a serious headache in an old file that was careless about it. Ouch!

By the way - the "give up" link is now available and I'm wondering if you would like me to try that? It would probably mean a one hour wait before I could try anything else afterward, but that's okay with me if it would help any.

[edit] Okay - the game still is spread out in one big line and starts at 1 move rather than 0, but I can actually play without getting another error. Not sure I can successfully win in this format, but I'll try and let you know what happens if I manage it.

[edit] Finally figured out how to "win". And then got this:

When I clicked the alert link, that worked as expected, so you have definitely fixed the original problem. :-)

I'll let you know what happens when I am able to start a new game.

Jan 25, 2018 8 years ago
Lypsyl
is a billionaire
User Avatar
Crotchety

I'm on firefox 57, windows 10 laptop.

Well I'm suddenly having problems with this game. I tried to play and its not switching out the squares properly.

When you click a space it should switch all the tiles around it, but its just switching the tiles on the sides while leaving the top and bottom tiles the same.

SPOILER (click to toggle) I put the cursor when the white + shows on the first image, the 2nd image is after I click. The 1 and 2 tiles should be black not blue.

Jan 25, 2018 8 years ago Official
Bug
User Avatar
Segfault

I'm gonna temporarily revert it to back when you first made this topic, since my fixes are breaking more significant things I think x_x

I have to go for now. I'll revisit this when I wake up and let you know. Thank for your patience. :)

🐝 ☕ bug (he/him) | your friendly neighborhood code wrangler. stay in the loop! join and check out the latest admin post highlights

Jan 25, 2018 8 years ago
arixen
User Avatar

- thank you for all your help - it is much appreciated. And sleep is important! Having been on your end of the code, I understand that fixes are not always easy or quick (or sometimes, even possible).

Just FYI, now that you've put back the "old" game and I'm no longer stuck in the game with the error, it seems to be working for me again. My alert went off and I just played a full game (in a rectangle, not a big long line!), received my sP and was able to set a new alert. I usually play every hour when I'm on Subeta, so I'll definitely let you know if I see any other errors, but for now all is good.

Jan 25, 2018 8 years ago
Lypsyl
is a billionaire
User Avatar
Crotchety
May 10, 2018 7 years ago
Sylvanas
is fangtastic
User Avatar

Hi! I was nudged to this topic by another staff member. I too have been having a bug prevent me from playing. It started the 5th of May (so about 4 days ago). This is the error it gives me.

Warning: A non-numeric value encountered in /var/app/current/games/blackout_shared.php on line 133 Warning: A non-numeric value encountered in /var/app/current/games/blackout_shared.php on line 144 Fatal error: Uncaught DivisionByZeroError: Modulo by zero in /var/app/current/games/blackout_shared.php:144 Stack trace: /var/app/current/games/blackout_shared.php(93): blackoutAchievements(Array, Array) /var/app/current/games/blackout.php(54): checkEnd(Array, Array) {main} thrown in /var/app/current/games/blackout_shared.php on line 144

❤️ ❤️ ❤️ ❤️ ❤️

❤️ My Wishlist ❤️

May 10, 2018 7 years ago Official
Bug
User Avatar
Segfault

We're aware! Unfortunately this game needs to be rewritten or at least majorly overhauled. It's definitely on the list though! I'm getting through my list as quickly as I can so hopefully this will get done sooner rather than later :)

🐝 ☕ bug (he/him) | your friendly neighborhood code wrangler. stay in the loop! join and check out the latest admin post highlights

May 10, 2018 7 years ago
Sylvanas
is fangtastic
User Avatar

- Thanks for the reply & letting me know ^__^ I'll be looking forward to the new and improved coding once it's ready!

❤️ ❤️ ❤️ ❤️ ❤️

❤️ My Wishlist ❤️

Please log in to reply to this topic.