- //event has string/sequence or the last event is not the same event
- if((evT->latest_block!=t->which_block || evT->latest_event!=t->which_event)
- && rootFld->field_fixed == 0){
- setFieldsOffset(t, evT, evData, t->trace);
+ if(rootFld){
+ //event has string/sequence or the last event is not the same event
+ if((evT->latest_block!=t->which_block || evT->latest_event!=t->which_event)
+ && rootFld->field_fixed == 0){
+ setFieldsOffset(t, evT, evData, t->trace);
+ }
+ t->cur_event_pos += EVENT_HEADER_SIZE + rootFld->field_size;
+ }else t->cur_event_pos += EVENT_HEADER_SIZE;
+
+ evT->latest_block = t->which_block;
+ evT->latest_event = t->which_event;
+ }else{
+ if(evId == TRACE_BLOCK_START || evId == TRACE_BLOCK_END){
+ t->cur_event_pos += sizeof(BlockStart) + EVENT_HEADER_SIZE;
+ }else{
+ t->cur_event_pos += sizeof(TimeHeartbeat) + EVENT_HEADER_SIZE;
+ }