Spontaneous Shutdown

  • m_shinoda
    11th Jun 2012 Member 0 Permalink

    I created a shortcut on my desktop for powder-legacy.exe, opened it, and started playing around. When I started copy-pasting, PT started exhibiting slow FPS (<35) and lagging while loading saves. Soon enough, after copying a small section of the screen, it wouldnt paste it back at :?. When I repeated the CTRL-V again, TPT shut down. What is going on? Is it my computer or what?

    -----------------------------------------------------------------------------------------------------------------------------

    Also,  I need help running this script. Here's the thread regarding it: https://powdertoy.co.uk/Discussions/Thread/View.html?Thread=13911

  • jacob1
    11th Jun 2012 Developer 0 Permalink
    @m_shinoda (View Post)
    I can't reproduce the problem, so I don't know what could be wrong. Does it only happen when you create a shortcut, and does it always happen when you do this?



    I tried running the script too, but I got the same error you did. The bmp files have to be saved in a very specific format, but none of the formats in paint worked. The script expects things to be in exactly the right spots, but if the format isn't right, it doesn't find what it needs and reads past the end of the file. I do have a program that was posted on here a long time ago that takes png? files and creates a lua script that creates a picture, but the original link was removed. Maybe I'll post it again later.
  • m_shinoda
    11th Jun 2012 Member 0 Permalink

    @jacob1 (View Post)

     Well it happens when I create a shortcut, but right now It shut down after I opened it from the original directory (powder.exe this time). My theory is that I'm running lots of programs at once (I usually do) and my virtual memory is decreases enough to make tpt force close.

  • me4502
    11th Jun 2012 Member 0 Permalink

    Do you get random walls spawning in before it crashes? If so you have an overflown thingy in pmap (i think?)... I can't be sure as I haven;t done any tpt modding in ages,

  • m_shinoda
    11th Jun 2012 Member 0 Permalink

    @me4502 (View Post)

     No, what I just found out is that the save I was working on right before it crashed displays a "save data must be corrupt" error. I can fix this by going through the history and going on from there.

  • jacob1
    11th Jun 2012 Developer 0 Permalink
    @m_shinoda
    TPT allocates memory a lot and then uses it without checking if it actually could allocate the memory. If you don't have any memory left, it will cause it to crash. I'm fixing it now, and then maybe an official developer could merge it in, because it is a crash fix. I already fixed saving without memory, now i'm fixing things in interface.c. You just won't be able to save or open any interfaces when you have no memory left with this fix, instead of a crash.

    Edit: commit is here
  • m_shinoda
    11th Jun 2012 Member 0 Permalink

    Thank you, I fixed the problem. I just dont use more than 8 applets at once.