Team Spartan Cookies & Milk Forums
  • Issue Tracker
  • Donations
  • Search
  • Member List
  • Help

Register

Team Spartan Cookies & Milk Forums Garry's Mod Starfall v
« Previous 1 … 12 13 14 15 16 … 18 Next »
Error in starfall !
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pages (2): 1 2 Next »
Threaded Mode
Error in starfall !
06-08-2015, 10:14 AM,
#1
Yuri6037 Offline
TSCM Member
***
Posts: 216
Threads: 45
Joined: Feb 2015
Error in starfall !
Before the last server reboot everything was working fine (only chat methods had a bug). But now most of find functions are broken they all crashs !

For example when I use ents.self:getConstraints() it instantly crashs and not on my files on server starfall addon files : addons/starfall/lua/starfall/libs_sv/constrain.lua:98: Operations quota exceeded. Ops: 500500 !

What happened ? Did someone lowered the OPS limit ? Did you broke the functions ? What have you done so I can no longer make any AI working on my MainShip with more than 700 entities ?
Find
Reply
06-08-2015, 10:19 AM, (This post was last modified: 06-08-2015, 10:28 AM by LocInt.)
#2
LocInt Offline
Long gone
****
Posts: 489
Threads: 91
Joined: Aug 2014
RE: Error in starfall !
Starfall API propably got an update and it's calculating ops differently.

тѕсм.Person8880 hovers the nerf bat over Tetryon damage
Website Find
Reply
06-08-2015, 11:22 AM,
#3
SuperPlayer Offline
TSCM Super Member
****
Posts: 234
Threads: 30
Joined: Oct 2014
RE: Error in starfall !
What you described can happen if your Ship has many props and you are looping through them. One factot can also be how many more props are spawned on the server. But i dobt think something got changed because my stuff works fine.
Find
Reply
06-08-2015, 01:18 PM, (This post was last modified: 06-08-2015, 01:25 PM by Yuri6037.)
#4
Yuri6037 Offline
TSCM Member
***
Posts: 216
Threads: 45
Joined: Feb 2015
RE: Error in starfall !
SuperPlayer, it's not the iterating code that crashes ! Just call local tbl = ents.self():getConstraints() and it will instantly crash with the error I gave...

EDIT : I'll see by removing my OPS Limit Iterator bypass lib, but I'm praticaly sure the problem happens inside the function getConstraints !
EDIT 2 : That was exactly what I was thinking, removing my bypass lib call results in the same problem at the same location in my file and at the same location on server Starfall lib file ! They forcely made something to Starfall, because the problem is strange and realy weird, whem spaming the Starfall Processor paste tool, LanAI finishes by loading like before !!
Find
Reply
06-08-2015, 01:39 PM,
#5
rouing Offline
#RBR15 - Rekt by Rouing 2015
****
Posts: 295
Threads: 27
Joined: Jul 2014
RE: Error in starfall !
getConstraints iterates through all the entities that entity is constrained too. The issue with that is: On larger ships it will try throwing 500 or so entities into a table instantly. As a result you cap over 500K ops and you quota out. It is best to use a custom get constraints function that uses coroutines to avoid this issue on larger ships.

What is this love you speak of?
Find
Reply
06-08-2015, 03:59 PM, (This post was last modified: 06-08-2015, 04:00 PM by Yuri6037.)
#6
Yuri6037 Offline
TSCM Member
***
Posts: 216
Threads: 45
Joined: Feb 2015
RE: Error in starfall !
Rouing just the simple code local tbl = ents.self():getConstraints() causes instant crash ! Without any loop it still crahses ! If I had access to ents.GetAll() I could bypass it but I haven't access to it !
Find
Reply
06-08-2015, 04:01 PM, (This post was last modified: 06-08-2015, 04:23 PM by rouing.)
#7
rouing Offline
#RBR15 - Rekt by Rouing 2015
****
Posts: 295
Threads: 27
Joined: Jul 2014
RE: Error in starfall !
(06-08-2015, 03:59 PM)Yuri6037 Wrote: Rouing just the simple code local tbl = ents.self():getConstraints() causes instant crash !

Yes. getConstraints has to do ALOT OF WORK on LARGE SHIPS. You need to under stand that if you run it on a large ship: It is trying to INSTANTLY PUSH ALL THE ENTS TO ONE ARRAY. INSTANTLY (almost). Create another getConstraints using coroutines.

use getSingleContstrainedEnts()

What is this love you speak of?
Find
Reply
06-08-2015, 05:46 PM,
#8
Person8880 Offline
gpj.ecafllorT
*******
Posts: 2,407
Threads: 45
Joined: Sep 2013
RE: Error in starfall !
There was a bug that was part of the reason for the chat methods bug, where the time and ops quota would stop being measured. You probably had code running under this scenario which did not trigger the quota before but now does.

As Rouing has been saying, constraint searching is a slow operation due to recursion through every constraint in the system. Large ships will hit it quite quickly.
Find
Reply
06-08-2015, 05:59 PM,
#9
rouing Offline
#RBR15 - Rekt by Rouing 2015
****
Posts: 295
Threads: 27
Joined: Jul 2014
RE: Error in starfall !
Link320s shared lib folder has a good example of using the coroutine lib and iterate for a getConstraints replacement

What is this love you speak of?
Find
Reply
06-08-2015, 06:02 PM,
#10
Yuri6037 Offline
TSCM Member
***
Posts: 216
Threads: 45
Joined: Feb 2015
RE: Error in starfall !
(06-08-2015, 05:46 PM)Person8880 Wrote: There was a bug that was part of the reason for the chat methods bug, where the time and ops quota would stop being measured. You probably had code running under this scenario which did not trigger the quota before but now does.

As Rouing has been saying, constraint searching is a slow operation due to recursion through every constraint in the system. Large ships will hit it quite quickly.

So you mean that it's finished and when you reach 800 entities you can't make an AI that needs to iterate over all entities.
Find
Reply
« Next Oldest | Next Newest »
Pages (2): 1 2 Next »


  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)
Contact UsTeam Spartan Cookies & MilkReturn to TopLite (Archive) ModeMark all forums readRSS Syndication

Powered By MyBB, © 2002-2026 MyBB Group.