Announcement: Be excellent to each other.


Caravel Forum : DROD Boards : Bugs : Scripting Memory Mismanagement (Smart Pointers can't save you now)
New Topic New Poll Post Reply
Poster Message
hyperme
Level: Smitemaster
Avatar
Rank Points: 1062
Registered: 06-23-2006
IP: Logged
icon Scripting Memory Mismanagement (+1)  
Generating lots of scripted NPCs using generate entity lags the game. Also, Dischorran's troll contest entry caused DROD to crash for me, which doesn't seem entirely unintentional on his part.

Now, here's the trick: this happens even if you use the End or Imperative Die commands. Active NPCs devouring the memory isn't something anyone can really fix. I don't know the fancy inner workings of how undo works, so it might be impossible to clean up Ended NPCs. But if it isn't, Generate Entity is kind of a memory leak.

____________________________
[Insert witty comment here]
Qzvlkx?
04-02-2016 at 08:58 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
uncopy2002
Level: Smiter
Rank Points: 431
Registered: 07-28-2014
IP: Logged
icon Re: Scripting Memory Mismanagement (0)  
I think that's prone to happen as long the game's instantiating and destroying objects (note the Unity-esque terminologies, because they hit upon this very oftenly) per step.

The common solution to this problem is to use pooling, but that probably requires a massive change to the DROD engine. Or we may try to do that in our scripting, but this is not always possible.
04-03-2016 at 11:34 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3734
Registered: 12-28-2004
IP: Logged
icon Re: Scripting Memory Mismanagement (0)  
I think we already talked about this before in the chat so maybe I am simply repeating myself, but there aren't any game-scope memory leaks in the game. The NPCs are not prunned from the memory until you leave the room, but you need to create millions of NPCs for,it to have any conceivable impact. Just see how much that entry has to abuse things for problems to start happening.

For me it's a problem in theory, not in practice.

Edit: Four years later I stand corrected.. Marking as "not a bug" because it's a duplicate.

____________________________
My website | Facebook | Twitter

[Last edited by skell at 10-09-2020 03:15 PM]
04-03-2016 at 12:41 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Bugs : Scripting Memory Mismanagement (Smart Pointers can't save you now)
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.