.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Scenarios, Maps and Mods (http://forum.shrapnelgames.com/forumdisplay.php?f=146)
-   -   Out of memory: too many Mymallocs (http://forum.shrapnelgames.com/showthread.php?t=45104)

Corporal Kindel March 12th, 2010 08:05 PM

Re: Out of memory: too many Mymallocs
 
Quote:

Originally Posted by Stavis_L (Post 735322)
Quote:

Originally Posted by Corporal Kindel (Post 735316)
That's a good point, I went back and commented-out the extraneous symbols with the comment function --, but I still have the same error.

My thinking at this point is that it simply has to do with the .DM (mod) file size. I know in Java or other computing languages that comments are just ignored in compiling, but with the DM files (a text file) the comments just increase the overall size of the mod file regardless, so maybe in that sense they're just adding useless & unnecessary baggage?

I don't think the parser understands comments per se, and the "--" string isn't documented as a comment indicator (although it's widely used in the mods posted here.) Basically, every instance of a "#" symbol tells the parser that a command follows, and lines without "#" in them are ignored. So something like "--#mycommand" would still be interpreted as a command (although it doesn't always execute correctly, so it probably assumes the command starts a line.)

I would strongly recommend removing the extraneous "#" symbols altogether.

Also, you could try (for testing purposes) eliminating all but say the first dozen or so names from each namelist to see if the mod runs properly then. That should tell you whether it's a syntax/structure issue or a data issue.




Great news, Success!!

I just tested a small subset the name generating mod with just Maverni (has about 450 new names) and deleted the rest, although saved in another file.

The problem definitely has to do with size. After reducing to just Maverni names the filesize was 9kb, a significant reduction from the original 320 kb for the whole-enchilada of 50 nameTypes.

I agree with your comment. I'm going to go back and cut the extraneous comments. I think what I'll do is just have a thick "read me" type text doc, and keep the "description" comments in each of the nameType files to just the bare-bones necessary, maybe one sentence at most.

Feels pretty to good to actually create a mod & see it work. It's kind of like seeing your first "Hello World" project work :)

By the way, I tested the file on a small map and ran 20 turns, enough to generate 20 leaders, at least one of each leader type available to Maverni. These were the results:


3 original names generated
17 new names generated over the following letters:

A .. 1
D .. 1
F .. 1
G .. 3
H .. 1
K .. 2
L .. 1
M .. 1
O .. 2
P .. 1
T .. 1
Y .. 2

A fairly good distribution over 12 of the 26 alphabet letters.

There's definitely an upper limit to text file size needed for DM-mods to function. I just don't know exactly what this cap is. I think it's around 168kb by prior reasoning. I'm thinking that comments add unnecessarily to this size, but I don't know exactly what the relationship is between filesize, comments, & memory.

Take it easy
rk

Gandalf Parker March 12th, 2010 08:13 PM

Re: Out of memory: too many Mymallocs
 
The lines of ###### definitely will cause a problem. Remember that this is basically a linux program. Having
--############ and a carriage return is not treated as you think it should be. That would still be a dozen null commands taking up string space.

Anywhere you used ##### decoratively should be changed to -------- or =============

Johan K March 16th, 2010 11:41 AM

Re: Out of memory: too many Mymallocs
 
Please try the many name mod with version 3.24. I believe this error should not be possible to get in the latest version of Dominions.

Corporal Kindel March 18th, 2010 12:18 PM

Re: Out of memory: too many Mymallocs
 
Quote:

Originally Posted by Johan K (Post 735773)
Please try the many name mod with version 3.24. I believe this error should not be possible to get in the latest version of Dominions.

I tried using the search tool for "many name" and "name mod" but no such match was found.

I did get my mod to work finally, I'm in the process of refining it for each of the nationalities, I'm still filling in names for a couple of the nameLists too.

I believe the error I originally got was a function of size; it would probably happen regardless of DomVersion if the mod size is too big. Although I should probably upgrade to the newest version, whatever that is now.

By the way, do you know which nameList is the Independents? is it 100?

thx,
rk

Stavis_L March 18th, 2010 12:33 PM

Re: Out of memory: too many Mymallocs
 
Quote:

Originally Posted by Corporal Kindel (Post 736088)
Quote:

Originally Posted by Johan K (Post 735773)
Please try the many name mod with version 3.24. I believe this error should not be possible to get in the latest version of Dominions.

I tried using the search tool for "many name" and "name mod" but no such match was found.

I think he means this mod :p

Quote:

I did get my mod to work finally, I'm in the process of refining it for each of the nationalities, I'm still filling in names for a couple of the nameLists too.

I believe the error I originally got was a function of size; it would probably happen regardless of DomVersion if the mod size is too big. Although I should probably upgrade to the newest version, whatever that is now.
If I understand correctly, Johan was indicating that the size should not cause that error as of the latest patch (3.24, released a week or so ago.) ;) And he should know, as he's the developer. Please try again w/your full data set, as if it finds a bug, we may get another release :D

Quote:

By the way, do you know which nameList is the Independents? is it 100?

thx,
rk
I believe they use 100 and 119 as gender appropriate.

Corporal Kindel March 18th, 2010 12:46 PM

Re: Out of memory: too many Mymallocs
 
Quote:

Originally Posted by Stavis_L (Post 736092)
Quote:

Originally Posted by Corporal Kindel (Post 736088)
Quote:

Originally Posted by Johan K (Post 735773)
Please try the many name mod with version 3.24. I believe this error should not be possible to get in the latest version of Dominions.

I tried using the search tool for "many name" and "name mod" but no such match was found.

I think he means this mod :p



OOOPs, my bad :) :D



Quote:

Originally Posted by Stavis_L (Post 736092)
Quote:

I did get my mod to work finally, I'm in the process of refining it for each of the nationalities, I'm still filling in names for a couple of the nameLists too.

I believe the error I originally got was a function of size; it would probably happen regardless of DomVersion if the mod size is too big. Although I should probably upgrade to the newest version, whatever that is now.
If I understand correctly, Johan was indicating that the size should not cause that error as of the latest patch (3.24, released a week or so ago.) ;) And he should know, as he's the developer. Please try again w/your full data set, as if it finds a bug, we may get another release :D
Quote:

By the way, do you know which nameList is the Independents? is it 100?

thx,
rk
I believe they use 100 and 119 as gender appropriate.



Ok, I'll upgrade to 3.24 and retest using the original full mod of size 320k. I thought Indies were nameType[100], just wasn't 100% sure.

thx,
rk

Corporal Kindel March 18th, 2010 12:59 PM

Re: Out of memory: too many Mymallocs
 
OK, where's the patch version 3.24? I can't seem to find it in the maps & mods thread. I tried putting patch in the search tool but no matches were found?

kennydicke March 18th, 2010 01:13 PM

Re: Out of memory: too many Mymallocs
 
Corporal Kindel

Quote:

OK, where's the patch version 3.24? I can't seem to find it in the maps & mods thread. I tried putting patch in the search tool but no matches were found?
Look at the left-hand side of the screen - under 'Latest News'.

Corporal Kindel March 18th, 2010 09:29 PM

Re: Out of memory: too many Mymallocs
 
Another round of good news!

I found the patch & upgraded to version 3.24. I then went back to my original old in-work mod, put it together in one big mod like the original, edited the extraneous ### symbols that I had in the comments (which Stavis recommended I remove in another post), and retested.

The whole-enchilada Name-Mod file size was 422kb before I tested it, but it did work. :) ;) I also changed the version # to 3.24 on the mod. Apparently, there doesn't seem to be a file-size restriction on mods with the new patch in place (as I'd previously thought).

The bad news is that I actually have more work than I'd originally thought. I've completely finished 4 NameTypes, but there are very big holes in most of the other NameTypes, and a few I haven't added any names at all yet ( some of the Female nameTypes ). So, I have a couple more months work at least; I'm trying to add a couple dozen new names every day or so. There's actually thousands of names, so it's more work than it seems.

I also needed to create a completely alphabetized text list on the side, so I'm actually adding every name twice. I had to create an alphabetized list because I realized I was inadvertently duplicating names, which was the whole purpose to begin with (avoid dups). Since there's so many names, it's actually fairly easy to dup them inadvertently.

By the way, now that I'm thinking about it, if there's somebody that has a good knowledge of alphebetizing: is the following snippet correct (ignore the numbers which are just references to nameType catogories) .. I'm not 100% on how spaces, hyphens, and non-letter (apostrophe) symbols get alphabetized, i.e.:

Jack 100
Jack 'O 100
Jack Frost 144
Jack o' Lantern 144
Jack-in-the-box 137
Jack-La-Lant 145
Jack-the-Ripper 140
Jacko 137

If you think there's something wrong with the order of the names in this alphabetized snippet, let me know. I put symbols (apostrophe in jack 'o in the second line) before letters, and hyphenated words after, but I'm not 100% sure of this.

Stavis_L March 19th, 2010 08:50 AM

Re: Out of memory: too many Mymallocs
 
Quote:

Originally Posted by Corporal Kindel (Post 736190)
Another round of good news!

I found the patch & upgraded to version 3.24. I then went back to my original old in-work mod, put it together in one big mod like the original, edited the extraneous ### symbols that I had in the comments (which Stavis recommended I remove in another post), and retested.

Glad to hear things worked out for you :)

Quote:


The whole-enchilada Name-Mod file size was 422kb before I tested it, but it did work. :) ;) I also changed the version # to 3.24 on the mod. Apparently, there doesn't seem to be a file-size restriction on mods with the new patch in place (as I'd previously thought).

The bad news is that I actually have more work than I'd originally thought. I've completely finished 4 NameTypes, but there are very big holes in most of the other NameTypes, and a few I haven't added any names at all yet ( some of the Female nameTypes ). So, I have a couple more months work at least; I'm trying to add a couple dozen new names every day or so. There's actually thousands of names, so it's more work than it seems.

Um...are you literally trying to add *every* name in existence? I think you're going to run into issues with that...

Also, you might want to consider starting a thread for your mod (and giving it a name :) ) and posting partial versions so interested people could use it at least in its preliminary format. Half a loaf is better than none, and all...

Quote:


I also needed to create a completely alphabetized text list on the side, so I'm actually adding every name twice. I had to create an alphabetized list because I realized I was inadvertently duplicating names, which was the whole purpose to begin with (avoid dups). Since there's so many names, it's actually fairly easy to dup them inadvertently.

By the way, now that I'm thinking about it, if there's somebody that has a good knowledge of alphebetizing: is the following snippet correct (ignore the numbers which are just references to nameType catogories) .. I'm not 100% on how spaces, hyphens, and non-letter (apostrophe) symbols get alphabetized, i.e.:

Jack 100
Jack 'O 100
Jack Frost 144
Jack o' Lantern 144
Jack-in-the-box 137
Jack-La-Lant 145
Jack-the-Ripper 140
Jacko 137


Are you including the names above? Which name list would they go in? Or are they just for alphabetization check purposes?

Quote:


If you think there's something wrong with the order of the names in this alphabetized snippet, let me know. I put symbols (apostrophe in jack 'o in the second line) before letters, and hyphenated words after, but I'm not 100% sure of this.

I'd strongly suggest using some kind of spreadsheet tool (Excel, OpenOffice's Calc, or Google Spreadsheets, for instance) so that it can handle the ordering for you. You could create one sheet for each namelist. Once you've got your lists of names, you could copy/paste them into the mod and add all the #addname commands to the start of each line (or, if you're a programmer at all, write something to do it for you.)

Also, if you're looking for lists of names, I might point you to this: http://en.wiktionary.org/wiki/Catego...ame_appendices

...which has pre-ordered lists by cultural background.


All times are GMT -4. The time now is 05:03 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.