Author Topic: stackoverflowexception tnet & astar pathfinding  (Read 1940 times)

thelebaron

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 15
    • View Profile
stackoverflowexception tnet & astar pathfinding
« on: June 17, 2014, 02:18:41 AM »
I'm trying to couple the Astar pathfinding project with tnet, and sending the path over via rfc seems to cause a stackoverflowexception, maybe the path is too much data? Besides performance issues of sending alot of data, is there a limit of what can be sent(I believe what is being sent is a list of vector3's, how much exactly Im not sure). I was wondering if you knew of any multiplayer enabled pathfinding solutions, this seems to be something I havent had any success in finding for unity.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: stackoverflowexception tnet & astar pathfinding
« Reply #1 on: June 17, 2014, 02:25:03 PM »
What are you sending exactly? What data type? Is it really a Vector3[] (array)?

Stack overflow generally would imply here that it interprets the incoming data as individual parameters rather than an array. Did you debug to see what type of data arrives and compared it to the type of data that was sent?

thelebaron

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 15
    • View Profile
Re: stackoverflowexception tnet & astar pathfinding
« Reply #2 on: June 17, 2014, 07:00:34 PM »
What Im trying to send is a System.Collections.Generic.List<Vector3>. How do I do a debug to verify the data?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: stackoverflowexception tnet & astar pathfinding
« Reply #3 on: June 17, 2014, 08:09:36 PM »
TNManager.OnForwardPacket function, line 1041 and 1045 call ReadArray(), which in turn reads each parameter one at a time. Debug that function, see what you're getting, then add more debug code into the ReadObject() function. Make note of what types you're getting by printing the 'prefix'.