Hi everyone,
is it only me who gets this panic KERN-EXEC 3 while running my app on the phone, while the app works smoothly without any problems, panics or leaks on the emulator(!) ? What else can I do to fix it. I tried on-device debugging (carbide + trk) but all the tools developed for s60 3rd ed. seem to be messed up, they don't work as they should. So maybe there are some other ways to fix such issues..
KERN-EXEC 3 panic is raised when an unhandled exception occurs. Exceptions have many causes, but the most common are access violations caused, for example, by dereferencing NULL. Among other possible causes are: general protection faults, executing an invalid instruction, alignment checks, etc.
Thank you for your reply, but I have already seen this error description a lot of times, and studied it thoroughly at least in terms of running apps on the emulator. The thing is the app works in the emulator! If there were any NULL pointer references the error would come up everytime. The whole app works perfectly on the emulator. So what on Earth is wrong on the device? When I run the app on a newer phone like Nokia N81 the app also works perfectly, but on Nokia E60.. as soon as I start showing e.g. CAknQueryDialog or CAknForm there comes a crash! KERN-EXEC 3, which in this case doesn't give me any clue:/ Can anybody explain it to me?
Maybe there is something wrong with the framework?! but then how come all the other apps originally installed on the phone work ?
One thing which I didn't do is the alignment check. Usually the compiler takes care of putting the data in the right place with the right alignment (every single variable data must reside within single 4 byte set on ARM processor, otherwise the processor will fail trying to read the right data).
If there is anyone who has experience with the problem I am facing, please share your remarks.
It' probably not much of a hint, but nevertheless: Do you have anything timing-dependent in your program? Threads perhaps, that have to synchronize something? Because with some things dependent on timing, already small differences in execution speed (say, somewhat slower CPU in the E60) can push your program over the edge, if a racing condition lurks somewhere in there.
Ha, by default S60 3rd Ed apps are given 8kB of stack.. some time ago I tried with higher, so I even tripled this size to 24kB and still KERN-EXEC 3 (which may also mean Stack Overflow) and after that I gave it up. Somehow I didn't think my app would need yet more of stack. Today when you suggested 80kB (max) I decided to try it and.. IT WORKED!! No crashes. Thank you tonis:) your first post in this forum turned out to be really helpful
If you need that much stack space you should have a look see if you are using it inefficiently i.e. by declaring lots of large TBufs (TFileName etc.) etc. on the stack
Actually I am getting a similar error (KERN-EXEC 3) on device only, it happens when I dynamically load a library (javascriptcore_gcce.dll) which I built from source available on http://opensource.nokia.com/projects/S60browser/. I increased stack size in the library mmp file but this did not solve the problem.
I am very surprised how the open source JavaScriptCore from Webkit which is ported to Symbian would not build and run on device!
Please help.
Actually there is nothing can be referred to as "my code". I just downloaded the javascriptcore from the site above and compiled it using carbide.c++ 1.3. I wonder how they compiled the dll and it runs smoothly on all 3rd edition devices!
your application is running on emulator successfully.
you can read release note from downloaded application. There you can see how to run on emulator and device.
Forum posts: 201
Hi,
KERN-EXEC 3 panic is raised when an unhandled exception occurs. Exceptions have many causes, but the most common are access violations caused, for example, by dereferencing NULL. Among other possible causes are: general protection faults, executing an invalid instruction, alignment checks, etc.
Thanks & Regards
Ram
Symbian OS 9.1,S60 3rd edition MR,and Carbide.C++
Forum posts: 9
Thank you for your reply, but I have already seen this error description a lot of times, and studied it thoroughly at least in terms of running apps on the emulator. The thing is the app works in the emulator! If there were any NULL pointer references the error would come up everytime. The whole app works perfectly on the emulator. So what on Earth is wrong on the device? When I run the app on a newer phone like Nokia N81 the app also works perfectly, but on Nokia E60.. as soon as I start showing e.g. CAknQueryDialog or CAknForm there comes a crash! KERN-EXEC 3, which in this case doesn't give me any clue:/
Can anybody explain it to me?
Maybe there is something wrong with the framework?! but then how come all the other apps originally installed on the phone work ?
One thing which I didn't do is the alignment check. Usually the compiler takes care of putting the data in the right place with the right alignment (every single variable data must reside within single 4 byte set on ARM processor, otherwise the processor will fail trying to read the right data).
If there is anyone who has experience with the problem I am facing, please share your remarks.
Regards
Forum posts: 1156
It' probably not much of a hint, but nevertheless: Do you have anything timing-dependent in your program? Threads perhaps, that have to synchronize something? Because with some things dependent on timing, already small differences in execution speed (say, somewhat slower CPU in the E60) can push your program over the edge, if a racing condition lurks somewhere in there.
René Brunner
Forum posts: 1
Hi,
I have experienced a very similar problem today.
And the solution I tried and finally confirmed is: set stack size in mmp file higher, such as "EPOCSTACKSIZE 0x14000".
Hope that will help you and good luck!
Forum posts: 9
Ha, by default S60 3rd Ed apps are given 8kB of stack.. some time ago I tried with higher, so I even tripled this size to 24kB and still KERN-EXEC 3 (which may also mean Stack Overflow) and after that I gave it up. Somehow I didn't think my app would need yet more of stack. Today when you suggested 80kB (max) I decided to try it and.. IT WORKED!! No crashes. Thank you tonis:) your first post in this forum turned out to be really helpful
Forum posts: 152
If you need that much stack space you should have a look see if you are using it inefficiently i.e. by declaring lots of large TBufs (TFileName etc.) etc. on the stack
Forum posts: 2
Actually I am getting a similar error (KERN-EXEC 3) on device only, it happens when I dynamically load a library (javascriptcore_gcce.dll) which I built from source available on http://opensource.nokia.com/projects/S60browser/. I increased stack size in the library mmp file but this did not solve the problem.
I am very surprised how the open source JavaScriptCore from Webkit which is ported to Symbian would not build and run on device!
Please help.
Forum posts: 201
There will be another problem then EPOCSTACKSIZE problem in your application. So you are getting this panic(KERN-EXEC 3) due to another problem.
Thanks & Regards
Ram
Symbian OS 9.1,S60 3rd edition MR,and Carbide.C++
Forum posts: 2
Actually there is nothing can be referred to as "my code". I just downloaded the javascriptcore from the site above and compiled it using carbide.c++ 1.3. I wonder how they compiled the dll and it runs smoothly on all 3rd edition devices!
Forum posts: 201
your application is running on emulator successfully.
you can read release note from downloaded application. There you can see how to run on emulator and device.
Thanks & Regards
Ram
Symbian OS 9.1,S60 3rd edition MR,and Carbide.C++