Jump to content

Bug and Error


 Share

Recommended Posts

Hi, I get this:

 

WARNING: JavaScript warning: simulation/components/Auras.js line 48 reference to undefined property this.template._string

ERROR: JavaScript error: simulation/components/Auras.js line 48 TypeError: this.template._string is undefined Auras.prototype.GetAuraNames@simulation/components/Auras.js:48:2 Auras.prototype.Init@simulation/components/Auras.js:14:6 LoadPlayerSettings@simulation/helpers/Player.js:50:8

WARNING: CCmpRangeManager: No owners in query for entity 11

WARNING: CCmpRangeManager: No owners in query for entity 920

WARNING: CCmpRangeManager: No owners in query for entity 921

WARNING: CCmpRangeManager: No owners in query for entity 922

WARNING: CCmpRangeManager: No owners in query for entity 923

WARNING: CCmpRangeManager: No owners in query for entity 925

WARNING: CCmpRangeManager: No owners in query for entity 926

WARNING: CCmpRangeManager: No owners in query for entity 927

WARNING: CCmpRangeManager: No owners in query for entity 928

WARNING: CCmpRangeManager: No owners in query for entity 929

WARNING: CCmpRangeManager: No owners in query for entity 930

WARNING: CCmpRangeManager: No owners in query for entity 931

WARNING: CCmpRangeManager: No owners in query for entity 932

WARNING: CCmpRangeManager: No owners in query for entity 933

WARNING: CCmpRangeManager: No owners in query for entity 934

WARNING: CCmpRangeManager: No owners in query for entity 935

WARNING: CCmpRangeManager: No owners in query for entity 936

WARNING: CCmpRangeManager: No owners in query for entity 937

WARNING: CCmpRangeManager: No owners in query for entity 938

 

 

Plus another 1000 errors and warnings. I know this is problem with mod, not regular game, because it only happen with my mod. Any thought?

(I have not edited Auras.js)

Edited by wowgetoffyourcellphone
  • Like 1
Link to comment
Share on other sites

Does it happen when loading the map?

If so, you can add some basic debugging. Add the following code just before the bug happens (so before the current line 48 of Auras.js):

if (!this.template._string)
  warn(this.entity);

Then you should see what entity id is causing the problem, so you can open the map XML, search for that entity id, see what template it has, and fix the template.

 

EDIT: or you could also open Atlas, and place units/entities with auras by trial and error until the warning is spit.

  • Like 1
Link to comment
Share on other sites

I get this error immediately when open Atlas:

 

WARNING: JavaScript warning: simulation/components/Auras.js line 48 reference to undefined property this.template._string

ERROR: JavaScript error: simulation/components/Auras.js line 48 TypeError: this.template._string is undefined Auras.prototype.GetAuraNames@simulation/components/Auras.js:48:2 Auras.prototype.Init@simulation/components/Auras.js:14:6 LoadPlayerSettings@simulation/helpers/Player.js:50:8

WARNING: GetPlayerByID: no player defined for id '1' PlayerManager.prototype.GetPlayerByID@simulation/components/PlayerManager.js:78:6

Engine exited successfully on 2016-05-19 at 04:18:29 with 472 message(s), 1 error(s) and 2 warning(s).

Link to comment
Share on other sites

And this in Atlas when I place anything:

 

WARNING: GetPlayerByID: no player defined for id '1' PlayerManager.prototype.GetPlayerByID@simulation/components/PlayerManager.js:78:6

WARNING: GetPlayerByID: no player defined for id '1' PlayerManager.prototype.GetPlayerByID@simulation/components/PlayerManager.js:78:6 QueryOwnerInterface@simulation/helpers/Player.js:207:6 ApplyValueModificationsToEntity@simulation/helpers/ValueModification.js:6:6 ValueModificationManager.prototype.ApplyModifications@simulation/components/ValueModificationManager.js:14:2

WARNING: GetPlayerByID: no player defined for id '1' PlayerManager.prototype.GetPlayerByID@simulation/components/PlayerManager.js:78:6 QueryOwnerInterface@simulation/helpers/Player.js:207:6 ApplyValueModificationsToEntity@simulation/helpers/ValueModification.js:6:6 ValueModificationManager.prototype.ApplyModifications@simulation/components/ValueModificationManager.js:14:2

WARNING: GetPlayerByID: no player defined for id '1' PlayerManager.prototype.GetPlayerByID@simulation/components/PlayerManager.js:78:6

WARNING: GetPlayerByID: no player defined for id '1' PlayerManager.prototype.GetPlayerByID@simulation/components/PlayerManager.js:78:6

WARNING: GetPlayerByID: no player defined for id '1' PlayerManager.prototype.GetPlayerByID@simulation/components/PlayerManager.js:78:6 QueryOwnerInterface@simulation/helpers/Player.js:207:6 ApplyValueModificationsToEntity@simulation/helpers/ValueModification.js:6:6 ValueModificationManager.prototype.ApplyModifications@simulation/components/ValueModificationManager.js:14:2

WARNING: GetPlayerByID: no player defined for id '1' PlayerManager.prototype.GetPlayerByID@simulation/components/PlayerManager.js:78:6 QueryOwnerInterface@simulation/helpers/Player.js:207:6 ApplyValueModificationsToEntity@simulation/helpers/ValueModification.js:6:6 ValueModificationManager.prototype.ApplyModifications@simulation/components/ValueModificationManager.js:14:2

WARNING: GetPlayerByID: no player defined for id '1' PlayerManager.prototype.GetPlayerByID@simulation/components/PlayerManager.js:78:6 QueryOwnerInterface@simulation/helpers/Player.js:207:6 Auras.prototype.CalculateAffectedPlayers@simulation/components/Auras.js:92:3 Auras.prototype.Clean@simulation/components/Auras.js:197:3 Auras.prototype.OnOwnershipChanged@simulation/components/Auras.js:386:2

Link to comment
Share on other sites

Oh, didn't notice it, it seems to be in one of your player templates.

It may be your Athenian player template. I don't know how the XML engine parses whitespace strings, but I'd guess it trims of the whitespace so indeed returns null or undefined.

You should probably just remove the entire Auras part there if you don't want the auras.

Link to comment
Share on other sites

How about this when I try to look at structree?

 

WARNING: JavaScript warning: gui/structree/structree.js line 249 reference to undefined property reqs.generic

ERROR: JavaScript error: gui/structree/structree.js line 249 TypeError: reqs.generic is undefined selectCiv@gui/structree/structree.js:249:7 __eventhandler212 (selectionchange)@civSelection selectionchange:0:1 init@gui/structree/structree.js:34:3 openStrucTree@gui/session/menu.js:664:3 __eventhandler189 (press)@civIconOverlay press:0:1

ERROR: GUI page 'page_structree.xml': Failed to call init() function

Looks like a requirement is not being met or wrong requirement used for a Phase tech or unit. Hmm

 

					let reqs = g_ParsedData.techs[unit.required].reqs;
					if (g_SelectedCiv in reqs)
						phase = reqs[g_SelectedCiv][0];
					else
						phase = reqs.generic[0];

 

Edited by wowgetoffyourcellphone
Link to comment
Share on other sites

It's related to the phase requirement of a unit. But I have no idea what is actually wrong.

You can try a bit of logging like I explained before. Logging the "prod" variable should show you the unit template where it goes wrong, and logging unit.required should show the name of the required tech.

Link to comment
Share on other sites

I added some warnings to that piece of code, as it wasn't fail-safe indeed.

Now it should warn what template is the issue: http://trac.wildfiregames.com/changeset/18199

You probably have a tech with an empty requirements object. This isn't a good idea as there are requirements defined (so the code for checking requirements will run), but it will find none. It's better to just delete the requirements altogether.

  • Like 2
Link to comment
Share on other sites

Thanks for that sander. Looks like the problem is with the requirements in tech "unlock_females_house."

 

WARNING: Empty requirements found on technology unlock_females_house

Thiing is that the requirements are not empyt tho...


	"requirements": {"all": [
		{"tech": "phase_town"},
		{"notciv": "maur"},
		{"notciv": "imp"}
	]},

(imp is the civ for the Principate Romans, in case you wonder)

Link to comment
Share on other sites

Hrm. Still says it's "empty":

 


	"requirements": {"all": [{"tech": "phase_town" }, {"all": [{"notciv": "maur"}, {"notciv": "imp"}]}]},

I am perplex. Here is full tech:

 

{
	"genericName": "Fertility Festival",
	"specificName": {
		"hele": "Thesmophoria",
		"mace": "Thesmophoria",
		"spart": "Thesmophoria",
		"athen": "Thesmophoria",
		"theb": "Thesmophoria",
		"rome": "Bonae Deae Festivitate"
	},
	"description": "A festival attended by women-only, to celebrate female fertility. For example, the Thesmophoria was a festival held in Greek cities, in honor of the goddess Demeter and her daughter Persephone. The name derives from thesmoi, or laws by which men must work the land. The Thesmophoria were the most widespread festivals and the main expression of the cult of Demeter, aside from the Eleusinian Mysteries. The Thesmophoria commemorated the third of the year when Demeter abstained from her role of goddess of the harvest and growth; spending the harsh summer months of Greece, when vegetation dies and lacks rain, in mourning for her daughter who was in the realm of the Underworld. Their distinctive feature was the sacrifice of pigs. Whereas Bona Dea (or The Good Goddess) was a divinity in ancient Roman religion. She was associated with chastity and fertility in women, healing, and the protection of the Roman state and people. Her rites allowed women the use of strong wine and blood-sacrifice, things otherwise forbidden them by Roman tradition. Men were barred from her mysteries and the possession of her true name. The goddess had two annual festivals. One was held at her Aventine temple and the other was hosted by the wife of Rome's senior annual magistrate, for an invited group of elite matrons and female attendants.",
	"cost": {"food": 200, "wood": 0, "stone": 0, "metal": 200},
	"requirements": {"all": [
		{"tech": "phase_town" }, 
		{"all": [
			{"notciv": "maur"},
			{"notciv": "imp"}]
		}
	]},
	"requirementsTooltip": "Unlocked in Town Phase.",
	"icon": "wives_festival.png",
	"researchTime": 60,
	"tooltip": "Unlock the ability to train women from houses.",
	"soundComplete": "interface/alarm/alarm_upgradearmory.xml"
}



Funny is the tech work just fine in a match. (y)

Edited by wowgetoffyourcellphone
Link to comment
Share on other sites

1 hour ago, wowgetoffyourcellphone said:

 

Funny is the tech work just fine in a match. (y)

Yes, the tech parsing to display it in the structure tree is quite different from what happens in-game. The game doesn't care about when it will become available, it just needs to test if the requirements are already matched.

That said, it's very strange your tech doesn't work. Perhaps the siege tech linked only works because it's researched from a phase III building, so automatically goes in that phase (and the calculation is omitted).

  • Like 1
Link to comment
Share on other sites

6 minutes ago, fatherbushido said:

@wowgetoffyourcellphone: in your mod or in the vanilla game ?

Any unit with a technology tree will throw error in struct tree. I think struct tree currently cannnot handle <Technologies> in the production queue for units. They should be put to the side, like unit with <Entities>.

Edited by wowgetoffyourcellphone
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...