HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.
Pages: [1] 2

Author Topic: crash didn't offer me to send a bug report  (Read 4975 times)

AWW_boss

  • General Accounts
  • *
  • Posts: 846
  • gdfgd
    • View Profile
crash didn't offer me to send a bug report
« on: Oct 02, 13, 12:14:19 PM »

I just got a client crash, but it didn't offer me to send a bug report.

It seems it can be reproduced like this:

I was spamming (with a button click) this line of code during a teleport to a new area:

account as NodeRef of Class E_playerAccount = GetAccountID()


I think it's worth to take a look.

Cheers!
Logged

AWW_boss

  • General Accounts
  • *
  • Posts: 846
  • gdfgd
    • View Profile
Re: crash didn't offer me to send a bug report
« Reply #1 on: Aug 31, 14, 11:27:41 AM »

Hi!

I still have this issue, but i guess noone belives me. :(

I think this is a major bug, so i'll invest some more of my preciouss engineering time into fault reproduction in my crystal clean world.

to reproduce:

1. modify E_AbilityBarClassMethods

replace this

      is "Ability1"
        println("Ability1: Weapon Strike")
        SendCommand("/ability use abWeaponStrike")
      .

with this

      is "Ability1"
        account as NodeRef of Class E_playerAccount = GetAccountID()
        if (account <> None)
          player as NodeRef of Class E_playerCharacter = account.GetMyCharacter()
        .
      .

2. teleport to NEW INSTANCE of an area called LargeArea (it is under ExampleAreas folder)
(i tried with new instance of Clean Test, but i was unable to reproduce --> i guess the area loading time has to be greater)

3. immediately start spamming(quickly) the weaponstrike button

4. at some point the client will die (if the client did not die, that means you did not spam it quickly enough)


« Last Edit: Aug 31, 14, 11:30:41 AM by AWW_boss »
Logged

AWW_boss

  • General Accounts
  • *
  • Posts: 846
  • gdfgd
    • View Profile
Re: crash didn't offer me to send a bug report
« Reply #2 on: Aug 31, 14, 11:42:12 AM »

This video should give you a general feel on reproductions steps (here is teleporting to new instance and button spamming, the buttom is spammed all the way to the end of the video):


https://www.youtube.com/watch?v=BAuknNiNa-A&feature=youtu.be


Not sure if this helps too much, but i hope it does.
Logged

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: crash didn't offer me to send a bug report
« Reply #3 on: Aug 31, 14, 01:23:45 PM »

Stop me if you heard this one.  A man goes to a see a doctor and tells him, "Doc, it hurts every time I lift my arm.  What should I do?"  The doctor replied, "Stop lifting your arm."  Buh dum bum.

But seriously.  I don't know what could be happening, but do you have a really good reason to be repeatedly calling that line?  Perhaps there is another way to accomplish what you want to do.
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

AWW_boss

  • General Accounts
  • *
  • Posts: 846
  • gdfgd
    • View Profile
Re: crash didn't offer me to send a bug report
« Reply #4 on: Aug 31, 14, 01:37:34 PM »

I have no choice, i need to get a reference to a player Node to do some logic when a player hits the button:

        player as NodeRef of Class E_playerCharacter = account.GetMyCharacter()


Also, I cannot control how many times a player will hit the button. I could perhaps introduce some ugly logic to disable interface during teleportation, but why? This is a bug , it could manifest in some other way, and it should be fixed and this way the product will be better.
« Last Edit: Aug 31, 14, 01:42:34 PM by AWW_boss »
Logged

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: crash didn't offer me to send a bug report
« Reply #5 on: Aug 31, 14, 02:35:52 PM »

I see.  What happens every time a character changes to a new area instance, their _playerCharacter node is replicated to the client.  You can see this in E_playerAccount method HE_OnReplicationNodeAdded(), if you haven't removed that. There is specific code that runs when the local player character is received.  That node is not available until that point in time, so I would guess that is what is happening when you try to repeatedly access a node that is not ready, yet.

Since you would not be able to do anything with the player character until it has been received, you should disable that button functionality until the local player character has been received.  Maybe that will help.
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

AWW_boss

  • General Accounts
  • *
  • Posts: 846
  • gdfgd
    • View Profile
Re: crash didn't offer me to send a bug report
« Reply #6 on: Aug 31, 14, 03:03:05 PM »

Quote
Since you would not be able to do anything with the player character until it has been received, you should disable that button functionality until the local player character has been received.  Maybe that will help.

That should work as a temporary workaround, thanks. But you have to agree that the final solution would be a fix of the problem at the underlaying code--> perhaps next time it would manifest itself in some other form? This is not some random error, this is a client crash we're talkin about.

It would be very helpful if you could perhaps try to reproduce at your side (shouldn't be too hard), just to confirm that the other developers are getting it as well.

Logged

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: crash didn't offer me to send a bug report
« Reply #7 on: Aug 31, 14, 03:32:42 PM »

What I am trying to say is that it is not a bug, but comes from the way that the system is designed.  Whenever a player account changes to another area instance*, there is a slight delay from when that account first begins to load into the area and when the account's character node is available on the client.  If that understanding is correct, then it is not something to be fixed, but simply how the engine works.  My team deals with that ourselves as we use non-seamless travel.

*At least for non-seamless travel.  I do not know about seamless travel.
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

AWW_boss

  • General Accounts
  • *
  • Posts: 846
  • gdfgd
    • View Profile
Re: crash didn't offer me to send a bug report
« Reply #8 on: Aug 31, 14, 04:16:56 PM »

I always agree with you, but i must say (with all due respect) that i strongly disagree this time :)

I claim that it is bug, because the client crashes.
If it continued to return None through out the teleport, it would be fine, but the fact that the client crashes makes this a bug, large as a house.
Logged

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: crash didn't offer me to send a bug report
« Reply #9 on: Aug 31, 14, 08:33:19 PM »

have you tried it with the player client?

The crashing is probably to do with the error spam your generating during a HeroBlade transition.

Have to keep in mind when you change areas in HeroBlade it's not just paying attention to client data, but the entire server data structure, the server repop, the client repop, every instance visible or not, the paths system is looking for paths to put into the editor, the particle system is looking for things, etc etc.

Not saying it's not an issue, but can you reproduce it in the player client where the HeroBlade loading isn't additive to the problem.

Might help pin point the issue.

All scott is saying is spamming a null reference is always bad, and you would never let a player be able to do that in the first place.
For example what reason game logic wise would a player be able to spam such a reference?

Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

AWW_boss

  • General Accounts
  • *
  • Posts: 846
  • gdfgd
    • View Profile
Re: crash didn't offer me to send a bug report
« Reply #10 on: Sep 01, 14, 12:22:09 AM »

Quote
All scott is saying is spamming a null reference is always bad, and you would never let a player be able to do that in the first place.
For example what reason game logic wise would a player be able to spam such a reference?

This is one of the dozens of code snippets i am using to handle client input (not only buttons, but all other input as well). Each one of these snippets can potentially result with crash if ran during the teleportation:
Code: [Select]
    if args.leftButton == true
 
      account as NodeRef of Class E_playerAccount = GetAccountID()
      if (account == None)
        return
      .
      myPlayerCharacter as NodeRef of Class MUD_playerCharacter = account.GetMyCharacter()

      if (myPlayerCharacter.MUD_characterTargetsList.length == 1)
        call server E_playerAccountClassMethods:CommandPanelAttackStop(account)
      else
        println("Already stopped attacking.")
      .

    .
Logged

HE-Cooper

  • *****
  • Posts: 2221
    • View Profile
Re: crash didn't offer me to send a bug report
« Reply #11 on: Sep 01, 14, 01:17:38 AM »

I would armor any game to prevent user input while doing major system work like area transitions where things like clients and servers may not be synced up, or account and character nodes may be in transition. Just imagine in a complex architecture how many asynchronous processes are running as both client and server try to build an entirely new world for your character during a teleport.

World of Warcraft is a good example. Early on mods existed to allow the user to see things like chat and status during load screen transitions between area servers, things which were normally just hidden on the client behind a load screen. But this caused a number of issues and syncing problems, so they eventually had to provide armoring against unwanted input during those scenarios.
Logged

WorldWideZ

  • World Owners
  • ****
  • Posts: 524
    • View Profile
    • World Wide Zed
Re: crash didn't offer me to send a bug report
« Reply #12 on: Sep 01, 14, 02:01:15 AM »

you could maybe disable your command layer during the transition? (assuming of course you have a game specific command layer for your inputs) That way none of your game buttons will interfere with the loading screen.
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1160
  • Never stop learning
    • View Profile
Re: crash didn't offer me to send a bug report
« Reply #13 on: Sep 01, 14, 02:10:34 AM »

Basically, your missing some lines to clean it up.

change this:

Code: [Select]
    if args.leftButton == true
 
      account as NodeRef of Class E_playerAccount = GetAccountID()
      if (account == None)
        return
      .
      myPlayerCharacter as NodeRef of Class MUD_playerCharacter = account.GetMyCharacter()

      if (myPlayerCharacter.MUD_characterTargetsList.length == 1)
        call server E_playerAccountClassMethods:CommandPanelAttackStop(account)
      else
        println("Already stopped attacking.")
      .

    .

to this:

Code: [Select]
    if args.leftButton == true
 
      account as NodeRef of Class E_playerAccount = GetAccountID()
      if (account == None)
        return
      .
      myPlayerCharacter as NodeRef of Class MUD_playerCharacter = account.GetMyCharacter()
      if (myPlayerCharacter == None)
         return
      .

      if (myPlayerCharacter.MUD_characterTargetsList.length == 1)
        call server E_playerAccountClassMethods:CommandPanelAttackStop(account)
      else
        println("Already stopped attacking.")
      .

    .
Logged
Lead scripter for EO, Repop helper.
HSL Video tutorials:
https://community.heroengine.com/forums/index.php/topic,1719.msg36858.html#msg3685

AWW_boss

  • General Accounts
  • *
  • Posts: 846
  • gdfgd
    • View Profile
Re: crash didn't offer me to send a bug report
« Reply #14 on: Sep 01, 14, 04:19:18 AM »

I see all of your points and thank you very much for offering workarounds(which i will implement for sure), but the client should not crash, no matter what i do from heroscript.
Here is the proof:


http://hewiki.heroengine.com/wiki/HSL_For_Programmers

*snip*

At a Glance:
Powerful, 1st class programming language
Object Oriented / Procedural
Used on Client & Server
You make your game in HSL (not C++)
Unique Dynamic Data Data Model
Fault Tolerant (scripts don't crash things)
Full IDE-like support right in HeroBlade
Real-Time, changes are immediate

*snip*

« Last Edit: Sep 01, 14, 04:25:43 AM by AWW_boss »
Logged
Pages: [1] 2