Reading DHT22 reboots arduino I’ve got a quite weird behavior of DHT library. 

I’ve got DHT22 sensor. If it’s signal cable is not connected, reading the sensor causes a problem: Arduino reboots or hangs in unpredictable places.

If I connect the signal cable again, the problem vanishes.

Is this normal behavior or some sort of bug? I think unsuccessful reading affects some part of Memory.

PS. The project is quite big and I can’t share the code here. 

It happens that I found an evidence that dht object influences foreign memory. Look at this code:

DV("pClock-&gt;isInited 3", pClock-&gt;isInited); // prints 1
dht1.readHumidity();
DV("pClock-&gt;isInited 4", pClock-&gt;isInited); // print 0 !!!!
// nothing more can be called between these lines.

// DV is a macro which prints label and value.
// Both objects created before this.

DHT dht1(11, DHT22);
…
dht1.begin();
…
pClock = new ZhClock(); // uses RTC_DS1307
pClock-&gt;init(&amp;rtc); // rtc is RTC_DS1307
This problem is usual if you are in shortage of RAM.
Adafruit's libraries wastes lots of memory. You should be very careful to run their stuff if you are in shortage of memory.

I suggest you to try another library which quite old, but uses much lesser memory to read DHT sensor’s data:
https://github.com/markruys/arduino-DHT