:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::
Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Tue Nov 21, 2017 9:11 pm
All times are UTC + 0
 Forum index » Modding Central » Tiberian Sun Editing Forum » HyperPatch
Ion Storm Crash
Moderators: Global Moderators, HyperPatch Moderators, CCHyper
Post new topic   Reply to topic Page 1 of 1 [24 Posts] View previous topic :: View next topic
Author Message
CCHyper
Defense Minister


Joined: 07 Apr 2005

PostPosted: Thu Dec 27, 2012 5:37 pm    Post subject:   Ion Storm Crash Reply with quote

As a few of you will know, there is a random crash that occurs during Ion Storms. Well in fact its not a crash, but rather the game calls upon a function it should not (a PureCall), so something is seriously wrong.

Now i have being thinking of a way to capture this error for some time, and the only way i can think of is to Force a internal error, what will then dump to stack of the game, then allow me to scan for the possible location of where it all goes wrong.

Attached is a executable that does just this. Please double check the time and date of the except.txt file before posting, the game will show a dialog box saying that it has hit the _purecall().

I'm hoping this will work...


IonStorm.rar
 Description:

Download
 Filename:  IonStorm.rar
 Filesize:  1.13 MB
 Downloaded:  176 Time(s)


Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Dec 27, 2012 6:32 pm    Post subject: Reply with quote

I just got an IE on a testmap, which has some jumpjets moving/flying around everytime before the IS starts.

However the game wasn't showing the purecall messagebox, but the usual (german) Internal Error messagebox. So i'm not sure if it's the right IE you're looking for.

\EDIT attached another one which froze the game

\EDIT finally one with your message "an IE happened when an IonStorm occured"


except.txt
 Description:
the IE with your message

Download
 Filename:  except.txt
 Filesize:  20.6 KB
 Downloaded:  59 Time(s)


except.txt
 Description:
this one froze the game. no IE messagebox at all.

Download
 Filename:  except.txt
 Filesize:  20.7 KB
 Downloaded:  128 Time(s)


testmap.mpr
 Description:
my testmap

Download
 Filename:  testmap.mpr
 Filesize:  92.51 KB
 Downloaded:  157 Time(s)


EXCEPT.TXT
 Description:
the IE that happened when the IS starts

Download
 Filename:  EXCEPT.TXT
 Filesize:  20.7 KB
 Downloaded:  39 Time(s)


_________________
SHP Artist of Twisted Insurrection. Main Nod building SHP creator.

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant unit, 1 Scrin unit, 1 GDI building

Tools
TMP Shop
C&C Executable Modifier

Back to top
View user's profile Send private message
CCHyper
Defense Minister


Joined: 07 Apr 2005

PostPosted: Thu Dec 27, 2012 7:33 pm    Post subject: Reply with quote

The culprit seems to be 0x006156DE, what is a call to Fetch_RTTI(). It basicly returns what a object is, RTTI_INFANTRY, RTTI_BUILDING etc.

The problem is that the pointer passed into this is wrong...

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Dec 27, 2012 7:41 pm    Post subject: Reply with quote

Could it be the jumpjet infantry which might be somewhere between infantry and aircraft during its take off and landing phase?
_________________
SHP Artist of Twisted Insurrection. Main Nod building SHP creator.

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant unit, 1 Scrin unit, 1 GDI building

Tools
TMP Shop
C&C Executable Modifier

Back to top
View user's profile Send private message
CCHyper
Defense Minister


Joined: 07 Apr 2005

PostPosted: Thu Dec 27, 2012 11:04 pm    Post subject: Reply with quote

Jumpjet is never considered an Aircraft. Objects are consideredto be in the air when they are above a certain height, and then they are moved into the correct layer.

The problem seems to be to be that the object that is being proceeded from the layers array is malformed, or even, it could be reaching past the end of the array...

Ill look into this more.

Back to top
View user's profile Send private message
MrTweek
Cyborg Soldier


Joined: 18 Jul 2012
Location: Germany

PostPosted: Thu Apr 11, 2013 12:34 pm    Post subject: Reply with quote

Hyper, do you need additional infos for this Exception?, i can make a map what has IonStorms enabled for testing and post some Exceptions =/

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Apr 11, 2013 2:18 pm    Post subject: Reply with quote

my attached testmap in my post above does that already. Wink
But you could try to create more IE under different IonStorm situations and upload the excepts here. Maybe this helps Hyper to narrow down the problem.
_________________
SHP Artist of Twisted Insurrection. Main Nod building SHP creator.

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant unit, 1 Scrin unit, 1 GDI building

Tools
TMP Shop
C&C Executable Modifier

Back to top
View user's profile Send private message
MrTweek
Cyborg Soldier


Joined: 18 Jul 2012
Location: Germany

PostPosted: Thu Apr 11, 2013 8:28 pm    Post subject: Reply with quote

Hmm... i had downloaded the files (exe and testmap) and running ts in my mod via rules.ini but there isnt any exceptions, when the IS starts <.<or> same 4 exceptions  when the storm hits the ground...

Code:

; Ion storm control
IonLightningFrequency=100
IonLightningRandomness=50
IonLightningDamage=10
IonStormDuration=1
IonStormWarning=10
...



except.txt
 Description:

Download
 Filename:  except.txt
 Filesize:  20.75 KB
 Downloaded:  27 Time(s)


Last edited by MrTweek on Thu Apr 11, 2013 9:34 pm; edited 2 times in total

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Apr 11, 2013 9:05 pm    Post subject: Reply with quote

the IonStorm IE isn't very predictable and not happening right when the first IS starts. Sometimes nothing happens for lots of IS starts and sometimes right the first IS crashes.
It's really bad and hard to reproduce the IE.


i used similar IS settings in my testmap, though here done via the map triggers that start and end an IS.
_________________
SHP Artist of Twisted Insurrection. Main Nod building SHP creator.

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant unit, 1 Scrin unit, 1 GDI building

Tools
TMP Shop
C&C Executable Modifier

Back to top
View user's profile Send private message
Zero18
Commander


Joined: 10 Dec 2012
Location: I'm too busy conquering the world!

PostPosted: Thu Apr 11, 2013 9:08 pm    Post subject: Reply with quote

Yes, if you increase the IonStorm Frequency, there will be more chance to IE, because I think that if the Ion storm hits the same tile twice in same frame, it will cause IE. I had it high as 75% or 80%, (I don't remember it). It happened in one of my old map crate wars, but now I don't have the map anymore.
_________________
Mod Leader and founder of World Domination


Back to top
View user's profile Send private message
MrTweek
Cyborg Soldier


Joined: 18 Jul 2012
Location: Germany

PostPosted: Thu Apr 11, 2013 10:41 pm    Post subject: Reply with quote

another one...

10 minutes along

Jumpsets are flying around together with banshees, ionstorm starts (map-lighting has already changed...)

Edit: After restart, the same... IE the TV-Snow occoured ....IE (1 minute expired...)


except.txt
 Description:
EDX has Changed...

Download
 Filename:  except.txt
 Filesize:  20.74 KB
 Downloaded:  25 Time(s)


except.txt
 Description:

Download
 Filename:  except.txt
 Filesize:  20.74 KB
 Downloaded:  31 Time(s)


Back to top
View user's profile Send private message
MrTweek
Cyborg Soldier


Joined: 18 Jul 2012
Location: Germany

PostPosted: Thu Apr 11, 2013 11:09 pm    Post subject: Reply with quote

MrTweek wrote:
another one...

10 minutes along

Jumpsets are flying around together with banshees, ionstorm starts (map-lighting has already changed...)

Edit: After restart, the same... IE the TV-Snow occoured ....IE (1 minute expired...)


Sorry for doublepost... but it seems on the game throws the box everytime, when an aircraft is leaving the map... (up of the screen)

in this moment it worse able to grab a file...


except.txt
 Description:
The game worse crashing while an ionstorm... bla bla..

Download
 Filename:  except.txt
 Filesize:  20.6 KB
 Downloaded:  32 Time(s)


IMG_20130412_010139.zip
 Description:
that white fraggle thing worse an jumpset... some aircraft doenst crashed... it worse not able to grab a except.txt -> the game doesnt create one... Oo

Download
 Filename:  IMG_20130412_010139.zip
 Filesize:  457.51 KB
 Downloaded:  123 Time(s)


Back to top
View user's profile Send private message
MrTweek
Cyborg Soldier


Joined: 18 Jul 2012
Location: Germany

PostPosted: Fri Apr 12, 2013 12:56 am    Post subject: Reply with quote

it seems the problem with the IE are Jumpjets, when they are flying to the East-Side on the map (right-side of the Map) in all Screens, that i had made (the Same Exception..., the Same direction "to the east")

maybe anyone can reproduce it...: before the ION-Storm starts... navigate Jumpjets (on the top of the Map to the eastside of the map!!! while you have to scroll)

Edit: okay before i get banned, i should begin to caputre the situations... (fraps or camtasia) its everytime the same moment... when the ionstorm begins =/ (graysnowy screen >.<)


except_09EF0ACC.txt
 Description:

Download
 Filename:  except_09EF0ACC.txt
 Filesize:  20.75 KB
 Downloaded:  22 Time(s)


except_09CA08FC.txt
 Description:

Download
 Filename:  except_09CA08FC.txt
 Filesize:  20.7 KB
 Downloaded:  25 Time(s)


Back to top
View user's profile Send private message
CCHyper
Defense Minister


Joined: 07 Apr 2005

PostPosted: Fri Apr 12, 2013 7:43 am    Post subject: Reply with quote

Haha, its all for a good cause anyhow, so i don't see a problem.

I have been testing a few possible fixes, and they seem to unsuccessful.

Back to top
View user's profile Send private message
Exley
Cyborg Commando


Joined: 09 May 2011
Location: X-Files

PostPosted: Fri Apr 12, 2013 9:13 pm    Post subject: Reply with quote

maybe its tied to laserdraw bug
I think someone said that HP doesn't fix that and Ion storms are lasers (afaik)

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Fri Apr 12, 2013 9:22 pm    Post subject: Reply with quote

doubt that.
a) IS crash only right at the start, when the static anim fills the screen and the lighting changes. I never experienced a crash in the middle of a running IS
b) i've scrolled multiple times during a running IS over the drawn bolts without problems.
_________________
SHP Artist of Twisted Insurrection. Main Nod building SHP creator.

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant unit, 1 Scrin unit, 1 GDI building

Tools
TMP Shop
C&C Executable Modifier

Back to top
View user's profile Send private message
^Rampastein
Rampastring


Joined: 11 Oct 2008
Location: Finland

PostPosted: Fri Apr 12, 2013 9:29 pm    Post subject: Reply with quote

Also IIRC WaveClass/LaserDrawClass errors are somehow tied to alpha blending effects of the Laser, Ion Cannon and Sonic Wave. While the IS lightning bolts don't use alpha blending AFAIK.
_________________

Back to top
View user's profile Send private message
MrTweek
Cyborg Soldier


Joined: 18 Jul 2012
Location: Germany

PostPosted: Fri Apr 12, 2013 10:20 pm    Post subject: Reply with quote

All these Exception are happening while the Screen worse filled with the Grey "Snowy" tiles / anim... it happend more with jumpjets AND Aircrafts... (In 10 Tests = 3 x Hypers MessageBox and 7x a normal IE)

with IDA Pro i had decompiled the depending Sub and can only see:

Code:

char __thiscall sub_52F1D0(void *this, int a2, void *a3)
{
  void *v3; // esi@1
  void *v4; // edi@3
  int v5; // ecx@7
  int i; // eax@9
  int v7; // eax@15

  v3 = this;
  if ( a2 )
  {
    *((_BYTE *)this + 12) = 0;
    if ( a3 )
      v4 = a3;
    else
      v4 = operator new(4 * a2);
    *((_BYTE *)v3 + 12) = 1;
    if ( !v4 )
      return 0;
    if ( *((_DWORD *)v3 + 1) )
    {
      v5 = *((_DWORD *)v3 + 2);
      if ( a2 < v5 )
        v5 = a2;
      for ( i = 0; i < v5; *((_DWORD *)v4 + i - 1) = *(_DWORD *)(*((_DWORD *)v3 + 1) + 4 * i - 4) )
        ++i;
      if ( *((_BYTE *)v3 + 13) )
      {
        operator delete(*((void **)v3 + 1));
        *((_DWORD *)v3 + 1) = 0;
      }
    }
    *((_DWORD *)v3 + 1) = v4;
    *((_DWORD *)v3 + 2) = a2;
    *((_BYTE *)v3 + 13) = a3 == 0;
  }
  else
  {
    (*(void (**)(void))(*(_DWORD *)this + 12))();
  }
  v7 = *((_DWORD *)v3 + 2);
  if ( v7 < *((_DWORD *)v3 + 4) )
    *((_DWORD *)v3 + 4) = v7;
  return 1;

In this case its Pseudocode... but v5 is maybe changed, while "for" counts to the maximum (v5), what already has another value <.< (for example there worse 5 and now its 4)

what units must are now destroyed... hmm but maybe the array is malformed or damaged... and the game trying to write on position what it doesnt have =/


Quote:

b) i've scrolled multiple times during a running IS over the drawn bolts without problems.

indeed it happend after a few tries... -> you must add Arcraft-units to your team... they must spwant and FLYING... after 3-4 tries it happend.... "The game worse crashed while an ionstorm worse active..."

i had make a video =) wher you can see how it must going on, to reproduce that IE <.<: https://docs.google.com/file/d/0B-VXdsLsYT3ecFMtdEx5UlNFYzA/edit?usp=sharing


except_75BAC6E3.txt
 Description:
this exceptions happends while i make the movie

Download
 Filename:  except_75BAC6E3.txt
 Filesize:  20.6 KB
 Downloaded:  26 Time(s)


Last edited by MrTweek on Fri Apr 12, 2013 11:34 pm; edited 1 time in total

Back to top
View user's profile Send private message
CCHyper
Defense Minister


Joined: 07 Apr 2005

PostPosted: Fri Apr 12, 2013 11:29 pm    Post subject: Reply with quote

MrTweek wrote:
All these Exception are happening while the Screen worse filled with the Grey "Snowy" tiles / anim... it happend more with jumpjets AND Aircrafts... (In 10 Tests = 3 x Hypers MessageBox and 7x a normal IE)

with IDA Pro i had decompiled the depending Sub and can only see:

Code:

Blah...

In this case its Pseudocode... but v5 is maybe changed, while "for" counts to the maximum (v5), what already has another value <.< (for example there worse 5 and now its 4)

what units must are now destroyed... hmm but maybe the array is malformed or damaged... and the game trying to write on position what it doesnt have =/


Quote:

b) i've scrolled multiple times during a running IS over the drawn bolts without problems.

indeed it happend after a few tries... -> you must add Arcraft-units to your team... they must spwant and FLYING... after 3-4 tries it happend.... "The game worse crashed while an ionstorm worse active..."

i had make a video =) wher you can see how it must going on, to reproduce that IE <.<

https://docs.google.com/file/d/0B-VXdsLsYT3eNkdCS0U5REpzMTA/edit?usp=sharing


Pretty much what i feel is happening. I had LKO test a bit of code that retained the counter, or "v5" as you call it and the error still occured...

Back to top
View user's profile Send private message
MrTweek
Cyborg Soldier


Joined: 18 Jul 2012
Location: Germany

PostPosted: Fri Apr 12, 2013 11:40 pm    Post subject: Reply with quote

can you explain me, how i can add code to this sub? =/ so i can see, what is going on? =/

Back to top
View user's profile Send private message
CCHyper
Defense Minister


Joined: 07 Apr 2005

PostPosted: Sat Apr 13, 2013 1:21 pm    Post subject: Reply with quote

You need to binary patch it, do you understand Assembly?

Back to top
View user's profile Send private message
MrTweek
Cyborg Soldier


Joined: 18 Jul 2012
Location: Germany

PostPosted: Sat Apr 13, 2013 8:57 pm    Post subject: Reply with quote

Yes... but this worse Assembler for Microcomputer <.< ... edx eip jnz add sub etc <.< it worse sometime a dream in the Night <.< for a while i had patched little code-segment in different Programs <.< but today, i cant remember how i can calculate HEX-Bytes in Strings <.< maybe someone can explain it...

AFAIK the FIRST BYTE in the HEX-LINE (Hexeditor`s Line ) is the instruction (for example "75" what is jnz): what is used in IF-Conditions (True)

Code:
[b]75[/b] AD 78 31 21 11 02 29...


so i can revert it to "74" (jz), thats reverts the IF-Condition <.<  in the ETS-Thread worse somewhere an Assembler-book (as PDF) =)

Back to top
View user's profile Send private message
CCHyper
Defense Minister


Joined: 07 Apr 2005

PostPosted: Sun Apr 14, 2013 9:17 am    Post subject: Reply with quote

Aye, I think it would be wise to brush up on your knowledge before you attempt to patch the game.  If you need help, send me a PM.

Back to top
View user's profile Send private message
Evaron
Civilian


Joined: 17 Dec 2011

PostPosted: Sat Oct 19, 2013 2:26 pm    Post subject: Reply with quote

Hey Hyper, I recently did try to catch the pure virtual function crash with your .exe and after numerous hours I was successful, got right crash message for it BUT it did not write new except.txt! Are you sure you implement it right? For normal crashes it generates it properly, just had about two while trying to catch ion storm crash.
Btw I've made back up of windows .mdmp and .hdmp logs of it just in case, if you're interested in them let me know.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [24 Posts] View previous topic :: View next topic
 Forum index » Modding Central » Tiberian Sun Editing Forum » HyperPatch
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

Wildcard SSL Certificates
[ Time: 0.2601s ][ Queries: 14 (0.0083s) ][ Debug on ]