Powder Toy Crash

  • belugawhale
    7th May 2014 Member 0 Permalink

    Apparently TNT lit with electricity or fire crashes when it is drawn in a zig-zag form, which only works vertically.

    I wonder why this happens, could someone explain?

    Here is the save:

  • greymatter
    7th May 2014 Member 0 Permalink
    @belugawhale (View Post)
    Probably that's just too much calculations for TPT to handle..
  • jacob1
    7th May 2014 Developer 0 Permalink
    it's actually a stack overflow caused by excessive recursion. Rewriting flood_prop should fix it, but obviously we are all lazy. The crash has been there forever anyway :P. I'm sure you'll see it fixed eventually.
  • h4zardz1
    7th May 2014 Member 0 Permalink
    Fire overflow> tries to remove it> Fire overflow
    and so on?
    2
    Edited 2 times by h4zardz1. Last: 7th May 2014
  • boxmein
    7th May 2014 Former Staff 0 Permalink
    @jacob1 (View Post)
    well reduce recursion and build loops instead! :D
    #c-programming-advice
  • h4zardz1
    7th May 2014 Member 0 Permalink
    @boxmein (View Post)
    recursion is a kind of loop, but loop is not totally recursion. (which is, not crashing but lags a lot)
  • detroit671
    7th May 2014 Member 0 Permalink

    Wholey Cow! never seen TPT crash that fast and hard!!

  • mniip
    7th May 2014 Developer 0 Permalink
    @h4zardz1 (View Post)
    any loop can be rewritten as a recursion, any recursion can be rewritten as a loop (but not always in an efficient way)
  • MiningMarsh
    8th May 2014 Member 0 Permalink

    Just rewrite it as tail recursive, gcc supports it. Easier than rewriting it entirely to a loop (probably, though it might just be nicer as a loop).

    Edited once by MiningMarsh. Last: 8th May 2014
  • 2393633
    28th Jun 2014 Member 0 Permalink

    my windows 8 pc didnt crash! but my aspire windows 7 did!?

    Edited once by 2393633. Last: 28th Jun 2014