Team Spartan Cookies & Milk Forums
Starfall critical error client side - 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: Starfall critical error client side (/thread-1113.html)



Starfall critical error client side - Yuri6037 - 18-07-2015

Hello all,

Again I'm posting that in the hope Person or a developper of Starfall can help me. Sometimes when The Raven watches our screens, he succeeds to crash them both at the same time with an unexpected exception I never saw : "net message not started". The error seams to happen only on the first net message I'm sending. This first net message is part of hacking process to cancel the Right Click -> Restart Client Instance.
Usualy it sends a net message with just a string "REBOOT". And it seams that when calling net.start it crashes. Is there any way to fix the error or catch it ?


RE: Starfall critical error client side - LocInt - 18-07-2015

How fast are you trying to start net message? If you paste your chip to ground and try to send a net message instantly it only works once and then stop working. Wait a while and then try to send net message. Lets say 10 seconds.


RE: Starfall critical error client side - Person8880 - 18-07-2015

You should be doing:
if net.start() then
--Write stuff
end
for every net message you send.


RE: Starfall critical error client side - Yuri6037 - 19-07-2015

(18-07-2015, 06:37 PM)Person8880 Wrote: You should be doing:
if net.start() then
--Write stuff
end
for every net message you send.

Ok well you ask to remake 50% of the code ! There ar sooooo many net.start in Ship AI II and there are less in all screens... What about if I patch the net.start function to cancel it whenever if (not(oldnet.start)) then I cancel (return) ?


RE: Starfall critical error client side - Person8880 - 19-07-2015

The problem is you're assuming a net message has started when you start to write data to it. Returning in a wrapper net.start() will do nothing. You would have to throw an error to stop it getting to the first write method. This is the entire reason why it returns a boolean value to indicate whether you actually can start a net message, so you can stop before you write anything.

Sorry, but there's little way out of changing what you have to be correct. Tongue


RE: Starfall critical error client side - Yuri6037 - 19-07-2015

(19-07-2015, 12:12 PM)Person8880 Wrote: The problem is you're assuming a net message has started when you start to write data to it. Returning in a wrapper net.start() will do nothing. You would have to throw an error to stop it getting to the first write method. This is the entire reason why it returns a boolean value to indicate whether you actually can start a net message, so you can stop before you write anything.

Sorry, but there's little way out of changing what you have to be correct. Tongue

Ok then I'll make a helper function that will take a function as parameter where i'll put my net code. The helper function will run the function parameter only when it's net.start returns true.


RE: Starfall critical error client side - JC2106 - 01-08-2015

For one I was no where near you at this time and two what do you mean my succeeds to crash them both at the same time. Are you implying that it was intentional? Because I assure you it was not. And I apologise for any inconvenience I may have unintentionally caused you.

~ The Raven


RE: Starfall critical error client side - Yuri6037 - 01-08-2015

The Raven, I'm not blaming you at all.

I appologies if you understood I was blaming you... I just said that when you were near my old AI II, it was crashing it as well as all my screens using AI II lib. But now the problem is solved you should just have updating bugs only on your side but it would no longer crash everything.