Comments (17)
Exactly the same issue here. i'm also using Arduino 1.6.4 with esp package from Adafruit 1.6.2
Maybe it comes from other mqtt clients publishing topics to the same broker but where this client is not subscribed to?
from pubsubclient.
I'm not seeing this problem. It may be caused by a problem that has since been fixed in the Arduino-ESP8266 port. AFAIK, Adafruit's builds are about a month old by now.
from pubsubclient.
I upgraded to arduino 1.6.4 and the latest version from Ivan Grokhotkov (https://github.com/esp8266/Arduino) via boardmanager and the problem still persists.
It even gets worse. After dropping the WiFi and restoring it again the WDT comes in.
Pubsubclient doesn't like loosing the WiFi
from pubsubclient.
Worst here because it doesn't even compile anymore... :-(
from pubsubclient.
Did you uninstall the Adafruit version first?
Delete the link in Preferences, reload arduino and load the board manager to see it has gone.
After that put in the new link from the ESP8266 community, reload arduino and install it in the Board Manager again. Maybe both versions get mixed up in the background
from pubsubclient.
Also check the latest esp-arduino as they added support for board manager directly. Should be most recent.
from pubsubclient.
I use http://arduino.esp8266.com/package_esp8266com_index.json and that one is always the latest
from pubsubclient.
Ok after complete fresh install : uninstalled arduino ide & manually deleted all arduino files and, last but not least, deleting the pubsub library in documents folder (how could it be altered!??).
So now it compiles, let check for the no free heap message...!
from pubsubclient.
@gnih That "PROGMEM" compile error was reported in #1 and fixed. Updating pubsubclient might have been all you needed.
from pubsubclient.
I'm still having 'No heap available, failed to malloc 0' .Arduino IDE is 1.6.4 with the latest version of ESP8266 in the Board Manager and Pubsubclient is up to date. I'm using pubsubclient-master.
There is also a pubsubclient-OOP-monster. What is the difference?
from pubsubclient.
Same here with latest version.
The strange thing is that by using
Serial.print("free heap="); Serial.println(ESP.getFreeHeap());
in the main loop, I always get >32k free heap but the debug still prints
No heap available, failed to malloc 0
Any idea?
from pubsubclient.
failed to malloc 0
means that someone tried to malloc 0 bytes. While malloc(0) is certainly legal, is seems to be not supported well by the underlying implementation.
Edit: So it's just the message that is a bit misleading, it is not related to not having heap available.
from pubsubclient.
I've added checks in a few places that use malloc() and could be called with a value of zero. See if this fixes your problem.
from pubsubclient.
Actually i thought to fix that in our malloc() so that it would guard against this error in pvPortMalloc. But handling this in the library is also okay.
from pubsubclient.
Also i see some places in 47cfda7 where you guard against free(NULL), which should actually work.
from pubsubclient.
@gnih @BJvDL Can this be closed now?
from pubsubclient.
@Imroy , I tested with your latest library and no problems anymore.
Please close this issue.
Thank you
from pubsubclient.
Related Issues (20)
- Subscribe to two topics?
- Compatibility broken with original knolleary/pubsubclient lib HOT 1
- Wrong password HOT 3
- lib update installs the knolleary lib HOT 4
- Message published multiple times HOT 1
- MAX transfer size is not found
- more than one Nodemcu clients can't able to get published message at a time HOT 1
- Multiple unsubscribe or publish with QoS 1 in callback HOT 1
- How to set the callback from a c++ class? HOT 1
- wrong hostname used
- esp12F heating issue HOT 1
- Unable to ascertain if received message is 'retained'. HOT 15
- socket error
- ESP32 HOT 1
- Memory leak on loop() HOT 1
- can this library subscribe to mqtt topic ? HOT 1
- error "MQTT' does not name a type" when compiling ESP8266-OTA example HOT 1
- PubSubClient.connect with userName/password ? HOT 1
- control reaches end of non-void function HOT 1
- beebotte.com - retain vs write API (weird persistance, possible to add) - not a bug I think
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 pubsubclient.