RMMV Finding an infinite loop / parallell process?

bishiba

Adept
Veteran
Joined
Apr 6, 2016
Messages
278
Reaction score
163
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,206
Reaction score
2,563
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
38,009
Reaction score
10,570
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
278
Reaction score
163
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
38,009
Reaction score
10,570
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
7,256
Reaction score
2,874
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
278
Reaction score
163
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

Gnyaaaa! Invisible comments on YouTube!!!
When I learned about multithreading in C++, one of the first things was that while heap is shared, each thread has its own stack and it's impossible to access another thread's stack.
So I wrapped the variables into a static class and passed its address to another thread. And it worked.
More characters from my game )
bandicam 2023-03-31 07-42-50-549.png
ScreenShot_3_30_2023_10_5_45.pngstarted working on a new area today. It's a warped version of being inside someone's home. Also moved the face and Panic gauges to be out of the way of the map names. switching moods actively changes what you encounter. Calm is normal while anxious is all the way up to Manic.
Ads.png
Some advertisements for M

And yes kiddos smoking, alcohol and too much coffee or tea are bad for you - but in the 20's we didnt know that yet xD

Forum statistics

Threads
129,980
Messages
1,206,712
Members
171,214
Latest member
Ninth_Octave
Top