[Tinyos-help] segmentation fault

Eric Decker cire831 at gmail.com
Tue Dec 24 12:23:34 PST 2013


Since you are getting a segmentation fault you must be building TOSSIM or
something.   Would have helped if you stated that.

Since you are running on a non-embedded host.   Why don't you build TOSSIM
with debugging symbols, and then use native gdb to see where the
segmentation fault is occuring.   Then you can figure out how to fix it or
what is going on.




On Tue, Dec 24, 2013 at 11:49 AM, Noor <n.alnakhala at gmail.com> wrote:

> Hi,
> I'm trying to define array in my data message with a size, but I got
> segmentation fault.
> But when I remove the size and make the array without size it works fine.
>
> Although I know that there should be a size for the array.
>
> Hope someone can help !
>
> This is the datamessgae
>
> enum{
> AM_DATAMSG=7,
> };
>
> typedef nx_struct datamsg{
> nx_uint16_t junk;
> nx_uint16_t state;
> nx_uint16_t packet_type;
> nx_uint16_t cluster_type;
> nx_uint16_t mytotal;
> nx_uint16_t info[];// when I put the size, it gives me segmentation fault
> }datamsg_t;
>
> Thanks,
> Noor
>
>
>
> --
> View this message in context:
> http://tinyos-help.10906.n7.nabble.com/segmentation-fault-tp23980.html
> Sent from the TinyOS - Help mailing list archive at Nabble.com.
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
Eric B. Decker
Senior (over 50 :-) Researcher
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20131224/dec547eb/attachment.htm 


More information about the Tinyos-help mailing list