"RGSS3 player STOPPED WORKING", again ...

● ARCHIVED · READ-ONLY
Started by gecebd 15 posts View original ↗
  1. Hello,

    My name's Guillaume, I'm from France (sorry then for mistakes !) and I'm actually developping a game since one year, but I must admit that I'm using planty of scripts which probably could be the problem of my game ...

    When I start a battle, I have this message ; "rgss3 player stopped working" - I retry and the game works. Seems to be aleatory but linked with the battle system. I learned about "memory leak" which seems to be a problem for a lot of games, but I also think that the trouble could be linked with my "hp bar script" by VM.

    I don't know what to do to resolve my problem, my programming level is zero ...

    Thanks a lot for helping, see you soon !

    Guillaume
  2. Do you use the steam version or the regular version of Ace? It seems to be that this happens more often with steam running in the background.

    If reinstalling the program (in case of damaged files) doesn't help, then you need to check for the programs running in the background, one of them might cause that problem.

    Sometimes (depending on your window version) it also helps to set compatibility of the editor to XP, SP3 and/or running the program as administrator.

    Sorry for being so unspecific, but that error rarely pops up and we haven't found a reason for it yet, only ways to minimize the effect.

    Most probably there is no single reason, but several different causes on the user's computers that can result in these problems, and we'll have to search for a new cause everytime someone reports problems...
  3. Hi Andar,

    Thanks a lot for your answer ! I'm currently using the regular version of RPG Maker, this is the reason why I did not understand the causes of this problem which seems to happen on steam version only ...

    I'm trying to check if there's no program in the background which could be the principal cause of this error. Don't you think it could be linked with a script ? And please, what's exactly the "memory leak" and how to "resolve" this memory problem ? I read that it could be a cause of the error.

    Thanks a lot !

     
  4. A "memory leak" is a special kind of programming error.

    Basically, if you want to store some data for later use, you need to tell the computer that he reserves part of the memory for this as an storage area.

    Usually you tell the computer that you no longer need that data after a while, especially if that was temporary data - because then the computer can re-use that part of the memory for other, later storage.

    Now, if the programmer reserved a temporary memory area but forgot to release it after that data is no longer needed, then in the next program cycle the next part of the temporary data needs a storage area again, gets this RAM - and again it's never released.

    If such a program runs a while, the available free memory becomes smaller, because more and more of the RAM is reserved but no longer used - the free memory is "leaking" away from the computer. In modern computers, Windows can compensate a while by transferring RAM to the HDD (resulting in the computer becoming much slower) - but even that will fail if too much physikal RAM is reserved away from the system (resulting in freezes or bluescreens or other errors).

    I don't think this is a memory leak, because those problems are there for everyone (as they're programming errors, not part of a specific computer) and that error is not often enough to be such a problem.

    It might be that a strange combination of scripts caused such a memory leak by using similiar variable names inside the same class, but I consider that unlikely. Only if you used a really rare combination of scripts or wrote your own to add them this might be the cause.
  5. I have found this can happen if a script doesn't dispose things properly.


    http://forums.rpgmakerweb.com/index.php?/topic/1067-graphical-object-global-reference


    Try this script out. It generates a .txt file with critical objects that could cause this error that might lead you to finding the cause.


    To use in VX Ace, change the last line from

    Code:
    load_data("Data/Scripts.rvdata").each_with_index {|s, i| ScriptNames[i] = s[1] }
    to
    Code:
    load_data("Data/Scripts.rvdata2").each_with_index {|s, i| ScriptNames[i] = s[1] }
  6. @Galv

    Please don't refer that script for ACE issues. The script was made for VX to detect a very specific set of circumstances which will lead to a crash. In ACE it can be used to help identify Sprites that weren't properly disposed, which is good practice, but in ACE there is also no evidence that this would be a memory leak (if the reference to the object is completely removed, GC seems to take care of them just fine). It definitely won't PREVENT a memory leak, in fact, its function is exactly the opposite, to keep the Sprites in memory indefinitely if their viewports were disposed and the sprite was not before, therefore, it actually CAUSES a memory leak (though localized only to that one run instance of the game) to prevent the crash so it can be logged and successfully debugged. This enforced leak has very little overhead (Sprite objects are very tiny, its the bitmaps that use up the memory) and the memory is reclaimed when the game is closed so its not a "true" memory leak and it can and does prevent crashes in VX, but it has never been shown to do anything for VX ACE in multiple test cases. As stated in the script thread, it's better to use the script to fix the errors that cause the crash, but most people seem to use it to stabilize their game instead of actually fixing anything permanently. Just using this script and not fixing things won't do anything for ACE. You may be on the right track about disposing things though, as this can be related to another problem (see below).

    (If you have a test case where this issue DOES pop up in ACE and can be fixed by this script, I would love to hear about it, so please PM me)

    @gecebd

    Do you have any problems with "RGSS3 player STOPPED WORKING" in a project without custom scripts installed? Have you ever had problems with it crashing completely without an error message at all? What are the fault address, event name, and exception code for the error? Have you tried running with compatibility/as an administrator as Andar suggested? (and also tried turning off Steam completely if it is running AT ALL, and checking what else is running in the background such as aggressive antivirus software) What setting are you using for DEP (Data Execution Prevention) in Windows? If you are in OptIn (aka Whitelist, "Turn on DEP for all programs and services except those I select") mode, you may need to add the Game.exe to the exempt list.

    If the issue is a specific script, I've found that this can be caused by exceeding the GDI (graphical device interface) object limit. This can occur if more than 10000 Bitmaps are loaded in a single instance. This can be tangentially associated with not properly disposing of sprites (some Sprites dispose their bitmaps when they dispose themselves) however, in general cases this is not enough to cause a crash. A handful of sprites not disposing on scene switch would take hours to reach the numbers required for instability, and also, GC does reclaim abandoned bitmaps even if they have not been disposed. If my script were logging enough to approach a crash level, the game would be unplayable due to amount of time taken up by file writes alone. If GDI limit is the issue, the culprit would likely be a script that creates a new bitmap every frame and abandons rather than disposes the old one, which can eventually outpace the GC, reach the limit, and crash. This may or may not be accompanied by the game experiencing jerking (occasional short pauses while having an otherwise steady framerate). The #1 culprit in this case would be using an old template project or old DLL from before the Erase Picture issue has been fixed. If you think this is happening, check the update_bitmap method (lines 39-41) in Sprite_Picture, if you see

    def update_bitmap self.bitmap = Cache.picture(@picture.name) endReplace it with:

    Code:
      def update_bitmap    if @picture.name.empty?      self.bitmap = nil    else      self.bitmap = Cache.picture(@picture.name)    end  end
    If none of that works or it still seems to be a script issue, I would love to take a look at your scripts.rvdata2 file. If the crash is reproducable, sharing your script with me may help others if I can identify what is causing the crash.EDIT: Actually, I'd like a copy of your scripts file either way. I've been searching for a test case where script files can cause a Game.exe crash so I can make a script to debug it like I did for VX.
  7. @gecebd


    Okay, after talking with Galv I was able to confirm the error my VX script deals with does happen in VX ACE. The ACE version of this crash is much rarer and much harder to reproduce but has similar circumstances, so you may have a different problem, but this is at least worth a shot.


    Try this script:


    http://forums.rpgmakerweb.com/index.php?/topic/17400-graphical-object-global-reference-ace/


    If you get a log file, post it here. I also need your full scripts.rvdata2 file or at the very least the script mentioned in the log file to attempt a full fix.
  8. Ok Mithran, thanks A LOT for your help ! This is my rapport ;

    Code:
    Time: 2013-08-26 18:28:53 +0200CRITICAL OBJECT #<Sprite_Base:0x7c226ec>In Scene Scene_BattleCreation Stack:: Script 0150 -- hp, Line: 87:in `update_hp_bar'Script 0150 -- hp, Line: 82:in `update'Script 0151 -- battle2, Line: 87:in `update'Script 0049 -- Spriteset_Battle, Line: 333:in `block in update_enemies'Script 0049 -- Spriteset_Battle, Line: 333:in `each'Script 0049 -- Spriteset_Battle, Line: 333:in `update_enemies'Script 0049 -- Spriteset_Battle, Line: 311:in `update'Script 0049 -- Spriteset_Battle, Line: 20:in `initialize'Script 0116 -- Scene_Battle, Line: 146:in `new'Script 0116 -- Scene_Battle, Line: 146:in `create_spriteset'Script 0116 -- Scene_Battle, Line: 13:in `start'Script 0129 -- Capture, Line: 346:in `start'Script 0099 -- Scene_Base, Line: 12:in `main'Script 0122 -- debogue, Line: 231:in `main'Script 0006 -- SceneManager, Line: 23:in `run'Script 0159 -- Main, Line: 7:in `block in <main>':1:in `block in rgss_main':1:in `loop':1:in `rgss_main'Script 0159 -- Main, Line: 7:in `<main>'ruby:in `eval'-----Time: 2013-08-26 18:31:45 +0200CRITICAL OBJECT #<Sprite_Base:0x7c2a93c>In Scene Scene_BattleCreation Stack:: Script 0150 -- hp, Line: 87:in `update_hp_bar'Script 0150 -- hp, Line: 82:in `update'Script 0151 -- battle2, Line: 87:in `update'Script 0049 -- Spriteset_Battle, Line: 333:in `block in update_enemies'Script 0049 -- Spriteset_Battle, Line: 333:in `each'Script 0049 -- Spriteset_Battle, Line: 333:in `update_enemies'Script 0049 -- Spriteset_Battle, Line: 311:in `update'Script 0049 -- Spriteset_Battle, Line: 20:in `initialize'Script 0116 -- Scene_Battle, Line: 146:in `new'Script 0116 -- Scene_Battle, Line: 146:in `create_spriteset'Script 0116 -- Scene_Battle, Line: 13:in `start'Script 0129 -- Capture, Line: 346:in `start'Script 0099 -- Scene_Base, Line: 12:in `main'Script 0122 -- debogue, Line: 231:in `main'Script 0006 -- SceneManager, Line: 23:in `run'Script 0159 -- Main, Line: 7:in `block in <main>':1:in `block in rgss_main':1:in `loop':1:in `rgss_main'Script 0159 -- Main, Line: 7:in `<main>'ruby:in `eval'
  9. I need the full script also so I can attempt a fix.
  10. There is a typo on line 154 of "hp"

    Code:
        @hp_bar.dispose if @hpbar
    Should be:
    Code:
        @hp_bar.dispose if @hp_bar
    After you do that, delete the old GOBJ.txt log file and see if any more appear. If there is no more log after a while, try completely removing the debug script to see if the crashes have stopped.
  11. Ok Mithran, I'm gonna check it tonight and I'll let you know, thank you very much
  12. Just wanted to follow up and see if this solved it, or if it ended up being some other issue.
  13. Hi Mithran, so sorry, I had no time to check it since the last time.

    There's still a problem with my game ... This is my log. Please check it, I do no understand at all what it means !

    Thanks a lot !

    gobj.txt
  14. The script seems to still be logging the HP bar as the main error, as well as several other minor errors that should not cause a crash. Did you apply the fix from earlier in this thread? Does having the script installed lessen or stop the crashes? Please re-send me your project file and I will take a look after work.