# Connect ME 9210 programmable

**URL:** <https://forums.digi.com/t/connect-me-9210-programmable/13645>\
**Category:** NET+OS\
**Tags:** me9210, netos\
**Created:** [September 24, 2014, 11:14pm UTC](https://forums.digi.com/t/connect-me-9210-programmable/13645 "2014-09-24T23:14:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![superf4ur](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@superf4ur](https://forums.digi.com/u/superf4ur)\
**Post date:** [September 24, 2014, 11:14pm UTC](https://forums.digi.com/t/connect-me-9210-programmable/13645/1 "2014-09-24T23:14:01Z")

</div>

Hello

any one had this issues with the DC-ME-Y402-C modules?  
the serial port output:  
Thread Name: HSV  
Thread ID: 54485244  
Thread Stack start address:002DB3C0  
Thread stack end address: 00EDDBBF  
Program counter:000609F8  
Stack pointer:002269B0  
Current program status register:20000097  
R00:001FEBF4 R01:0C0C0C0C  
R02:00000106 R03:00003578  
R04:001FEBF4 R05:000000FE  
R06:000009A0 R07:001FEBB4  
R08:FFFFFFFF R09:002F081C  
R10:00213070 R11:001FEBB4  
R12:00000001  
normally, the serial port will no output. if had this output, the e-mail server will not working in the application, and the module will not working then. but some modules download this application will working.  
anyone had this issues? maybe some issues with the Thread? please give some suggestions

Thanks!

---

<div class="post-metadata">

**Author:** ![tuxembb](https://avatars.discourse-cdn.com/v4/letter/t/b38774/32.png) [@tuxembb](https://forums.digi.com/u/tuxembb)\
**Post date:** [September 24, 2014, 11:41pm UTC](https://forums.digi.com/t/connect-me-9210-programmable/13645/2 "2014-09-24T23:41:32Z")

</div>

This looks like memory corruption.

Make sure you are memset() ing ‘\0’ all pointer variables before use, like TX\_THREAD, TX\_QUEUE etc…  
If you are using any dynamic buffers for reading/writing values make it to pre-allocated buffers for now.

Thread stacks should be malloc’ed and cleared out to ‘\0’ before use. Increase thread stack size also.

These are the steps that i followed when i got similar errors

---

<div class="post-metadata">

**Author:** ![LeonidM](https://avatars.discourse-cdn.com/v4/letter/l/d26b3c/32.png) [@LeonidM](https://forums.digi.com/u/LeonidM)\
**Post date:** [September 25, 2014, 1:13pm UTC](https://forums.digi.com/t/connect-me-9210-programmable/13645/3 "2014-09-25T13:13:29Z")

</div>

Thread Name: HSV  
this indicates the crash happened in the web server, but like tuxembb said it is most likely a memory corruption

---

<div class="post-metadata">

**Author:** ![dakotas\_dad](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@dakotas\_dad](https://forums.digi.com/u/dakotas_dad)\
**Post date:** [September 29, 2014, 7:34am UTC](https://forums.digi.com/t/connect-me-9210-programmable/13645/4 "2014-09-29T07:34:02Z")

</div>

The responses included so far are excellent. I would add the following:

When the pbuilder creates stub functions, they are made to be modified. In fact the “get” functions must be modified. For example, the standrd “get” stub functions begin with something like char \* the return. It might end with return theReturn. This is returning a char \* stack variable. Depending on timing that char \* could be out of scope when returned to the web server engine and thus cause a crash looking like what you presented. At minimum, change char \* theReturn to static char \* theReturn. This will keep the variable in scope. Though be careful, doing so, the variable is now not cleared out on the next call to the function. So you’ll need to memset it before use.

But in general, I’d be looking for a memory issue in one of your stub functions.
