Code Completion produces Unhandled Exception Error

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Code Completion produces Unhandled Exception Error

3,173 次查看
patvid
Contributor I
Hi all,
 

Please have a look at code snippet below : 

Code:

/* * File:  main.c * Purpose:  sample program * */typedef struct { int   value;} T_StructA;typedef struct {  T_StructA   *structA;} T_StructB;void funcA(void);void funcB(T_StructB *structB);void funcA(void){    T_StructA structA;  T_StructB this;  //Initialization    this.structA = &structA; (this.structA)->value = 0;  //Problem when typing call to funcB:  //When typing opening bracket, Code Completion produces Unhandled Exception Error  //This error does not occur when either :  // - Code Completion is disabled  // - "(this.structA)->value = 0;" is written "this.structA->value = 0;"  // - local variable "this" is renamed to any other name  funcB();}void funcB(T_StructB *structB) {  return;  }int main(){}


 

As explained in the comment Code Completion raises an unhandled exception error when typing the opening brace of call to funcB.
 
The error message is :
"CodeWarrior encountered an unhandled exception 0xc0000005 at address 0x02a5366a)
(The memory at address 0x00000004 could not be read)
Location : CPPPCodeCompletion.dll:0x1002366a
Chose 'Abort' to end the program, 'Retry' to debug, or 'Ignore' to continue (at your own risk !)"
 
When selecting 'Ignore' the execution continues normally, but it is painful because each time Code Completion is invoked the error message comes, whatever function call is typed.
 
Any already encountered this problem ?
 
Regards
Patrick
标签 (1)
0 项奖励
回复
2 回复数

844 次查看
CompilerGuru
NXP Employee
NXP Employee
I tried this code with HC12 V4.1 and V4.5, both worked actually. The did display funcB's parameter type when I entered the (.
So which version of which tool do you use?

Daniel
0 项奖励
回复

844 次查看
patvid
Contributor I
Oh yes sorry, I forgot to mention which version of the tool we are using.
 
So we have this problem with :
- CodeWarrior for ColdFire v5.1, Build 31. The version of the IDE is 5.6.1.1570.
- CodeWarrior for HC08 v3.1, Build 4210. The version of the IDE is 5.6.1.1506.
 
Also, Code Completion seems not to be invoked when the file is open outside of a project. Indeed the problem occurs only if a project containing this source file is opened.
 
Regards
Patrick
0 项奖励
回复