# Invalid memory address or nil pointer dereference error when copy to Google photos

**URL:** <https://forum.rclone.org/t/invalid-memory-address-or-nil-pointer-dereference-error-when-copy-to-google-photos/43634>\
**Category:** Suspected Bug\
**Created:** [December 24, 2023, 12:19am UTC](https://forum.rclone.org/t/invalid-memory-address-or-nil-pointer-dereference-error-when-copy-to-google-photos/43634 "2023-12-24T00:19:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![w1q06y3t](https://forum.rclone.org/letter_avatar_proxy/v4/letter/w/ec9cab/32.png) [@w1q06y3t](https://forum.rclone.org/u/w1q06y3t)\
**Post date:** [December 24, 2023, 12:19am UTC](https://forum.rclone.org/t/invalid-memory-address-or-nil-pointer-dereference-error-when-copy-to-google-photos/43634/1 "2023-12-24T00:19:10Z")

</div>

#### What is the problem you are having with rclone?

When I try to do an automated upload to Google Photos storage, I get a memory error and the upload fails.

Sometimes this happens, sometimes it doesn't (i.e., sometimes it uploads fine), and when it does start happening, it lasts for hours (as long as 20 hours).

My guess is that it's probably happening when I reach GPhotos' daily upload limit, but when I do, it used to print an error related to Upload Quota, so I could easily see why, but now it doesn't print that error and says it's a memory error.

#### Run the command 'rclone version' and share the full output of the command.

rclone v1.65.0

- os/version: unknown
- os/kernel: 4.4.302+ (x86\_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.21.4
- go/linking: static
- go/tags: none

#### Which cloud storage system are you using? (eg Google Drive)

Google Photos

#### The command you were trying to run (eg `rclone copy /tmp remote:tmp`)

```auto
rclone move "/volume1/Backup/Google Photos Backup" "gsuitephoto:upload" --exclude="@eaDir/**" --exclude=".DS_Store" --transfers 15 -vv

```

#### Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

```auto
[gsuitephoto]
type = google photos
client_id = XXX
client_secret = XXX
token = XXX

```

#### A log from the command that you were trying to run with the `-vv` flag

> <https://pastebin.com/uHawzrvD>

I'd like to provide additional information. I installed rclone on a Synology NAS via SSH.

---

<div class="post-metadata">

**Author:** ![kapitainsky](https://forum.rclone.org/user_avatar/forum.rclone.org/kapitainsky/32/14450_2.png) [@kapitainsky](https://forum.rclone.org/u/kapitainsky)\
**Post date:** [December 24, 2023, 9:54am UTC](https://forum.rclone.org/t/invalid-memory-address-or-nil-pointer-dereference-error-when-copy-to-google-photos/43634/2 "2023-12-24T09:54:16Z")

</div>

To help with finding the root cause of this issue would you mind to run your command with addition of `--dump headers` flag when the issue is happening?

It is possible that Google has changed something - maybe error code etc. and rclone does not handle it nicely - it should.

---

<div class="post-metadata">

**Author:** ![w1q06y3t](https://forum.rclone.org/letter_avatar_proxy/v4/letter/w/ec9cab/32.png) [@w1q06y3t](https://forum.rclone.org/u/w1q06y3t)\
**Post date:** [December 24, 2023, 11:29am UTC](https://forum.rclone.org/t/invalid-memory-address-or-nil-pointer-dereference-error-when-copy-to-google-photos/43634/3 "2023-12-24T11:29:59Z")

</div>

Hello kapitainsky.

Thank you for answer. I tried with flag --dump headers and result was like below.

> **[2023/12/24 20:27:32 DEBUG : Creating backend with remote...](https://pastebin.com/ezQLmp6M)**
>
> Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

Can you know something else with this log?

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [December 27, 2023, 4:21pm UTC](https://forum.rclone.org/t/invalid-memory-address-or-nil-pointer-dereference-error-when-copy-to-google-photos/43634/4 "2023-12-27T16:21:44Z")

</div>

Thanks for doing that.

I can see what the problem is.

Can you try this please?

[v1.66.0-beta.7581.595bf074b.fix-gphotos-nil-pointer](https://beta.rclone.org/branch/fix-gphotos-nil-pointer/v1.66.0-beta.7581.595bf074b.fix-gphotos-nil-pointer/) on branch [fix-gphotos-nil-pointer](https://github.com/rclone/rclone/tree/fix-gphotos-nil-pointer) (uploaded in 15-30 mins)

---

<div class="post-metadata">

**Author:** ![w1q06y3t](https://forum.rclone.org/letter_avatar_proxy/v4/letter/w/ec9cab/32.png) [@w1q06y3t](https://forum.rclone.org/u/w1q06y3t)\
**Post date:** [December 27, 2023, 10:42pm UTC](https://forum.rclone.org/t/invalid-memory-address-or-nil-pointer-dereference-error-when-copy-to-google-photos/43634/5 "2023-12-27T22:42:09Z")

</div>

Hello ncw.

Thanks for your reply.

Unfortunately, refreshing the token we use when configuring the Google Photos config once solved the problem, so it's not happening again now, but I'll test what you said if the same issue recurs.

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [December 31, 2023, 6:08pm UTC](https://forum.rclone.org/t/invalid-memory-address-or-nil-pointer-dereference-error-when-copy-to-google-photos/43634/6 "2023-12-31T18:08:17Z")

</div>

I'm pretty sure that fix is correct so I've merged this to master now which means it will be in [the latest beta](https://beta.rclone.org/) in 15-30 minutes and released in v1.65.1

---

<div class="post-metadata">

**Author:** ![system](https://forum.rclone.org/uploads/default/original/2X/3/39ad3235f6ffec76ccd0c81616bd55697b4c300d.png) [@system](https://forum.rclone.org/u/system)\
**Post date:** [January 30, 2024, 6:09pm UTC](https://forum.rclone.org/t/invalid-memory-address-or-nil-pointer-dereference-error-when-copy-to-google-photos/43634/7 "2024-01-30T18:09:05Z")

</div>

Closed on January 30, 2024, 6:09pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
