fix: force media to empty list when null to avoid object deref error during purchased media processing #105

Merged
sim0n00ps merged 1 commits from nyc_tk/OF-DL:fix-purchased-media-obj-deref-error into master 2026-01-01 19:41:36 +00:00
Contributor

See #104

Tested locally

See #104 Tested locally
nyc_tk added 1 commit 2025-12-16 04:51:19 +00:00
nyc_tk requested review from whimsical-c4lic0 2025-12-16 04:54:33 +00:00
nyc_tk requested review from sim0n00ps 2025-12-16 04:54:33 +00:00
Collaborator

I'm curious as to what conditions might trigger this error, can you elaborate?

I'm curious as to what conditions might trigger this error, can you elaborate?
Author
Contributor

I'm curious as to what conditions might trigger this error, can you elaborate?

It's an error that happened to me. I added a bunch of diagnostic logging after I saw that it kept happening after Download Purchased Tab kept failing at the same user.

The json object returned didn't have anything odd - mediaCount = 1 but the array was null versus an empty list.

So, I started looking into the code and started building my own Docker images to figure this out.

{
  "responseType": "post",
  "text": "It finally happend!!",
  "giphyId": null,
  "lockedText": null,
  "isFree": null,
  "price": "14.99",
  "isMediaReady": true,
  "mediaCount": 1,
  "media": null,
  "previews": null,
  "preview": null,
  "isTip": null,
  "isReportedByMe": null,
  "isCouplePeopleMedia": null,
  "queueId": null,
  "fromUser": null,
  "author": {
    "id": 21268289,
    "_view": "s"
  },
  "isFromQueue": null,
  "canUnsendQueue": null,
  "unsendSecondsQueue": null,
  "id": 13610151,
  "isOpened": true,
  "isNew": null,
  "createdAt": null,
  "postedAt": "2020-02-15T14:29:04-05:00",
  "changedAt": null,
  "cancelSeconds": null,
  "isLiked": null,
  "canPurchase": null,
  "canReport": null,
  "isCanceled": null,
  "isArchived": null
}
> I'm curious as to what conditions might trigger this error, can you elaborate? It's an error that happened to me. I added a bunch of diagnostic logging after I saw that it kept happening after Download Purchased Tab kept failing at the same user. The json object returned didn't have anything odd - `mediaCount = 1` but the array was null versus an empty list. So, I started looking into the code and started building my own Docker images to figure this out. ``` { "responseType": "post", "text": "It finally happend!!", "giphyId": null, "lockedText": null, "isFree": null, "price": "14.99", "isMediaReady": true, "mediaCount": 1, "media": null, "previews": null, "preview": null, "isTip": null, "isReportedByMe": null, "isCouplePeopleMedia": null, "queueId": null, "fromUser": null, "author": { "id": 21268289, "_view": "s" }, "isFromQueue": null, "canUnsendQueue": null, "unsendSecondsQueue": null, "id": 13610151, "isOpened": true, "isNew": null, "createdAt": null, "postedAt": "2020-02-15T14:29:04-05:00", "changedAt": null, "cancelSeconds": null, "isLiked": null, "canPurchase": null, "canReport": null, "isCanceled": null, "isArchived": null } ```
sim0n00ps merged commit d5aa568afb into master 2026-01-01 19:41:36 +00:00
sim0n00ps refused to review 2026-01-01 19:41:42 +00:00
sim0n00ps removed review request for whimsical-c4lic0 2026-01-01 19:41:43 +00:00
Sign in to join this conversation.
No description provided.