Page 1 of 1

Log warning without call stack

Posted: 20 Nov 2025, 08:22
by Kkkosatkin
Hello! I have a log warning with exception and without callstack. How can I track where error came from or maybe fix?

WARN SFSWorker:Sys:3 controllers.v290.SystemReqController java.lang.NullPointerException

Re: Log warning without call stack

Posted: 20 Nov 2025, 10:46
by Lapo
Hi,
this is usually caused by the JIT compiler when optimizing code that is invoked very often.
There's a specific setting to get the stack traces back:
-XX:-OmitStackTraceInFastThrow
You can add it to your configuration, via the AdminTool > Server Settings > JVM Settings, then saving and restarting SFS2X.

Hope it helps

Re: Log warning without call stack

Posted: 21 Nov 2025, 16:04
by Kkkosatkin
Lapo wrote: 20 Nov 2025, 10:46 Hi,
this is usually caused by the JIT compiler when optimizing code that is invoked very often.
There's a specific setting to get the stack traces back:
-XX:-OmitStackTraceInFastThrow
You can add it to your configuration, via the AdminTool > Server Settings > JVM Settings, then saving and restarting SFS2X.

Hope it helps
Thanks, thats really helped with viewing call stack. Further research using decompiler showed that error can be on a server side, addBuddy function, on error handling block.
"throw new SFSBuddyListException("Cannot add Buddy to " + ownerName + " BuddyList. The BuddyList was not loaded first.");" - there is no "errorData" parameter here

Re: Log warning without call stack

Posted: 21 Nov 2025, 17:27
by Lapo
Kkkosatkin wrote: 21 Nov 2025, 16:04 "throw new SFSBuddyListException("Cannot add Buddy to " + ownerName + " BuddyList. The BuddyList was not loaded first.");" - there is no "errorData" parameter here
Yes, because there is no server notification sent back to client about this error.
You should catch the issue when you're testing and fix the client by initializing the BuddyList in the LOGIN event, and before allowing users to add buddies to their list.

Cheers

Re: Log warning without call stack

Posted: 27 Nov 2025, 12:05
by Kkkosatkin
Hello again. I mean, there is an error on server-side code. There is no argument to the error at class constructor, at throwing error exception.

throw new SFSBuddyListException("Cannot add Buddy to " + ownerName + " BuddyList. The BuddyList was not loaded first.") - require "errorData" parameter here. Parent class SFSException constructor set "errorData = null", but the "notifyRequestError" function try to get this value. This error causes "java.lang.NullPointerException" on a log viwer when trying to send error notification. On the client-side, we continue to investigate where the error with desync of buddyList.Inited occured.

Re: Log warning without call stack

Posted: 27 Nov 2025, 16:45
by Lapo
Can you provide a step by step description of how to reproduce this?
The details we need are listed here: https://forums.smartfoxserver.com/viewtopic.php?t=16497

Thanks

Re: Log warning without call stack

Posted: 28 Nov 2025, 08:13
by Kkkosatkin
We haven't fully figured out how this case happens on the client, but we are seeing an error on the server side. On the screenshots 1-2 you can see that when error is thrown (SFSBuddyListException), "errorData" parameter is not used in the constructor, but then this parameter is used (3-rd screenshot)
Image
Image
Image

Re: Log warning without call stack

Posted: 28 Nov 2025, 11:13
by Lapo
Yeah... we don't need the decompiled code :D We know it already. I was asking for a reproducible case.
Thanks anyways.

Re: Log warning without call stack

Posted: 05 Dec 2025, 16:16
by Lapo
If you find a way to reproduce the problem please let us know.

Cheers