Page 1 of 1
AJAX and the NetBurner Version 3
Posted: Fri Apr 26, 2013 5:32 pm
by tod
Updated to use jQuery, Knockout, Bootstrap, Modernizr and HTML5 with CSS3. The project includes all the minimized versions of the libraries. If you start a project from this you'll want to download the full debug versions. I wrote up a
brief blog entry which also has an overview video. I took away Prototype and most of my custom JavaScript code. I added in C++ a dumbed down customized version of my JsonCreator class. The full library was not really written for public consumption but I didn't want to do another version where the JSON objects are all created by concatenating strings. Ideally, I'd like to take one of the public JSON creation/serializer libraries and make it work for the NetBurner.
Oh yeah it was written for the MOD5441x dev board, although it should work on other modules as well, but I suspect you'll have to turn off the A/D stuff.
Re: AJAX and the NetBurner Version 3
Posted: Tue May 21, 2013 8:55 am
by dciliske
Hey Tod,
I'm having some issues building/running the project. I'm encountering the following error on boot:
Code: Select all
terminate called after throwing an instance of 'std::length_error'
what(): basic_string::_S_create
I suspect that this is due to some constructor being called in the global/static context blowing up in my face. Have a guess where to look?
-Dan
Re: AJAX and the NetBurner Version 3
Posted: Tue May 21, 2013 9:50 am
by dciliske
Oh joy... it works when compiled with NBEclipse, but not with Make... -.-
Guess I've got a new project coming up...
Edit: Nevermind... I shoulda known that it was a C++ism with one of Tod's projects. Aparently I need to turn on exceptions in the makefile; NBEclipse does that automagically for C++ projects.
Edit 2: ...And it was still different. It ended up being that the order of the make targets was the culprit, as that determined their link order and therefore the order of their static constructors.
Re: AJAX and the NetBurner Version 3
Posted: Tue May 21, 2013 10:49 am
by tod
First of all, glad I could help!
The resolution to the problem strikes me as somewhat strange. Eclipse does not (to the best of my knowledge) automatically turn on Exception handling. In fact, for this project under the project
Properties->C/C++ Build->Settings->Gnu C++ Compiler-> Miscellaneous settings (see image) I have the checkbox enabled for No exceptions handling (-fno-exceptions).
My first course for
Pluralsight looks like it's going to be an in depth tour of using Eclipse for C++ and Java. Maybe I'll entice Dan to switch over (you can still keep using MakeFiles in Eclipse).
Dan, if there's something in the code I could do that would have prevented this error (or at least made it more obvious what needed corrected) let me know.
- C/C++ Misc. Settings
- Ajax3Settings.png (75.84 KiB) Viewed 18940 times
Tod
Re: AJAX and the NetBurner Version 3
Posted: Tue May 21, 2013 12:42 pm
by tod
I would guess you're seeing the dependency of TcpServer on TcpServerReset. This is what I get for trying to upgrade old code instead of rewriting it. I might have others in there as well. Instantiating static objects like I'm doing here is a
VERY BAD idea. I even talk about the dangers of
non-local static objects (NLSOs) on the wiki. A case of do as I say not as I do.
The code should take a lazy loading approach and leave the statics
null until requested (more of a standard singleton pattern). Not so much to save the cost of instantiation but to to defer the instantiation until after the program fully boots so that this type of linker dependency is avoided. When I get a chance I'll fix the code and reupload it.
AJAX and the NetBurner Version 3
Posted: Sat Jun 08, 2019 6:09 pm
by EddieSVab
Afternoon eValid. Ive read on the forums and like to know:
Can you say why eValid is superior for monitoring AJAX applications?
Thanks