Small default stack size in S60 3rd Edition
The default stack size in S60 3rd Edition is only 8 kB, which may not be enough for more complex applications.
S60 3rd Edition
July 7, 2006
With Symbian OS v9, the default stack size was reduced from 20 kB to 8 kB to optimize memory consumption because platform security caused an increase in the number of running processes in the system.
In practice, the 8 kB stack has proven to be quite small for any larger S60 application. Even if the stack size were sufficient when the application is run on current devices, there is an increased risk of crashes due to stack overflow in future S60 3rd Edition devices as new features can cause a slight increase in stack consumption of the platform libraries. Thus, using a too small size for the stack endangers also binary compatibility.
Increasing the stack size to 20 kB is recommended for all applications written with the S60 3rd Edition SDK. Applications need to be recompiled in order to modify the stack size.
How to reproduce
Stack sizes other than the default 8 kB can be configured with the epocstacksize statement in the .mmp project definition file.
The size of the stack, in bytes, can be specified in decimal or hexadecimal format. Using this statement will have no effect under the WINSCW/WINS platforms.
For example, adding the following line to the .mmp file will increase the stack size to 20 kB:
Alternatively, stack size can be defined for a new thread when creating the thread.