More on the F12 Bug or Nuisance
#1
The initialize and dispose methods available in pure Ruby or RGSS are not the same as the CRuby methods I mentioned in my previous post in another thread, they handle the C structs and the hooks and memory management calls needed there. The RGSS dispose methods don't handle anything but the scene elements that were visible and invisible back then. Yeah, the C or C++ part destroys the scene elements later on. Now that it's clear for all our readers, I gotta say that the alias method included in the CRuby version of the Module class isn't as reliable as it should be. Usually CRuby checks a table that includes every variable, Constant and even method names. If CRuby really double checked that the alias method did not exist, the problem would be solved but it doesn't do that against common sense. A CRuby or pure Ruby fix could solve it by just checking whether or not the method name is found among the public method list of any class. As you might remember, the classes and modules are always open so reloading isolated scripts or even the $RGSS_SCRIPTS array (after re-reading the Scripts.rxdata file) doesn't unhook the aliases nor clears many class and module stuff from CRuby but just variables including the global ones. Implementing my first or second idea would permanently solve the reset or F12 bug and stack overflow errors would not show up at all unless you make another kind of mistake like not breaking a loop or for loop or while loop properly.

It's not just argumentative but based in the very design of the CRuby or C or C++ part of the engine. The SDL section doesn't really need to handle that, if you are depending on it in the first place. Yeah, you could tell all scripters they should use either a 3 or 4 line solution or the unless modifier to prevent the stack overflow yourself and I won't say it's wrong. The point is that a programmer should think on this kind of issues and reduce the probability of letting the scripters fall in the stack overflow trap that is the actual bug behind the F12 badly implemented feature that Brainless never cared to fix nor prevent in any of their versions of their engines that included scripting with RGSS.
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9

Maranatha!

The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.

[Image: SP1-Scripter.png]
[Image: SP1-Writer.png]
[Image: SP1-Poet.png]
[Image: SP1-PixelArtist.png]
[Image: SP1-Reporter.png]

My Original Stories (available in English and Spanish)

List of Compiled Binary Executables I have published...
HiddenChest & Roole

Give me a free copy of your completed game if you include at least 3 of my scripts! Laughing + Tongue sticking out

Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Reply }




Users browsing this thread: 1 Guest(s)