This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Event Manager crashes in Submit Event

Hello, 
I'm working with the event manager doing a customized Asset Tracking version firmware. The problem is that when I attempt to submit an event with an array with fixed size, the app crashes, I can't figure it out where the problem is. 

This is the EventType structure: 

This is how I create and submit this event:


But I getting this error: 



This error occurs only when assign values to 3 or more elements of the array, otherwise the firmware is working excellent without errors or bugs.

Also, this is my configuration in prj.conf

# Heap and stacks
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_HEAP_MEM_POOL_SIZE=32768
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096


Parents
  • Hi Ruben,

    The code looks very similar to the way that Asset Tracker v2 is done. A few questions:

    1) What is the array that you are trying to assign values to? 

    2) What version of the SDK are you using?

    3) In src/events/app_module_event.c, in function log_event, can you try changing the size of the data_types buffer from the current 50 to something larger, like 100? This is not a recommended possible solution, but just to test if the buffer overflow is happening in this function.

    Mariano

  • Hi Mariano, 

    I solved this problem; I modified the array size as you recommended and it works, thanks!
    I'm using the 1.9.1 SDK version.

Reply Children
Related