Reason for application generating panic

Login to reply to this topic.
Fri, 2004-10-01 11:12
Joined: 2004-09-27
Forum posts: 122
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

Fri, 2004-10-01 11:37
Joined: 2004-07-28
Forum posts: 1379
Reason for application generating panic
If it panics on exit, its usually a ALLOC panic.

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

Mon, 2004-10-04 03:26
Joined: 2004-09-27
Forum posts: 122
Reason for application generating panic
Hi,
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
Mon, 2004-10-04 09:48
Joined: 2004-07-28
Forum posts: 1379
Reason for application generating panic
Unfortualy, all Exit() does is leaves with -1003 - then the BAFL active scheduler picks that up, and begins a shut down - so you are stumped.

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

Mon, 2004-10-04 10:34
Joined: 2004-09-27
Forum posts: 122
Reason for application generating panic
Thanx alot,

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
Mon, 2004-10-04 11:13
Joined: 2004-07-28
Forum posts: 1379
Reason for application generating panic
It means you have a memory leak - what ever is at memory location 12089e240 hasn't been freed - you created something, but haven't cleaned it up.

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

Mon, 2004-10-04 13:20
Joined: 2004-09-14
Forum posts: 31
Reason for application generating panic
well, I have read the symbian C++ debugging tutorial.
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


Quote from: didster
It means you have a memory leak - what ever is at memory location 12089e240 hasn't been freed - you created something, but haven't cleaned it up.

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.
Tue, 2004-10-05 11:12
Joined: 2004-09-27
Forum posts: 122
Reason for application generating panic
Well after going through  the all source code debugging and checked every file Memory allocation and memry free and compared every address located to application pointer by system with panic address, but it does not match with application pointer addresses allocated.

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
Tue, 2004-10-05 11:25
Joined: 2004-07-28
Forum posts: 1379
Reason for application generating panic
It's an absoulte arse with the release version of the SDK.

Private message me and I will see if I can help u some more.

didster

Tue, 2004-10-05 13:20
Joined: 2004-08-30
Forum posts: 53
Reason for application generating panic
Quote from: didster
It's an absoulte arse with the release version of the SDK.

JUST the release version?! You're being too kind! Wink

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.
Tue, 2004-10-05 14:03
Joined: 2004-07-28
Forum posts: 1379
Reason for application generating panic
Ok ok Smiley  I admit, its not great.

I use the release vs debug debate to really mean "debug with all the OS source".

Its quite simple detecting memory leaks then Smiley

I blame the "big company" more than Sym them selfs - go learn how to write documentation people...

didster

Tue, 2004-10-05 14:16
Joined: 2004-08-30
Forum posts: 53
Reason for application generating panic
Ah... "OS source" ... now THAT must be nice!

... 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? Wink
Tue, 2004-10-05 14:32
Joined: 2004-07-28
Forum posts: 1379
Reason for application generating panic
It's nothing like the SDK source Smiley

Actually I didn't know that - but it explains a lot Smiley

didster

Wed, 2004-10-06 03:22
Joined: 2004-09-27
Forum posts: 122
Reason for application generating panic
Hi,
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
Wed, 2004-10-06 06:15
Joined: 2003-09-29
Forum posts: 32
Reason for application generating panic
Hi,

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

Wed, 2004-10-06 06:45
Joined: 2004-09-27
Forum posts: 122
Reason for application generating panic
I think you are right but  I've not  got any idea how to find it out and how to check when this exception (panic) address is allocated by sytem to application. Even with break point on address it is not coming while accessing this address. How to put break point on address when this address allocates to variable and on what condition as it is given in symbian manual for debugging that in break point use memory break point and write address of exception you are getting and put condition as EAX==0xxxxxxxx (leak memory address), when control will come to load this memory into register EAX then it will stop there but it is not happening.
\
http://www.symbian.com/developer/techlib/papers/TracingMemoryLeaks/TracingMemoryLeaks.pdf
  • Login to reply to this topic.