Satire Posted April 6, 2019 Share Posted April 6, 2019 (edited) So when I use CLI, I witnessed this weird "error". This is not coming from my script. It basically stops the script and says "no value present". This only seems to happen when I launch it with CLI, 20% chance of it happening. Which is a big problem for me, since I'm going for a mass scale client run here. EDIT2: script just randomly stopped too, for no apparent reason. I don't have any stops being called and this only seems to happen with cli & slow proxies. For whatever damn reason too... Edited April 6, 2019 by Satire Quote Link to comment Share on other sites More sharing options...
Token Posted April 6, 2019 Share Posted April 6, 2019 Look for any try/catch blocks in your onStart/onLoop especially, that's where the error is most likely coming. Quote Link to comment Share on other sites More sharing options...
Satire Posted April 6, 2019 Author Share Posted April 6, 2019 1 hour ago, Token said: Look for any try/catch blocks in your onStart/onLoop especially, that's where the error is most likely coming. Yea, I have a try/catch block to catch npe's, but an exception is never caught (in this case). When there is an exception, it gets caught and the script still runs. So essentially, I'm not allowed to have a try/catch block in my onloop? I don't really see how that breaks it all, given it isn't even wrapped around the whole function (rather than just my node handler). Quote Link to comment Share on other sites More sharing options...
Token Posted April 6, 2019 Share Posted April 6, 2019 (edited) 11 minutes ago, Satire said: Yea, I have a try/catch block to catch npe's, but an exception is never caught (in this case). When there is an exception, it gets caught and the script still runs. So essentially, I'm not allowed to have a try/catch block in my onloop? I don't really see how that breaks it all, given it isn't even wrapped around the whole function (rather than just my node handler). I was just pointing out the message you didn't know where it was coming it the message of a NoValuePresentException or w/e its called, which happens when you call get on an empty optional (call isPresent before), and then printed in a catch block Edited April 6, 2019 by Token Quote Link to comment Share on other sites More sharing options...
Satire Posted April 6, 2019 Author Share Posted April 6, 2019 10 minutes ago, Token said: I was just pointing out the message you didn't know where it was coming it the message of a NoValuePresentException or w/e its called, which happens when you call get on an empty optional (call isPresent before), and then printed in a catch block Aah Ok, that makes sense. But what doesn't make sense is why the script stopped. Quote Link to comment Share on other sites More sharing options...
Token Posted April 6, 2019 Share Posted April 6, 2019 10 minutes ago, Satire said: Aah Ok, that makes sense. But what doesn't make sense is why the script stopped. Can't make many assumptions without the actual code, but maybe you have an uncaught exception in onStart. Quote Link to comment Share on other sites More sharing options...
Satire Posted April 6, 2019 Author Share Posted April 6, 2019 14 minutes ago, Token said: Can't make many assumptions without the actual code, but maybe you have an uncaught exception in onStart. The actual code is pretty damn big. It's like 9000 lines. So yea... quite hard to debug. From what I can see, nothing in onStart can NPE, so I think it's safe to say that isn't apart of it (since this also happens randomly, throughout the duration of the script). I've made a few changes, will see how it goes. Quote Link to comment Share on other sites More sharing options...