applet structure queries | developer.brewmp.com applet structure queries | developer.brewmp.com

Developer

applet structure queries

Forums:

Hi All,

I have developed an application in brew in which in the applet struture i have a few brew interface controls like itext, imenu, istatic etc...

I have used all the controls in the application and tested the application on the emulator as well as on the phone.

Now when i add another few controls in the applet structure and use them in the application, the application works fine on the emulator, but when i port the application on the phone, the phone resets when the application is launching.

When i remove the newly added controls the application again works fine on the phone..
Could any1 pls explain this weird behaviour of the brew application?

its clearly indicating ur exceeding the memory for ur structure check it out.. which device are u using??

its clearly indicating ur exceeding the memory for ur structure check it out.. which device are u using??

Hi,
i m surely not exceding the memory limit for the structure... bcoz the application works fine if i add the variable at the end of the structure and not in the middle of the structure..
i m working on huawei c5300 phone and for the same phone i hav developed very similar application with many more no. of interfaces than those used in the current application..
does the brew application manager defines the memory map of the applet structure when first time a new mif is found?
Can some1 pls elaborate on why the application does not load when some new interface or new variable is added...
Thanks in advance.
pribhi

Hi,
i m surely not exceding the memory limit for the structure... bcoz the application works fine if i add the variable at the end of the structure and not in the middle of the structure..
i m working on huawei c5300 phone and for the same phone i hav developed very similar application with many more no. of interfaces than those used in the current application..
does the brew application manager defines the memory map of the applet structure when first time a new mif is found?
Can some1 pls elaborate on why the application does not load when some new interface or new variable is added...
Thanks in advance.
pribhi

Try adding all your pointers, array, structs at top of the applet structure, followed by 16-bit variable types and 8-bit variable types.
-Karthik

Try adding all your pointers, array, structs at top of the applet structure, followed by 16-bit variable types and 8-bit variable types.
-Karthik

even i have worked on huwaie c5300 and i din't face any problem, wel u can try ur luck by doing as suggested and do debug ur code on device at which point da appl resets

even i have worked on huwaie c5300 and i din't face any problem, wel u can try ur luck by doing as suggested and do debug ur code on device at which point da appl resets

Following is my applet structure..
struct _MyApp
{
AEEApplet a; // Mandatory AEEApplet data member appears first
PFNCLEANUP m_pfnViewCleanup; // function to clean up after test (NULL => no test)
IFileMgr * m_pFileMgr; // Pointer to the apps IFileMgr object
INetMgr * m_pINetMgr; // Pointer to INetMgr
IStatic * m_pIStatic; // Used for displaying messages
IHeap * m_pIHeap; // Pointer to IHeap
//Menu Controls
IMenuCtl* m_SubMenu; //Sub Menu
IMenuCtl* m_DoneMenu; //Options
IMenuCtl* m_CustomerMenu;
IMenuCtl* m_AcceptPayment;
IMenuCtl* m_RC_Status; //Collected/non-collected
//Text Controls
ITextCtl* m_Text;
ITextCtl* m_AmountPaid;
ITextCtl* m_AmountPaid1;
ITextCtl* m_PropertiesText1; //IP
ITextCtl* m_PropertiesText2; //GroupId
ITextCtl* m_PropertiesText3; //UserId
//Date Controls
IDateCtl* m_AcceptPayment3;
IDateCtl* m_pPTPDate; //date control
IDateCtl* m_pInstruDate;
IDateCtl* m_pCurrentDate;
IGraphics* m_pGraphics; //for status bar
HttpResponse httpRes;
TMFLPreferences preferences;
EAppStateType m_eAppState; // Application State
IWeb * m_pIWeb; // Pointer to IWeb for H // "URL" fieldTTP Tests
char * m_pszURL;
IFont* pINewFont;
WebAction m_awa[1]; // array of WebActions. By changing the '1' to any
// number, you can attempt to kick off multiple Web
// transactions simultaneously, testing Keep-Alive,
// multiple-POST Keep-Alives, NOWAITCONN, FORCENEW,
// and request queueing.
CustomerData * m_CustomerData;
UpdateDetails * m_UpdateDetails;
PinCodes * m_PinCodes;
SummaryReport * m_SummaryReport;
ContactTrail * m_ContactTrail;
PerformanceReport * m_PerformanceReport;
Performance * m_Coll_List;
Performance * m_Rej_List;
char * m_resMsg;
char m_reliance_status[5];
char * header;
int frm_year_ptp,frm_month_ptp,frm_day_ptp;//for PTP
int frm_year,frm_month,frm_day,frm_year_curr,frm_month_curr,frm_day_curr;
short m_CustCount;
short m_CustListNo;
short m_CustPageNo;
short m_CustTotalNo;
short m_UpdateCountRecords;
short m_PinCodeCount;
short m_PinCodePageNo;
short m_PinCodeTotalNo;
char TransChar[2];
char ListNo[2];
char flg_Time[10][3];
char flg_ticked[3];
char flg_ticked1[3];
char szAppState[40];
char szReceiptNo[20];
char szReceiptDate[20];
char szContractNo[30];
char szInstrumentNo[16];
char szDrawnOnBank[15];
char szInstruDate[20];
char szTotalAmtPaid[20];
char szPTPAmount[20];
flg m_bRT:1; // "RT" field: Display response time if TRUE
flg m_NoFreeMem:1; // "RT" field: Display response time if TRUE
;
now if i add new interfaces or variables at the end of the structure, the application works fine. but if i add even a single variables some in middle of the above structure , the application either shows memory probs or sometimes just doesnt load/start.
below is how i need to add the variables for the applicatio to work properly,....
struct _MyApp
{
AEEApplet a; // Mandatory AEEApplet data member appears first
PFNCLEANUP m_pfnViewCleanup; // function to clean up after test (NULL => no test)
IFileMgr * m_pFileMgr; // Pointer to the apps IFileMgr object
INetMgr * m_pINetMgr; // Pointer to INetMgr
IStatic * m_pIStatic; // Used for displaying messages
IHeap * m_pIHeap; // Pointer to IHeap
//Menu Controls
IMenuCtl* m_SubMenu; //Sub Menu
IMenuCtl* m_DoneMenu; //Options
IMenuCtl* m_CustomerMenu;
IMenuCtl* m_AcceptPayment;
IMenuCtl* m_RC_Status; //Collected/non-collected
//Text Controls
ITextCtl* m_Text;
ITextCtl* m_AmountPaid;
ITextCtl* m_AmountPaid1;
ITextCtl* m_PropertiesText1; //IP
ITextCtl* m_PropertiesText2; //GroupId
ITextCtl* m_PropertiesText3; //UserId
//Date Controls
IDateCtl* m_AcceptPayment3;
IDateCtl* m_pPTPDate; //date control
IDateCtl* m_pInstruDate;
IDateCtl* m_pCurrentDate;
IGraphics* m_pGraphics; //for status bar
HttpResponse httpRes;
TMFLPreferences preferences;
EAppStateType m_eAppState; // Application State
IWeb * m_pIWeb; // Pointer to IWeb for H // "URL" fieldTTP Tests
char * m_pszURL;
IFont* pINewFont;
WebAction m_awa[1];
CustomerData * m_CustomerData;
UpdateDetails * m_UpdateDetails;
PinCodes * m_PinCodes;
SummaryReport * m_SummaryReport;
ContactTrail * m_ContactTrail;
PerformanceReport * m_PerformanceReport;
Performance * m_Coll_List;
Performance * m_Rej_List;
char * m_resMsg;
char m_reliance_status[5];
char * header;
int frm_year_ptp,frm_month_ptp,frm_day_ptp;//for PTP
int frm_year,frm_month,frm_day,frm_year_curr,frm_month_curr,frm_day_curr;
short m_CustCount;
short m_CustListNo;
short m_CustPageNo;
short m_CustTotalNo;
short m_UpdateCountRecords;
short m_PinCodeCount;
short m_PinCodePageNo;
short m_PinCodeTotalNo;
char TransChar[2];
char ListNo[2];
char flg_Time[10][3];
char flg_ticked[3];
char flg_ticked1[3];
char szAppState[40];
char szReceiptNo[20];
char szReceiptDate[20];
char szContractNo[30];
char szInstrumentNo[16];
char szDrawnOnBank[15];
char szInstruDate[20];
char szTotalAmtPaid[20];
char szPTPAmount[20];
flg m_bRT:1; // "RT" field: Display response time if TRUE
flg m_NoFreeMem:1; // "RT" field: Display response time if TRUE
/************* newly added interface*************/
ITextCtl* m_ThermaxText1;
IDateCtl* m_ThermaxDate;
IMenuCtl* m_ThermaxMenu;
flg m_selected_sr:2;
};
Could any1 pls describe why such thing is happening...
thanks
pribhi.

Following is my applet structure..
struct _MyApp
{
AEEApplet a; // Mandatory AEEApplet data member appears first
PFNCLEANUP m_pfnViewCleanup; // function to clean up after test (NULL => no test)
IFileMgr * m_pFileMgr; // Pointer to the apps IFileMgr object
INetMgr * m_pINetMgr; // Pointer to INetMgr
IStatic * m_pIStatic; // Used for displaying messages
IHeap * m_pIHeap; // Pointer to IHeap
//Menu Controls
IMenuCtl* m_SubMenu; //Sub Menu
IMenuCtl* m_DoneMenu; //Options
IMenuCtl* m_CustomerMenu;
IMenuCtl* m_AcceptPayment;
IMenuCtl* m_RC_Status; //Collected/non-collected
//Text Controls
ITextCtl* m_Text;
ITextCtl* m_AmountPaid;
ITextCtl* m_AmountPaid1;
ITextCtl* m_PropertiesText1; //IP
ITextCtl* m_PropertiesText2; //GroupId
ITextCtl* m_PropertiesText3; //UserId
//Date Controls
IDateCtl* m_AcceptPayment3;
IDateCtl* m_pPTPDate; //date control
IDateCtl* m_pInstruDate;
IDateCtl* m_pCurrentDate;
IGraphics* m_pGraphics; //for status bar
HttpResponse httpRes;
TMFLPreferences preferences;
EAppStateType m_eAppState; // Application State
IWeb * m_pIWeb; // Pointer to IWeb for H // "URL" fieldTTP Tests
char * m_pszURL;
IFont* pINewFont;
WebAction m_awa[1]; // array of WebActions. By changing the '1' to any
// number, you can attempt to kick off multiple Web
// transactions simultaneously, testing Keep-Alive,
// multiple-POST Keep-Alives, NOWAITCONN, FORCENEW,
// and request queueing.
CustomerData * m_CustomerData;
UpdateDetails * m_UpdateDetails;
PinCodes * m_PinCodes;
SummaryReport * m_SummaryReport;
ContactTrail * m_ContactTrail;
PerformanceReport * m_PerformanceReport;
Performance * m_Coll_List;
Performance * m_Rej_List;
char * m_resMsg;
char m_reliance_status[5];
char * header;
int frm_year_ptp,frm_month_ptp,frm_day_ptp;//for PTP
int frm_year,frm_month,frm_day,frm_year_curr,frm_month_curr,frm_day_curr;
short m_CustCount;
short m_CustListNo;
short m_CustPageNo;
short m_CustTotalNo;
short m_UpdateCountRecords;
short m_PinCodeCount;
short m_PinCodePageNo;
short m_PinCodeTotalNo;
char TransChar[2];
char ListNo[2];
char flg_Time[10][3];
char flg_ticked[3];
char flg_ticked1[3];
char szAppState[40];
char szReceiptNo[20];
char szReceiptDate[20];
char szContractNo[30];
char szInstrumentNo[16];
char szDrawnOnBank[15];
char szInstruDate[20];
char szTotalAmtPaid[20];
char szPTPAmount[20];
flg m_bRT:1; // "RT" field: Display response time if TRUE
flg m_NoFreeMem:1; // "RT" field: Display response time if TRUE
;
now if i add new interfaces or variables at the end of the structure, the application works fine. but if i add even a single variables some in middle of the above structure , the application either shows memory probs or sometimes just doesnt load/start.
below is how i need to add the variables for the applicatio to work properly,....
struct _MyApp
{
AEEApplet a; // Mandatory AEEApplet data member appears first
PFNCLEANUP m_pfnViewCleanup; // function to clean up after test (NULL => no test)
IFileMgr * m_pFileMgr; // Pointer to the apps IFileMgr object
INetMgr * m_pINetMgr; // Pointer to INetMgr
IStatic * m_pIStatic; // Used for displaying messages
IHeap * m_pIHeap; // Pointer to IHeap
//Menu Controls
IMenuCtl* m_SubMenu; //Sub Menu
IMenuCtl* m_DoneMenu; //Options
IMenuCtl* m_CustomerMenu;
IMenuCtl* m_AcceptPayment;
IMenuCtl* m_RC_Status; //Collected/non-collected
//Text Controls
ITextCtl* m_Text;
ITextCtl* m_AmountPaid;
ITextCtl* m_AmountPaid1;
ITextCtl* m_PropertiesText1; //IP
ITextCtl* m_PropertiesText2; //GroupId
ITextCtl* m_PropertiesText3; //UserId
//Date Controls
IDateCtl* m_AcceptPayment3;
IDateCtl* m_pPTPDate; //date control
IDateCtl* m_pInstruDate;
IDateCtl* m_pCurrentDate;
IGraphics* m_pGraphics; //for status bar
HttpResponse httpRes;
TMFLPreferences preferences;
EAppStateType m_eAppState; // Application State
IWeb * m_pIWeb; // Pointer to IWeb for H // "URL" fieldTTP Tests
char * m_pszURL;
IFont* pINewFont;
WebAction m_awa[1];
CustomerData * m_CustomerData;
UpdateDetails * m_UpdateDetails;
PinCodes * m_PinCodes;
SummaryReport * m_SummaryReport;
ContactTrail * m_ContactTrail;
PerformanceReport * m_PerformanceReport;
Performance * m_Coll_List;
Performance * m_Rej_List;
char * m_resMsg;
char m_reliance_status[5];
char * header;
int frm_year_ptp,frm_month_ptp,frm_day_ptp;//for PTP
int frm_year,frm_month,frm_day,frm_year_curr,frm_month_curr,frm_day_curr;
short m_CustCount;
short m_CustListNo;
short m_CustPageNo;
short m_CustTotalNo;
short m_UpdateCountRecords;
short m_PinCodeCount;
short m_PinCodePageNo;
short m_PinCodeTotalNo;
char TransChar[2];
char ListNo[2];
char flg_Time[10][3];
char flg_ticked[3];
char flg_ticked1[3];
char szAppState[40];
char szReceiptNo[20];
char szReceiptDate[20];
char szContractNo[30];
char szInstrumentNo[16];
char szDrawnOnBank[15];
char szInstruDate[20];
char szTotalAmtPaid[20];
char szPTPAmount[20];
flg m_bRT:1; // "RT" field: Display response time if TRUE
flg m_NoFreeMem:1; // "RT" field: Display response time if TRUE
/************* newly added interface*************/
ITextCtl* m_ThermaxText1;
IDateCtl* m_ThermaxDate;
IMenuCtl* m_ThermaxMenu;
flg m_selected_sr:2;
};
Could any1 pls describe why such thing is happening...
thanks
pribhi.

i would suggest u to reduce da ammount of variables which u r using in ur applet structure, like menuctrl , textctrl pointers, reuse the same variables if possible
nd also many arrays u have used in ur structure, try dynamic memory allocation,
this may help u to resolve ur problem
best of luck

i would suggest u to reduce da ammount of variables which u r using in ur applet structure, like menuctrl , textctrl pointers, reuse the same variables if possible
nd also many arrays u have used in ur structure, try dynamic memory allocation,
this may help u to resolve ur problem
best of luck