![]() |
|
Error in starfall ! - Printable Version +- Team Spartan Cookies & Milk Forums (https://teamscm.co.uk) +-- Forum: Garry's Mod (https://teamscm.co.uk/forum-4.html) +--- Forum: Starfall (https://teamscm.co.uk/forum-7.html) +--- Thread: Error in starfall ! (/thread-1199.html) Pages:
1
2
|
Error in starfall ! - Yuri6037 - 06-08-2015 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 ? RE: Error in starfall ! - LocInt - 06-08-2015 Starfall API propably got an update and it's calculating ops differently. RE: Error in starfall ! - SuperPlayer - 06-08-2015 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. RE: Error in starfall ! - Yuri6037 - 06-08-2015 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 !! RE: Error in starfall ! - rouing - 06-08-2015 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. RE: Error in starfall ! - Yuri6037 - 06-08-2015 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 ! RE: Error in starfall ! - rouing - 06-08-2015 (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() RE: Error in starfall ! - Person8880 - 06-08-2015 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. RE: Error in starfall ! - rouing - 06-08-2015 Link320s shared lib folder has a good example of using the coroutine lib and iterate for a getConstraints replacement RE: Error in starfall ! - Yuri6037 - 06-08-2015 (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. 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. |