Jump to content

Script randomly stops? - No value present


Recommended Posts

Posted (edited)

1a6e46ff83.png

 

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 by Satire
Posted
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). 

Posted (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 by Token
Posted
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. 

Posted
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. 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...