Log warning without call stack

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Post Reply
Kkkosatkin
Posts: 14
Joined: 09 Sep 2025, 13:10

Log warning without call stack

Post 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
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Log warning without call stack

Post 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
Lapo
--
gotoAndPlay()
...addicted to flash games
Kkkosatkin
Posts: 14
Joined: 09 Sep 2025, 13:10

Re: Log warning without call stack

Post 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
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Log warning without call stack

Post 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
Lapo
--
gotoAndPlay()
...addicted to flash games
Kkkosatkin
Posts: 14
Joined: 09 Sep 2025, 13:10

Re: Log warning without call stack

Post 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.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Log warning without call stack

Post 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
Lapo
--
gotoAndPlay()
...addicted to flash games
Kkkosatkin
Posts: 14
Joined: 09 Sep 2025, 13:10

Re: Log warning without call stack

Post 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
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Log warning without call stack

Post by Lapo »

Yeah... we don't need the decompiled code :D We know it already. I was asking for a reproducible case.
Thanks anyways.
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Log warning without call stack

Post by Lapo »

If you find a way to reproduce the problem please let us know.

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply