invalid memory address or nil pointer dereference which happens when If you declare a pointer variable without assigning it a value, it will be nil by default meaning your variable in the code is hitting a null/nil value. invalid memory address or nil pointer dereferencenull/nil