Page 1 of 1

Crash in skirmish with T1

Posted: 19 Aug 2008, 22:15
by EVIL386
Me again lol! :P

Think i got another bug which I can replicate every time.

In skirmish, start a new game on Tech Level 1, I chose Ziggurat as my map of choice.

Play the game and research like crazy, When you get to the items label CAM1(WEAPONS, STRUCTURES, VEHICLES), You click one and *BOOM*, crash to desktop.

I can send debug logs, savegame and crash dump if you wish, I would debug but I can't get WZ to compile :gonk: Wiki is severely lacking for VS2008.

Any ideas? or are those items not meant to be seen?

Details, WZ 2.1 B4, AiVolution (with 8p script edit), Vista x86.

Re: Crash in skirmish with T1

Posted: 19 Aug 2008, 22:30
by EVIL386
Heres the report file from the crash.

Looks like an Integer divide by zero fault, maybe because the item has no research time?

Re: Crash in skirmish with T1

Posted: 20 Aug 2008, 00:15
by EVIL386
Right I think I know what is going on... I think it's because the items (CAM1x) have a power requirement of 0:

Line 324 in intdisplay.c:

Code: Select all

BarGraph->majorSize = (UWORD)PERNUM(WBAR_SCALE,BuildPoints,Range);
Any idea on how to fix this?

Re: Crash in skirmish with T1

Posted: 20 Aug 2008, 05:42
by Buginator
EVIL386 wrote:Me again lol! :P

Think i got another bug which I can replicate every time.

In skirmish, start a new game on Tech Level 1, I chose Ziggurat as my map of choice.

Play the game and research like crazy, When you get to the items label CAM1(WEAPONS, STRUCTURES, VEHICLES), You click one and *BOOM*, crash to desktop.

I can send debug logs, savegame and crash dump if you wish, I would debug but I can't get WZ to compile :gonk: Wiki is severely lacking for VS2008.

Any ideas? or are those items not meant to be seen?

Details, WZ 2.1 B4, AiVolution (with 8p script edit), Vista x86.
What do you mean by 'research like crazy'? Do you mean you have multiple research buildings, and you keep them researching?

For VS2008, you should be able to just load the .sln file, and it will convert it for you. Those of us on windows that use MSVC, use VS2005.
EVIL386 wrote:Right I think I know what is going on... I think it's because the items (CAM1x) have a power requirement of 0:

Line 324 in intdisplay.c:

Code: Select all

BarGraph->majorSize = (UWORD)PERNUM(WBAR_SCALE,BuildPoints,Range);
Any idea on how to fix this?
Yeah, I can fix it (well, I fixed it so it won't divide by 0 again), but I was trying to replicate this, to see if I can trigger this bug.

*edit, ok, fix works.
The crash happens in the intel screen...
Thanks for the bug report! :)

Re: Crash in skirmish with T1

Posted: 20 Aug 2008, 07:33
by Zarel
I thought it was well-known that CAM1(WEAPONS, STRUCTURES, VEHICLES) caused a game-crash when people tried to research them, but the idea was that they should never appear in normal gameplay.

Re: Crash in skirmish with T1

Posted: 20 Aug 2008, 10:33
by EVIL386
Buginator wrote: *edit, ok, fix works.
The crash happens in the intel screen...
Thanks for the bug report! :)
No problems ;)
Zarel wrote:I thought it was well-known that CAM1(WEAPONS, STRUCTURES, VEHICLES) caused a game-crash when people tried to research them, but the idea was that they should never appear in normal gameplay.
I wasn't even cheating either so I don't know why these items were even appearing :-S

I fixed it for myself by editing the research.txt in the mp folder and changing the 5th value from the end to a 1 from a 0. That looks like the power required field.

Does anybody have the format infomation for this file? If you do I will write it into the Wiki myself to centralise all this yummy info we have floating around.

Thanks. :D

Re: Crash in skirmish with T1

Posted: 21 Aug 2008, 06:20
by Buginator
EVIL386 wrote: Does anybody have the format infomation for this file? If you do I will write it into the Wiki myself to centralise all this yummy info we have floating around.

Thanks. :D
You want to know what all the fields mean? That would be in the source, but as for specifics..erm...dunno off hand, I'll try to remember, and edit this post with the info.

Zarel wrote:I thought it was well-known that CAM1(WEAPONS, STRUCTURES, VEHICLES) caused a game-crash when people tried to research them, but the idea was that they should never appear in normal gameplay.
When people try to *research* them?
This bug was in the intel screen, and when you clicked on it, it would crash.

I *think* the bug your talking about is something different, and I only have seen those icons when you cheat to get them.

Re: Crash in skirmish with T1

Posted: 21 Aug 2008, 17:08
by Troman
I was always wondering how people managed CAM1 to appear in their research list, I think I know it now. It happens when you pick up an artifact, it gives you a random research topic. :stressed: It happened to me some days ago in a skirmish game.

Re: Crash in skirmish with T1

Posted: 21 Aug 2008, 20:03
by Zarel
Troman wrote:I was always wondering how people managed CAM1 to appear in their research list, I think I know it now. It happens when you pick up an artifact, it gives you a random research topic. :stressed: It happened to me some days ago in a skirmish game.
Why do they even exist? Does any part of the code use them? If not, you could simply remove them. Does the code check for which random research topic? I think "Synaptic Link" also causes a crash in multiplayer, and that can't be removed.

Re: Crash in skirmish with T1

Posted: 22 Aug 2008, 06:54
by Buginator
Troman wrote:I was always wondering how people managed CAM1 to appear in their research list, I think I know it now. It happens when you pick up an artifact, it gives you a random research topic. :stressed: It happened to me some days ago in a skirmish game.
Ah cool, so you found out how they appear! :cool:

For what it is worth, these are the ones that can be in the research menu at some point:

Code: Select all

CAM1RESEARCH,Level One,0,1,IMAGE_RES_COMPUTERTECH,MICAPSUL.PIE,0,0,0,0,0,0,0,0,0,0,0,0,0,0
CAM1VEHICLES,Level One,0,1,IMAGE_RES_DROIDTECH,MICAPSUL.PIE,0,0,0,0,0,0,0,1,1,0,0,0,0,0
CAM1WEAPONS,Level One,0,1,IMAGE_RES_WEAPONTECH,MICAPSUL.PIE,0,0,0,0,0,0,0,1,0,0,0,0,0,0
CAM1SYSTEMS,Level One,0,1,IMAGE_RES_SYSTEMTECH,MICAPSUL.PIE,0,0,0,0,0,0,0,1,0,0,0,0,0,0
CAM1DEFENSES,Level One,0,1,IMAGE_RES_DEFENCE,MICAPSUL.PIE,0,0,0,0,0,0,0,1,0,0,0,0,0,0
CAM1STRUCTURES,Level One,0,1,IMAGE_RES_STRUCTURETECH,MICAPSUL.PIE,0,0,0,0,0,0,0,1,0,0,0,0,0,0
ADVANCEDRESEARCH,Level One,0,1,IMAGE_RES_COMPUTERTECH,MICAPSUL.PIE,0,0,0,0,0,0,1,0,0,0,0,0,0,0
CAM2RESEARCH,Level All,0,1,IMAGE_RES_COMPUTERTECH,MICAPSUL.PIE,0,0,0,0,0,0,0,0,0,0,0,0,0,0
CAM2WEAPONS,Level Two,0,1,IMAGE_RES_WEAPONTECH,MICAPSUL.PIE,0,0,0,0,0,0,0,1,0,0,0,0,0,0
CAM2SYSTEMS,Level Two,0,1,IMAGE_RES_SYSTEMTECH,MICAPSUL.PIE,0,0,0,0,0,0,0,1,0,0,0,0,0,0
CAM2DEFENSES,Level Two,IMAGE_RES_GRPACC,1,IMAGE_RES_DEFENCE,MICAPSUL.PIE,0,0,0,0,0,0,0,1,0,0,0,0,0,0
CAM2STRUCTURES,Level Two,0,1,IMAGE_RES_STRUCTURETECH,MICAPSUL.PIE,0,0,0,0,0,0,0,1,0,0,0,0,0,0
CAM3RESEARCH,Level Two-Three,0,1,IMAGE_RES_COMPUTERTECH,MICAPSUL.PIE,0,0,0,0,0,0,0,0,0,0,0,0,0,0
CAM2CYBORGS,Level Two,0,1,IMAGE_RES_CYBORGTECH,MICAPSUL.PIE,0,0,0,0,0,0,0,1,0,0,0,0,0,0
CAM2VEHICLES,Level Two-Three,0,1,IMAGE_RES_DROIDTECH,MICAPSUL.PIE,0,0,0,0,0,0,0,1,0,0,0,0,0,0
While clicking on them won't produce a crash anymore, I was going to filter these out, based on it don't start with 'R-' like all the rest of the research topics, or perhaps something like:

Code: Select all

if(asResearch[topic].researchPower != 0 && asResearch[topic].researchPoints !=0) [allow] else  [don't allow]
Though, I am not sure right now if that would be be 100% correct.

Evil386, the fields for research.txt is located in http://svn.gna.org/svn/warzone/trunk/src/researchdef.h
Zarel wrote:Why do they even exist? Does any part of the code use them? If not, you could simply remove them. Does the code check for which random research topic? I think "Synaptic Link" also causes a crash in multiplayer, and that can't be removed.
That is a good question, I thought those are the base topics that everyone has to start the tech tree going... however, I still don't know enough about this stuff to be sure that is a correct statement. Troman, would you know if this is the case?
For the Synaptic Link, I assume you mean this one? :

Code: Select all

R-Comp-SynapticLink,Level One,0,0,IMAGE_RES_COMPUTERTECH,icsynapt.PIE,0,RES_C_SL1,0,0,0,1200,1,1,0,0,0,0,0,0
Did you get it the same way (by getting a artifact), or does this pop up normally?

Re: Crash in skirmish with T1

Posted: 22 Aug 2008, 08:21
by Zarel
Buginator wrote: For the Synaptic Link, I assume you mean this one? :

Code: Select all

R-Comp-SynapticLink,Level One,0,0,IMAGE_RES_COMPUTERTECH,icsynapt.PIE,0,RES_C_SL1,0,0,0,1200,1,1,0,0,0,0,0,0
Did you get it the same way (by getting a artifact), or does this pop up normally?
In the single-player campaign, you find Synaptic Link as an artifact, and you have to research it to get cyborgs.

I haven't played multiplayer starting at a lower tech level than Advanced Bases for a long time, but I believe it isn't supposed to appear in multiplayer.