Topic

[confirmed] Another Auction Bug

Repro Steps
-----------
Go to the page to start an auction
Pick an item
(Any quantity is fine)
Set the price at some absurdly high price (I picked 4294967295)
Select "Post Auction"

Expected Behavior
-----------------
Not quite sure, but probably a "bad_cost" error

Actual Behavior
---------------
The auction posts with a price of 0 currants

PS - I have two auctions with onions up. Could someone try to get one of them? I don't want actual bids, just one person to try.

Edit - After messing around a bit, the highest successful value is 2147483647 (or 2^31-1)

Posted 14 years ago by Edward Subscriber! | Permalink

Replies

  • imgur.com/b6lYy.png
    Posted 14 years ago by Catriona Subscriber! | Permalink
  • I think I broke it!
    Posted 14 years ago by Edward Subscriber! | Permalink
  • I can confirm the same behavior Dryea recorded when I try to buy a free onion.
    Posted 14 years ago by Eleanor Rigby Subscriber! | Permalink
  • its free but you cant buy it they should really fix that
    Posted 14 years ago by drakodood Subscriber! | Permalink
  • I think I forgot to mention, I cannot normally set the price to 0 or negative currants, so that is okay. It is just these large numbers that seems to break
    Posted 14 years ago by Edward Subscriber! | Permalink
  • That highest successful value happens to be the value of what is sometimes referred to as MAX_INT, the highest integer value that databases and computer systems can use (with this datatype anyway. There are others that allow larger numbers).

    Different platforms and languages do different things to numbers over it, and apparently whatever Glitch uses sets those numbers to 0. I've seen some languages that make those numbers 1 or -1.

    Anyways, they should probably just check if numbers entered are greater than MAX_INT, and if they are, set it to that number or shout a warning at the player. In fact, the warning should go off if the sum of the person's current auctions and currants goes over that number, because from the way it looks right now, you MIGHT be able to send a player's currant count over MAX_INT, which would make their currant count 0. Just a thought. :P
    Posted 14 years ago by Catriona Subscriber! | Permalink
  • Right. Correct me if I'm wrong, but couldn't an unsigned int be valued up to 4,294,967,295 (2^32-1)? Or something larger, like a long (2^64-1 (on the order of 1.8x10^19)) But regardless, going to 0 is a Very Bad Thing.

    Yes, somebody will break every limit given enough time, but I think it would take an obscene amount of time to break 2e19.
    Posted 14 years ago by Edward Subscriber! | Permalink
  • Yups, that's the size of an unsigned int.

    Well, as long as it's *possible*, it needs to be fixed. XD

    eventually.

    But first we have disemprobablization to worry about! DX
    Posted 14 years ago by Catriona Subscriber! | Permalink
  • Yep, that's a bug! Thanks for the thorough bug report guys, much appreciated :)
    Posted 14 years ago by Beefcake Subscriber! | Permalink
  • I hope nobody gets to 2.1 billion XP, currants, or anything else. :) "Level 1?!?" "0 currants?!?"
    Posted 14 years ago by Tingly Subscriber! | Permalink
  • Hi. more news from this. When it expired, it said "Your auction of 1x Onion, for 4294967295 currants, has expired." So the number is stored, just not recognized.

    @Beefcake - We're nerds. What else would we do with our spare time besides using obscure data to find out useless facts about back-end development?

    @Tingly - Or worse: Level -2147483648 and -2147483648 currants. It would take a long time to make that much money back!
    Posted 14 years ago by Edward Subscriber! | Permalink
  • What if it's just not *displayed*?

    That red message could have been a NOt enough CASH message.
    Posted 14 years ago by Catriona Subscriber! | Permalink
  • Hm.... Good point. I'm going to put one on auction for a high value, can you see if that throws the same problem?
    Posted 14 years ago by Edward Subscriber! | Permalink
  • Can't test the theory, as I don't have sufficient currants to purchase your prized onion and the "Buy" button is greyed-out for me.
    Posted 14 years ago by Eleanor Rigby Subscriber! | Permalink
  • Hm! Maybe the graying out is done as a result of a comparison with the displayed price, but the confirmation that displays NO_CASH is done as a result of a comparison with the stored price. ^^

    The idea is that since normally the displayed price and the stored price are the same, users would never get to see the NO_CASH page unless they somehow circumvented the grayness and clicked the buy button anyway.
    Posted 14 years ago by Catriona Subscriber! | Permalink
  • Can you try going to this link?
    alpha.glitch.com/auctions/P...

    This is the link to make the purchase, if the button wasn't greyed out.
    Posted 14 years ago by Edward Subscriber! | Permalink
  • it's a no_cash again, so it does seems to mean not_enough_cash
    Posted 14 years ago by Tingly Subscriber! | Permalink
  • Yay!

    We've helped the devs narrow down a bug now too! ^^
    Posted 14 years ago by Catriona Subscriber! | Permalink
  • Yay! We officially have no life! But it's a good thing. Because without us some poor normal person would find these problems instead.

    Also, I maintain that people who haunt the Bugs forum should get some recognition or award or something!
    Posted 14 years ago by Edward Subscriber! | Permalink
  • Thanks for the follow-through guys. I think we've got it from here. Gonna respectfully lock this topic because the sooner old issues fall off the front page the better :-)
    Posted 14 years ago by Beefcake Subscriber! | Permalink