- Joined
- Aug 7, 2013
- Messages
- 1,338
Hi,
I've been running into this error quite often when deleting custom objects in the object editor.
At first I thought it was because of using Lua object generation and writing to a bad/non-existent field.
So I did the following test with 6 separate object generation scripts, call them A, B, C, D, E, and F.
I ran them each sequentially and then deleted all the custom made objects to see if I could re-create the crash and narrow down where I had a bad statement in my Lua script.
Thus my tests were like this:
call script A, save map, delete all objects
call script A, B, save map, delete all objects
call script A, B, ..., save map, delete all objects
*********************
If the map crashed whenever adding a new script and deleting those objects, I would want to say there was an error in the script. In my first instance, it seemed like script D was causing the crashes.
But then, in another test, adding in the sequence A, B, C caused crashes. So I thought it was script C.
I then isolated both scripts D and C for further testing:
call only script C, save map, delete all objects
call only script D, save map, delete all objects
*********************************
To my chagrin, the map did not crash in either instance.
So I am wondering, if the crashes are really me making a mistake in the Lua script, or if I'm hitting a limit in the number of custom objects?
For reference I have about:
~450 custom abilities
~180 custom units
~20 custom items
Edit: Some further observations / testing
In my full map with all the previously mentioned custom objects, I was able to delete 148 custom objects in a row by holding down the delete key without a crash.
In this same map, it also now crashes when deleting custom objects rapidly like I was able to.
The confusing thing is, I did not modify or change any of the scripts (and they ran only once).
So why would I be able to delete 148 objects in rapid succession at one point in opening the map, but at another have the map crash just by rapidly deleting more than 3 at a time?
This is inconsistent behavior and so it's hard for me to know what the problem is. Is this a memory limitation (is it really that costly to delete a custom object???). If so, how do I give the editor more memory (I've got 16 GBs in RAM)?
Further edit: More observations
Ok so it seems it is ok for me to rapidly delete my custom objects which are units.
But if I delete abilities at any pace (say 1 ability every 5 seconds), it crashes always when trying to delete an 8th ability.
But as far as I can tell, the objects of each ability script by themselves do not crash when being deleted rapidly (as shown in the first tests).
So it can't be a memory issue (unless I have too many abilities?) and what I now suspect is that somehow my scripts are writing to each other's objects, because only in combination do I get crashes.
So here's more information:
-It seems the number of ability objects I can delete depends on their race/classification.
Undead/Unit abilities crash when trying to delete a 3rd ability
Item abilities crash now when trying to delete a 3rd ability
Human/Hero abilities crash when trying to delete an 8th ability
Please advise!
I've been running into this error quite often when deleting custom objects in the object editor.
At first I thought it was because of using Lua object generation and writing to a bad/non-existent field.
So I did the following test with 6 separate object generation scripts, call them A, B, C, D, E, and F.
I ran them each sequentially and then deleted all the custom made objects to see if I could re-create the crash and narrow down where I had a bad statement in my Lua script.
Thus my tests were like this:
call script A, save map, delete all objects
call script A, B, save map, delete all objects
call script A, B, ..., save map, delete all objects
*********************
If the map crashed whenever adding a new script and deleting those objects, I would want to say there was an error in the script. In my first instance, it seemed like script D was causing the crashes.
But then, in another test, adding in the sequence A, B, C caused crashes. So I thought it was script C.
I then isolated both scripts D and C for further testing:
call only script C, save map, delete all objects
call only script D, save map, delete all objects
*********************************
To my chagrin, the map did not crash in either instance.
So I am wondering, if the crashes are really me making a mistake in the Lua script, or if I'm hitting a limit in the number of custom objects?
For reference I have about:
~450 custom abilities
~180 custom units
~20 custom items
Edit: Some further observations / testing
In my full map with all the previously mentioned custom objects, I was able to delete 148 custom objects in a row by holding down the delete key without a crash.
In this same map, it also now crashes when deleting custom objects rapidly like I was able to.
The confusing thing is, I did not modify or change any of the scripts (and they ran only once).
So why would I be able to delete 148 objects in rapid succession at one point in opening the map, but at another have the map crash just by rapidly deleting more than 3 at a time?
This is inconsistent behavior and so it's hard for me to know what the problem is. Is this a memory limitation (is it really that costly to delete a custom object???). If so, how do I give the editor more memory (I've got 16 GBs in RAM)?
Further edit: More observations
Ok so it seems it is ok for me to rapidly delete my custom objects which are units.
But if I delete abilities at any pace (say 1 ability every 5 seconds), it crashes always when trying to delete an 8th ability.
But as far as I can tell, the objects of each ability script by themselves do not crash when being deleted rapidly (as shown in the first tests).
So it can't be a memory issue (unless I have too many abilities?) and what I now suspect is that somehow my scripts are writing to each other's objects, because only in combination do I get crashes.
So here's more information:
-It seems the number of ability objects I can delete depends on their race/classification.
Undead/Unit abilities crash when trying to delete a 3rd ability
Item abilities crash now when trying to delete a 3rd ability
Human/Hero abilities crash when trying to delete an 8th ability
Please advise!