Jump to content

Script randomly stops? - No value present


Satire

Recommended Posts

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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