Error compiling for board arduino mega


Could anybody guide me to correct this error. I am using dht22 sensor to show data on serial monitor of arduino mega 2560. Moreover, i am new to arduino.

Arduino: 1.8.10 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x7855fb]

goroutine 1 [running]:, 0x12362384, 0x5, 0x12362384)
/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/ +0x14b, 0x120e0fc0, 0x88ed00, 0x12184690, 0x12007e40, 0x1237b300, 0x0)
/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/ +0x3b6*ContainerFindIncludes).Run(0xdebc68, 0x120c25a0, 0xdebc68, 0x0)
/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/ +0x3e5, 0x12061e1c, 0x20, 0x20, 0x1, 0x1b2ffff, 0x800)
/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/ +0xbd*Builder).Run(0x12069f40, 0x120c25a0, 0xdebbb4, 0x12006c98)
/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/ +0xb9c
/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/ +0x6d2
C:\Program Files (x86)\Arduino\arduino-builder returned 2
Error compiling for board Arduino/Genuino Mega or Mega 2560 Liteblue.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


I believe this is a bug specific to Arduino IDE 1.8.10. Please use Arduino IDE 1.8.9. You can download it here:

The Arduino IDE 1.8.11 release is planned for today, so when that comes out give it a try and see if they have fixed the bug.