HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: PostEvent error  (Read 3211 times)

craigbe

  • Developers
  • *
  • Posts: 69
    • View Profile
PostEvent error
« on: Feb 15, 13, 01:15:40 PM »

Hi All,

I'm getting this error in my chat box.  I've searched the forums and wiki but can't find anything.  I've also searched all the scripts for 'postevent' but so far no luck..  any ideas what this is?

Thanks!

Craig

[hsl_error] 9223372056223021578,1: [CityStreetMain] SCRIPT ERROR: In function CallMethodPostEvent: Exceeded 100 PostEvent calls
02/15/2013 19:13:24 UTC
Call trace:
  Script _AiAgentClassMethods line 78 me[id=9223372062040120540 class=E_nonPlayerCharacter,E_AiAgent]
  Script E_AiStatePursueClassMethods line 21 me[id=9223372062040120773 class=E_AiStatePursue]
  Script E_PathingHelperClassMethods line 151 me[9223372062040120773]
  Script LightweightEventsClassMethods line 157 me[id=9223372062040021854 class=LightweightEvents]
  Script E_CharDriverClassMethods line 457 me[9223372062040021835]
  Script E_CharDriverClassMethods line 411 me[9223372062040021835]
starting method/function _DRIVENCHARACTERSIMULATIONTIMER_TICK
starting me[id=9223372062040021835 class=E_CharDriver]
Logged

katoomm0m0

  • General Accounts
  • *
  • Posts: 44
    • View Profile
Re: PostEvent error
« Reply #1 on: Feb 15, 13, 03:54:32 PM »

This is most likely happening because your logic in the AI state is flawed, it can happen if an AI state gets pushed to the stack and then popped again repeatedly in a very short time, like if you have an endless loop.
Logged
- Claus

craigbe

  • Developers
  • *
  • Posts: 69
    • View Profile
Re: PostEvent error
« Reply #2 on: Feb 16, 13, 02:06:08 PM »

Thanks, I'll see what I can figure out.

Craig
Logged

OurLord

  • World Owners
  • ****
  • Posts: 68
    • View Profile
Re: PostEvent error
« Reply #3 on: Feb 18, 13, 04:50:45 AM »


We are also seeing this error in our logs.

We are not very far along with our code development and have only made minor changes to the default AI system like increasing the wander range from 0.75 to 5.0 units. I have definitely not changed any of the logic yet.

The error message is basically a good one, its simply saying the external function CallMethodPostEvent has been queued over a hundred times and I'm assuming it is not responding quick enough.

From what I can glean CallMethodPostEvent is used to queue another function for running after the current function has completed. This call is made by the _AiAgentClassMethods:PopAgentState (line 78) function to queue the _DestroyPoppedState function in the same script.


I would suggest that you look for any situation that may cause the AgentState to change rapidly or to loop causing the State Stack to be popped repeatedly.

We are intending to replace the AI code in the near future so am hoping that this problem will not persist.

I would also warn you to be careful placing debug messages in this script as when I tried to do so the flurry of messages I got hung my HeroBlade session and were very difficult to remove again.

Hope this is of some help.

Richard
Logged

craigbe

  • Developers
  • *
  • Posts: 69
    • View Profile
Re: PostEvent error
« Reply #4 on: Feb 18, 13, 12:32:01 PM »

Thanks for the info Richard!  I've not made changes to these scripts, but I'm inheriting everything so someone else may have done something before I came onboard.  I wish I had a set of 'original' files so I could do one massive diff.

Craig
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1160
  • Never stop learning
    • View Profile
Re: PostEvent error
« Reply #5 on: Feb 18, 13, 06:53:38 PM »

Original scripts can be seen with the history of the scripts. Each one dates back to when they were first modified and 1 or 2 before that, so they can be set back to their original state if needed. I believe I picked up P4merge to get the history to show up.
Logged
Lead scripter for EO, Repop helper.
HSL Video tutorials:
https://community.heroengine.com/forums/index.php/topic,1719.msg36858.html#msg3685

HE-Cooper

  • *****
  • Posts: 2221
    • View Profile
Re: PostEvent error
« Reply #6 on: Feb 19, 13, 09:05:07 AM »

We don't see this error in any of our template worlds, but that doesn't mean that it isn't something we've done wrong. Are you saying you're seeing this error without having done any work relating to AI or NPC movement or pathing?
Logged

OurLord

  • World Owners
  • ****
  • Posts: 68
    • View Profile
Re: PostEvent error
« Reply #7 on: Feb 19, 13, 09:19:07 AM »


I see another of my posts has gone missing, is this a problem with your forum or the Moderator.

To answer your question the only script I have changed in the supplied AI code is the E_AiStateWanderClassMethods

Changing

Code: [Select]
    me.e_phPointRequest = $PathSystem._PathSystemGetRandomPointInSphere(me, me.E_phParameterSet,origin, 0.75)

To

Code: [Select]
    me.e_phPointRequest = $PathSystem._PathSystemGetRandomPointInSphere(me, me.E_phParameterSet,origin, 2.0)

Richard
Logged

HE-Cooper

  • *****
  • Posts: 2221
    • View Profile
Re: PostEvent error
« Reply #8 on: Feb 19, 13, 09:35:12 AM »

You know why your post was deleted, please refer to the forum rules. We'll check out the error though.

All you did was increase that value from .75 to 2.0? Hmm.
Logged

craigbe

  • Developers
  • *
  • Posts: 69
    • View Profile
Re: PostEvent error
« Reply #9 on: Feb 20, 13, 10:47:11 AM »

I checked mine and it's still the default .75.

Thanks,

Craig
Logged