Comments (6)
Hello Mario,
The "placement new" that I'm using is part of the standard library and in most environments you just need to add the following line:
#include <new>
What you see in my PlacementNew.hpp
is a workaround for the Arduino environment that lacks many standard features.
Please try to replace the following line in PlacementNew.hpp
:
#ifdef ARDUINO
by
#if 0
so as to disable the workaround for Arduino.
from arduinojson.
Hi again,
I'd like to reproduce the bug on my computer.
What IDE are you using?
Is it the "LinkIt SDK for Arduino"?
from arduinojson.
Yes, that's the SDK I'm using (on VS 2013, but I don't think matters).
Benoit, I think I got it, although I wouldn't deserve any merit, because my 99% of luck and 1% of ability.
Simply I commented out the "inline" declaration in your PlacementNew, as well as the "#include " at the bottom. Doing that I guess the module is completely useless.
However, simply "removing" the PlacementNew content, the compilation raises several errors like:
JsonArray.hpp:In file included from
JsonArray.cpp:from
List.hpp:In member function 'ArduinoJson::Internals::ListNode* ArduinoJson::Internals::List::createNode() [with T = ArduinoJson::JsonVariant]'
JsonArray.cpp:instantiated from here
List.hpp:56: error: no matching function for call to 'operator new(unsigned int, void_&)'
:void_ operator new(unsigned int)
So, my attempt was to place an "#include " in the List.hpp module, and nowhere else. That's working fine.
P.S. Today I'll leave for a short holiday, so I won't able to put my hands on in a brief...
from arduinojson.
Hi Mario,
Any update on that issue?
from arduinojson.
Huh?...There's no "update", because was already solved as above descripted: the library works fine.
The compilation (and thus the runtime) are working fine by simply:
- commenting out the "inline" directive within the PlacementNew module;
- adding (substituting the above one) the "#include " in the List.hpp module.
Should I perform any other test?
from arduinojson.
OK, thanks for the clarification.
You're not the only one having issues with the placement new definitions.
I think I'll just remove it from the next release.
from arduinojson.
Related Issues (20)
- V6 Documentation ArduinoJson PubSubClient with StreamUtils HOT 1
- deserialize file from LittleFS crash HOT 6
- Trying to compile a 2021 program HOT 2
- Bring back zero-copy mode in v7 HOT 6
- MQTT Publish destroying Json HOT 2
- Error compiling example code SimpleParser on Arduino Web Editor NodeMCU 0.9 HOT 1
- JSON output is truncated. HOT 1
- load an object into an absolute memory address, Cortex-M. HOT 4
- Cannot compile code that compiled last time it was used HOT 1
- There is a memory leak either in this library or in ESP32 LittleFS HOT 23
- Lint error ovl_no_viable_subscript has occured HOT 2
- Cleaning HTML Chuking Answer at the Custom Reader class for getting filtered JsonDocument HOT 1
- Return JsonDocument from class methods HOT 2
- Question - Access JSON data variables in nested arrays HOT 5
- Problem whith a JSON from Firefox to my ESP8266 HOT 3
- Capped Allocator HOT 4
- fatal error: ArduinoJson/Variant/VariantRefBase.hpp: No such file or directory HOT 1
- Example on ArduinoJson website crashes at runtime HOT 1
- ArduinoJson 7.1.0 Compile error [ invalid use of array with unspecified bounds ] HOT 2
- Missing links to specific types in the API reference HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduinojson.