In GUI application the RWsSession object you get (probably from CEikonEnv or CCoeEnv) is an existing, initialized object.
In non-GUI application you have to initialize an RWsSession object for yourself.
If you tried getting wsSession from CEikonEnv/CCoeEnv in GUI-less code, that was an usage attempt on a NULL-pointer, which results in a KERN-EXEC 3 error message. Here it is probably worth mentioning that the phones hide these error messages by default, but you can enable them as described here: http://www.developer.nokia.com/Commu...ded_panic_code
...use the object here...
CleanupStack::PopAndDestroy(); // wsSession is Close-d here