Reason for application generating panic
| Fri, 2004-10-01 11:12 | |
|
Dear All,
I have ported an application symbian 7.0s ,Series60_v21. On Emulator after execution when control come out of application and want to exit from application(same as hello world) then it gives panic as Program closed :: project name. When same application is ruuning on target it gives panic while executing. But surprising thing is if it run for longer then it gives panic and if it execute for short time it executes fine. So what is the reason it behaves like this. My Guess: 1. Application when finalizes or releases global resources it might that it trying to delete all ready deleted resources ? 2. Application might that not releases used resources from Tls(); 3. Application having some memory leak as it behave on hardware, gives panic while execution. I'm not sure what is happening. Pls help me if you can. Thanks chandrashekhar |
|






Forum posts: 1379
Whats the code/number?
If its just saying "Program Closed" create the file ErrRd (just an empty text file) in the folder C:\system\bootdata.\ Restart your phone/emuator and try again. You will then get something like: "Program Closeed: ALLOC 994839" when it dies.
Post that up here. People will be of more help if they know what the panic code is.
Your also in the wrong forum!
didster
Forum posts: 122
I have checked it throgh ErrRd file but file does contains any err code or other information. After debugging the code i found that exit () function (API) is generating that panic as Program closes.
For testing purpose i have implemented my application as :
switch(aCommand)
{
case EEikCmdExit:
case EAknSoftkeyExit:
Exit(); <------------------- problem
break;
case EProjCommand1:
{
application_main(); // My application entry
_LIT(message,"EXECUTED SUCCESSFULLY");
CAknInformationNote* informationNote = new (ELeave) CAknInformationNote;
informationNote->ExecuteLD(message);
User::After(50);
}
break;
default:
Panic(EProjUi);
break;
}
}
-------------------
chandrashekhar
Forum posts: 1379
It could be absouly anything - deletion of a already deleted pointer, memory leak, and a anything else. Put a break point in the destructors of all you UI class - APPUi, Document, View(s) etc and go from there.
What exactly does it say when it closes?
didster
Forum posts: 122
its working now i can see error code . Actually i was using ErrRd.txt instead ErrRd.
Now error code is ALLOC 12089e240.
What does this error code mean.
Thanks alot
chandrashekhar
Forum posts: 1379
Check:
Everything you .Open you .Close
Everthing you new/NewL you delete
All your C classes derive from CBase (for the cleanup stack to work correctly).
There are other ways of tracking these down, but its tricky with the release versions of the SDK's. Do some searching on here and nokia.
Good luck.
didster
Forum posts: 31
in it they explained a way to get directly the source of memory leak..
that we set a break point on memory change.
Where u append the last 4 digits from the memory leak message (e240 in ur case ) to the application UID (u can get it by setting a break point earily @ the AppDllUid function in the CclassApp class)...
my problem is(I am using VS6) When i make a break point on memory change nothing happens, ie. it don't change.. I guess i am doing it wrong. could any one tell me how to make it right??
thanks in advance
Check:
Everything you .Open you .Close
Everthing you new/NewL you delete
All your C classes derive from CBase (for the cleanup stack to work correctly).
There are other ways of tracking these down, but its tricky with the release versions of the SDK's. Do some searching on here and nokia.
Good luck.
Forum posts: 122
Do any one suggest how to know the name of the variable on particular address. I Mean by address, can I know the variable name or lebel.
--------------
chandrashekhar
Forum posts: 1379
Private message me and I will see if I can help u some more.
didster
Forum posts: 53
JUST the release version?! You're being too kind!
The problems start even before you actually code anything...!
The latest Series60 v2.x SDK from a certain large compaNy needs nt to install anything and it refuses to even unpack without it!
oh, and this "requirement" isn't anywhere on their site (or the links to the download), or, say, somewhere nearby the other listed requirements like perl and the other clutter necesssary.
An "absolute arse" summs it up well, especially since we only needed a single file from the thing !
Of course, this latest SDK debacle is just one in a long line of 'em, but that really isn't Symbian's fault.
Forum posts: 1379
I use the release vs debug debate to really mean "debug with all the OS source".
Its quite simple detecting memory leaks then
I blame the "big company" more than Sym them selfs - go learn how to write documentation people...
didster
Forum posts: 53
... unless (of course) it's anything like the general SDK source -- in which case, it would surely be a double-edged sword!
Agreed, the "big company" has an awful lot to learn about supporting development versus ignoring it -- especially when it comes to smaller developers.
...and, on a completely unrelated note, do you happen to know if the words "support" and "ignore" share nearly identical spellings in Finnish? ... you know, something that could get mixed up with a simple typo?
Forum posts: 1379
Actually I didn't know that - but it explains a lot
didster
Forum posts: 122
Thanks alot for encouragement. After going through the various check I found that this exception is not coming on WIN Release & on target Hardware( series 60). So for time being I have left this task in pending.
But it seems that only in debug version source code having memory leak not in release mode which is strange, because in both case source code is absolutely same.
Thanks alot
chandrashekhar
Forum posts: 32
if I remember correctly, memory leaks are not reported in release builds. So, even though you don't get the panic, there is still the same leak as in debug builds.
Jari
Forum posts: 122
\
http://www.symbian.com/developer/techlib/papers/TracingMemoryLeaks/TracingMemoryLeaks.pdf