MV - Shora's Lighting Incompatible With Yanfly's Party System

● ARCHIVED · READ-ONLY
Started by Pearsona 23 posts Page 2 of 2 View original ↗
  1. Just adding to this: max stack size exceeded is virtually always indicative of an infinite loop of call backs.

    The "Stack" is a collection of functions that are being run inside of each other. Think of it like an assembly line. When you make a new actor for instance, you call a constructor. That constructor then calls a setup function to get their name. The "stack" is now the setup function running inside (or on top) of the constructor. The setup script then calls a string function to generate the name. The stack is now the string function inside of the setup function inside of the constructor. When the string function finishes, it passes control back down the stack to the setup function, and the stack is now `setup` <- `constructor` again.

    When you see a max stack size limit exceeded, it's usually because two or more functions keep calling each other back and forth without resolving any of their already running instances. You can fix this by terminating the circular reference or resolving the situation that creates it.

    I hope this was helpful and not just me womansplaining nonsense. I really struggled with circular references when I first started developing professionally.
    caethyril said:
    No worries! :kaohi:


    The first screenshot shows a repeating pattern:
    1. Game_Actor.setup
    2. Game_Actor.initialize
    3. Game_Actor
    4. Game_Actor.actor
    5. Game_Actor.battleMembers (YEP Party System)
    6. Game_Party.leader
    7. _.scanLighting (Shora Lighting)
    8. _.gainItem (Shora Lighting)
    9. Game_Party.gainItem (YEP Item Core)
    10. Game_Actor.tradeItemWithParty
    11. Game_Actor.changeEquip
    12. Game_Actor.equipInitIndependentEquips
    13. Game_Actor.initIndependentEquips (YEP Item Core)
    14. Game_Actor.setup
    It looks like a conflict between Item Core and Shora's Lighting: Item Core uses gainItem during initialisation, but that happens before the actor has been added to $gameActors, so Shora's plugin does not see the leader, and the engine tries to initialise them...causing a loop.

    It's a bit odd that Item Core apparently initialises the items in inventory and then equips them...usually they get initialised directly (Game_Item#setEquip). Like TheAM-Dol says, a different lighting plugin may stand a better chance of being compatible.


    The Call Stack is in reverse order: the top is the most recent call, the bottom is the least recent. So you're actually seeing where the loop starts. Maximum stack size exceeded is where it ends: the engine can tell something is wrong at that point so it just throws an error instead of continuing.
  2. caethyril said:
    No worries! :kaohi:


    The first screenshot shows a repeating pattern:
    1. Game_Actor.setup
    2. Game_Actor.initialize
    3. Game_Actor
    4. Game_Actor.actor
    5. Game_Actor.battleMembers (YEP Party System)
    6. Game_Party.leader
    7. _.scanLighting (Shora Lighting)
    8. _.gainItem (Shora Lighting)
    9. Game_Party.gainItem (YEP Item Core)
    10. Game_Actor.tradeItemWithParty
    11. Game_Actor.changeEquip
    12. Game_Actor.equipInitIndependentEquips
    13. Game_Actor.initIndependentEquips (YEP Item Core)
    14. Game_Actor.setup
    It looks like a conflict between Item Core and Shora's Lighting: Item Core uses gainItem during initialisation, but that happens before the actor has been added to $gameActors, so Shora's plugin does not see the leader, and the engine tries to initialise them...causing a loop.

    It's a bit odd that Item Core apparently initialises the items in inventory and then equips them...usually they get initialised directly (Game_Item#setEquip). Like TheAM-Dol says, a different lighting plugin may stand a better chance of being compatible.


    The Call Stack is in reverse order: the top is the most recent call, the bottom is the least recent. So you're actually seeing where the loop starts. Maximum stack size exceeded is where it ends: the engine can tell something is wrong at that point so it just throws an error instead of continuing.
    Damn… thank you so much for all of your insight. I really wanted to see if this could be fixed, but I know when I’ve been beat and man, this unsquashable bug has definitely won this fight.

    Next time I work on my project, I’ll switch out Shora’s Lighting for Community Lighting and see if that works. It’s a shame, Shora’s plug-in is definitely high quality and well made, it’s just that something went totally pear-shaped for me specifically lol. Oh well.

    Hopefully if someone else later down the line has the same issue, this thread will at least help them figure out what to do.
  3. The issue is now fixed :D.
    It is now possible to use the item lighting function freely with Yanfly's Party System and Item Core.
    Please check the new version (1.9.4) to see if you have any issue!