在进行TAU G2编程时经常会遇到下面的错误信息:
************
Dereferencing of NULL pointer.
Pointer assigned new data area at address .
D_attach_detach_group_identity D_attach_detach_group_identity_type;
Group_identity_downlink Group_identity_downlink_type;
Group_identity_downlinks Group_identity_downlinks_type;
CArray<Group_identity_downlink, 63> data;
D_attach_detach_group_identity_type.pdu_type=10;
D_attach_detach_group_identity_type.group_identity_report=false;
D_attach_detach_group_identity_type.group_identity_acknowlegement=true;
D_attach_detach_group_identity_type.group_identity_attach_detach_mode=true;
D_attach_detach_group_identity_type.O_Bit=true;
D_attach_detach_group_identity_type.M_Bit=true;
Group_identity_downlink_type.Is_gIADTI_Present=true;
Group_identity_downlink_type.gIADTI = detach;
Group_identity_downlink_type.group_id_attach_or_detach.group_id_detachment_downlink=3;
Group_identity_downlink_type.Is_gIAT_Present=true;
Group_identity_downlink_type.gIAT = gssi;
Group_identity_downlink_type.group_id_address.group_short_subscriber_identity=1;
D_attach_detach_group_identity_type.group_identity_downlinks.data[0]=Group_identity_downlink_type;
D_attach_detach_group_identity_type.group_identity_downlinks.NoOfRepeatedElements = 1;
Group_identity_downlink Group_identity_downlink_type;
Group_identity_downlinks Group_identity_downlinks_type;
CArray<Group_identity_downlink, 63> data;
D_attach_detach_group_identity_type.pdu_type=10;
D_attach_detach_group_identity_type.group_identity_report=false;
D_attach_detach_group_identity_type.group_identity_acknowlegement=true;
D_attach_detach_group_identity_type.group_identity_attach_detach_mode=true;
D_attach_detach_group_identity_type.O_Bit=true;
D_attach_detach_group_identity_type.M_Bit=true;
Group_identity_downlink_type.Is_gIADTI_Present=true;
Group_identity_downlink_type.gIADTI = detach;
Group_identity_downlink_type.group_id_attach_or_detach.group_id_detachment_downlink=3;
Group_identity_downlink_type.Is_gIAT_Present=true;
Group_identity_downlink_type.gIAT = gssi;
Group_identity_downlink_type.group_id_address.group_short_subscriber_identity=1;
D_attach_detach_group_identity_type.group_identity_downlinks.data[0]=Group_identity_downlink_type;
D_attach_detach_group_identity_type.group_identity_downlinks.NoOfRepeatedElements = 1;
在这个程序中,访问D_attach_detach_
CArray<Group_identity_downlink, 63> data;
D_attach_detach_group_identity_type = new D_attach_detach_group_identity();
Group_identity_downlink_type = new Group_identity_downlink();
D_attach_detach_group_identity_type.pdu_type=10;
D_attach_detach_group_identity_type.group_identity_report=false;
D_attach_detach_group_identity_type.group_identity_acknowlegement=true;
D_attach_detach_group_identity_type.group_identity_attach_detach_mode=true;
……
D_attach_detach_group_identity_type = new D_attach_detach_group_identity();
Group_identity_downlink_type = new Group_identity_downlink();
D_attach_detach_group_identity_type.pdu_type=10;
D_attach_detach_group_identity_type.group_identity_report=false;
D_attach_detach_group_identity_type.group_identity_acknowlegement=true;
D_attach_detach_group_identity_type.group_identity_attach_detach_mode=true;
……
这样就可以避免出现此类问题了。