RMMV Finding an infinite loop / parallell process?

bishiba

Adept
Veteran
Joined
Apr 6, 2016
Messages
277
Reaction score
161
First Language
Swedish
Primarily Uses
N/A
Hello!

So I do not think that I have an infinite loop running or anything. But I have occassionally experienced lag...
So is there any way to see inifinte loops in the console using breakpoints or similar. And the case here would be that I would not be able to find the loop in the code.

And in terms of parallell processes the question is essentially the same. I was thinking of adding a console log after the interpreter. But I don't want to do that continuously, some of them are needed tbh. So I would probably make an if statement that checks a self var and ensures that if the self var is less than maxAllowedLooping it doesn't log. As the act of logging actually takes quite a bit of cream from the engine.

But perhaps there is a better way?

Best regards,
 

Milennin

"With a bang and a boom!"
Veteran
Joined
Feb 7, 2013
Messages
3,017
Reaction score
2,277
First Language
English
Primarily Uses
RMMV
Just put a sound effect or something in the event you suspect is looping and you find out fast enough.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
34,763
Reaction score
8,975
First Language
German
Primarily Uses
RMMV
not really - and always remember that there can be a different cause for the lag.

easiest to find are parallel processes in common events as that will only require a check on the database.
on the other hand, common event parallels are the only ones that can cover multiple maps - in all other cases the parallel process has to be on the map where it causes lag, and that reduces the number of events to check quite a bit.
 

bishiba

Adept
Veteran
Joined
Apr 6, 2016
Messages
277
Reaction score
161
First Language
Swedish
Primarily Uses
N/A
not really - and always remember that there can be a different cause for the lag.

easiest to find are parallel processes in common events as that will only require a check on the database.
on the other hand, common event parallels are the only ones that can cover multiple maps - in all other cases the parallel process has to be on the map where it causes lag, and that reduces the number of events to check quite a bit.
Yeah certainly, many, many reasons for lag. But was hopeful that there would be an easy way to just check if there is a loop somewhere. But this would still be highly unlikely, every time I use a loop there's a reason for the loop, so if it causes infinity it would be a noticeable amount of lag.

The question came up because I had issues the other day where the node would hit 50-60% load in process after maybe 10-15 minutes and I thought that perhaps there's a buildup of some loop. The compared value would be between 5-10 % with a 4 Ghz processor under normal circumstances.

Yeah, I imagined there would be an easy way to check the parallell processing. So, if I ever feel it is lagging I'll just go through the events on the gamemap and then the database for common events. Thanks! :)

Just put a sound effect or something in the event you suspect is looping and you find out fast enough.
300 maps, 10-50 events per map :p Excluding another 300-400 common events. Excluding the dangers of javascript loops. And I do not believe there are any loops, but I was thinking if there is an easy way to check for it, then I could just see if there's a leak somewhere, which I honestly don't think there is.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
34,763
Reaction score
8,975
First Language
German
Primarily Uses
RMMV
The question came up because I had issues the other day where the node would hit 50-60% load in process after maybe 10-15 minutes and I thought that perhaps there's a buildup of some loop.
no, a loop would be a constant drag - this sounds more like a memory leak or a bad/failed iteration process from a plugin.
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
4,897
Reaction score
1,878
First Language
Dutch
Primarily Uses
RMMV
I remember Ocram have a plugin that can run many parallels events,
but only change the event or value from it if it changes, otherwise,
it doesn't loop as parallel if the value remain the same.

there might be something that you can use, but you can ask for
permission if you need some of the code? or use that plugin
to stop looping? if value is the same?
 

bishiba

Adept
Veteran
Joined
Apr 6, 2016
Messages
277
Reaction score
161
First Language
Swedish
Primarily Uses
N/A
no, a loop would be a constant drag - this sounds more like a memory leak or a bad/failed iteration process from a plugin.
I think it probably happend since I was continously changing window functions and such. But I guess it will show soon if it will happen again.

I remember Ocram have a plugin that can run many parallels events,
but only change the event or value from it if it changes, otherwise,
it doesn't loop as parallel if the value remain the same.

there might be something that you can use, but you can ask for
permission if you need some of the code? or use that plugin
to stop looping? if value is the same?
Thanks, I shall look into that :)
 

Latest Threads

Latest Posts

Latest Profile Posts

Gonna take a break from helping people with resource requests, it has been too much of a disappointment lately.
whats the easiest way to add an on-map command in RPG Maker? like when you press a button the character just jumps or runs when its held? should i get an ABS plugin and customize?
Thinking of doing a crowdfunding kind of thing on my ko-fi page, but i don't have an audience :kaoswt2: and i don't want to go to the big crowdfinding sites cause i can't guarantee that i'll complete the project. It's just for fun but i still need some more tools. Anyone else in the same boat? :kaodes:
Pretty proud of this train station i'm making!
unknown.png
Steam has announced a new feature to let people switch between playing on PC and on Steam Deck with the same save. I'll come back to add support for it to my steam plugins when the time comes.

Forum statistics

Threads
118,698
Messages
1,117,991
Members
155,822
Latest member
beastyquell
Top