Webserver Crashes

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

I'm experiencing stability problems with my first webserver application. I'm running on a Murata SN8200EVK+ from Wiced on Windows 7 (64-bit). To track down the problem, I've stripped my system down to what I think is the smallest possible example and have attached the source files to this post.

The enclosed project serves only a single web page: an HTML index file that uses some jQuery Javascript. The jQuery library is pulled from Google's website. The C code is very basic.

The Javascript code loads the HTML file over and over, once per second, and puts some simple information on the screen.

I can compile, download, and connect to the device with my PC. I can pull up the web page with the latest version of Chrome -- sometimes. Sometimes the device will crash immediately. By crash, I mean that I have to power cycle the device or re-download to it to make it do anything. I can't pull up a web page. If I disconnect my PC from the WIFI connection, I will not be able to re-establish. I suspect the C code has fallen into an infinite loop or HALTed.

Sometimes the browser will pull the code up correctly and will load the page over and over. Usually, hitting F5 (refresh) on the browser will kill it immediately. Sometimes I have to hit it a bunch of times. Very rarely will refreshing not be able to kill it, but I've seen that happen too.

Regardless, such a simple program should be rock-solid stable and it's most definitely not. I need to know what I've done wrong before we can design this device into our product.

Thank you for looking into this!

0 Likes
1 Solution
Anonymous
Not applicable

I tried your new HTML and the code still crashes when I hit refresh.


Yes, the problem is in the C code since that's what's actually crashing. That's what I wanted you to look at. I have no idea why you would even focus on the HTML.

View solution in original post

0 Likes
7 Replies
Anonymous
Not applicable

Other notes:

* Running API 2.4.1.

* I loaded the HTML file onto the hardware with Murata's "wizzard" (ugh, I hate misspelling that!) and it was reliable. I was unable to crash their webserver. So the hardware is fine, but they didn't use Wiced's webserver.

0 Likes

I'm presently trying to reproduce your issue, will let you know soon..

0 Likes
lock attach
Attachments are accessible only for community members.
VikramR_26
Employee
Employee
25 sign-ins 10 sign-ins 10 comments on KBA

I saw your html code in the resources and saw some issues with your html. I went ahead and corrected the same and ported it with the appliance app that comes default with WICED SDK and verified it .

Just to understand better your stripped down version of html code is just doing a counter logic. I did not notice any hanging issues or getting stuck with this new html. I did not debug your c code. Let me know if you have any doubts there.

gre7g:The Javascript code loads the HTML file over and over, once per second, and puts some simple information on the screen.

As Mentioned earlier, its just a counter display on the web.

gre7g:I can compile, download, and connect to the device with my PC. I can pull up the web page with the latest version of Chrome -- sometimes. Sometimes the device will crash immediately. By crash, I mean that I have to power cycle the device or re-download to it to make it do anything. I can't pull up a web page. If I disconnect my PC from the WIFI connection, I will not be able to re-establish. I suspect the C code has fallen into an infinite loop or HALTed.

if you are seeing the crash, I would suspect your c code as mentioned by you . I would also try running using  the existing app and later make changes the same accordingly.

gre7g:Sometimes the browser will pull the code up correctly and will load the page over and over. Usually, hitting F5 (refresh) on the browser will kill it immediately. Sometimes I have to hit it a bunch of times. Very rarely will refreshing not be able to kill it, but I've seen that happen too.

I suspect this happens if the board has not booted up completely or if the dhcp has not assigned a valid ip address, sometimes might be even browser cache

gre7g:Regardless, such a simple program should be rock-solid stable and it's most definitely not. I need to know what I've done wrong before we can design this device into our product

All the best and let me know if you still seeing issues with this.

Thnx

vik86

0 Likes
Anonymous
Not applicable

I tried your new HTML and the code still crashes when I hit refresh.


Yes, the problem is in the C code since that's what's actually crashing. That's what I wanted you to look at. I have no idea why you would even focus on the HTML.

0 Likes
Anonymous
Not applicable

What device running WICED stack do you use? I had similar problem with a app with javascript library using WebGL. I used STM32F407 microcontroller and it hanged because of lack of free space in RAM.

0 Likes
Anonymous
Not applicable

As I mentioned, I'm running on a Murata SN8200EVK+.

Overflowing the stack could certainly be an issue. I'll research linking flags and see if I can find an option to allocate additional space. I'll post my findings here.

0 Likes
Anonymous
Not applicable

Discussion is being locked. If you have any follow-up, please start a new discussion.

0 Likes