javalent / calendarium

The ultimate Obsidian plugin for crafting mind-bending fantasy and sci-fi calendars
MIT License
65 stars 9 forks source link

🐞 Obsidian crashes on Android with Calendarium on #114

Closed mvriel closed 2 months ago

mvriel commented 3 months ago

Check for existing bug reports before submitting.

Expected Behavior

When I have the calendarium plugin enabled, obsidian should not crash.

Current behaviour

I noticed the behaviour after I configured Calendarium on my desktop (where it doesn't crash Obsidian); after syncing to my Tablet and to my Phone (Using Android Sync), both crash when I have the plugin enabled. When I disable the plugin, the crashing stops. As far as I can gather it is not due to interactions with other plugins because I disabled them all and tried it again.

An interesting detail may be that the crash only happens when the application is running for maybe 10 to 30 seconds or so. It is not immediate

Reproduction

  1. Have it enabled on Android
  2. Start Obsidian on Android

Since I can only reproduce it after configuring on desktop, the following setup is present:

{
  "addToDefaultIfMissing": true,
  "calendars": [
    {
      "name": "Curse of Strahd 2023",
      "description": "Calendar of the realm of Barovia, home of Strahd.",
      "autoParse": false,
      "path": [
        "/"
      ],
      "supportInlineEvents": false,
      "inlineEventTag": "inline-events",
      "showIntercalarySeparately": true,
      "static": {
        "displayDayNumber": false,
        "firstWeekDay": 0,
        "incrementDay": false,
        "displayMoons": true,
        "overflow": true,
        "padDays": 2,
        "padMonths": 2,
        "weekdays": [
          {
            "type": "day",
            "name": "Monday",
            "id": "ID_6a183b08c8eb"
          },
          {
            "type": "day",
            "name": "Tuesday",
            "id": "ID_892b7b7a5ae9"
          },
          {
            "type": "day",
            "name": "Wednesday",
            "id": "ID_6bb98899ba68"
          },
          {
            "type": "day",
            "name": "Thursday",
            "id": "ID_4a7b683aea19"
          },
          {
            "type": "day",
            "name": "Friday",
            "id": "ID_78690a099b89"
          },
          {
            "type": "day",
            "name": "Saturday",
            "id": "ID_ba5b09ba5a89"
          },
          {
            "type": "day",
            "name": "Sunday",
            "id": "ID_29b90acaead9"
          }
        ],
        "months": [
          {
            "name": "1st Moon",
            "type": "month",
            "length": 31,
            "interval": 1,
            "offset": 0,
            "id": "ID_7b4978ab581a"
          },
          {
            "name": "2nd Moon",
            "type": "month",
            "length": 28,
            "interval": 1,
            "offset": 0,
            "id": "ID_cb99fbb9395b"
          },
          {
            "name": "3rd Moon",
            "type": "month",
            "length": 31,
            "interval": 1,
            "offset": 0,
            "id": "ID_79881a89cb18"
          },
          {
            "name": "4th Moon",
            "type": "month",
            "length": 30,
            "interval": 1,
            "offset": 0,
            "id": "ID_5b9a8a397908"
          },
          {
            "name": "5th Moon",
            "type": "month",
            "length": 31,
            "interval": 1,
            "offset": 0,
            "id": "ID_f8399ab80818"
          },
          {
            "name": "6th Moon",
            "type": "month",
            "length": 30,
            "interval": 1,
            "offset": 0,
            "id": "ID_3ac84a7bc869"
          },
          {
            "name": "7th Moon",
            "type": "month",
            "length": 31,
            "interval": 1,
            "offset": 0,
            "id": "ID_e98bc86bc809"
          },
          {
            "name": "8th Moon",
            "type": "month",
            "length": 31,
            "interval": 1,
            "offset": 0,
            "id": "ID_89ea78ca5988"
          },
          {
            "name": "9th Moon",
            "type": "month",
            "length": 30,
            "interval": 1,
            "offset": 0,
            "id": "ID_798a3b990a4b"
          },
          {
            "name": "10th Moon",
            "type": "month",
            "length": 31,
            "interval": 1,
            "offset": 0,
            "id": "ID_3a9999e8eb59"
          },
          {
            "name": "11th Moon",
            "type": "month",
            "length": 30,
            "interval": 1,
            "offset": 0,
            "id": "ID_db39383b990a"
          },
          {
            "name": "12th Moon",
            "type": "month",
            "length": 31,
            "interval": 1,
            "offset": 0,
            "id": "ID_1bfa3b180a48"
          }
        ],
        "moons": [
          {
            "name": "Moon",
            "cycle": 29.530588853,
            "offset": 10.24953,
            "faceColor": "#ffffff",
            "shadowColor": "#000000",
            "id": "ID_e98b3a8ab8da"
          }
        ],
        "leapDays": [
          {
            "name": "Leap Day",
            "type": "leapday",
            "interval": [
              {
                "ignore": false,
                "exclusive": false,
                "interval": 4
              },
              {
                "ignore": false,
                "exclusive": true,
                "interval": 100
              },
              {
                "ignore": false,
                "exclusive": false,
                "interval": 400
              }
            ],
            "offset": 0,
            "timespan": 1,
            "intercalary": false,
            "id": "ID_6a28dbb81a48"
          }
        ],
        "eras": [
          {
            "name": "Before Christ",
            "format": "Year {{year}} - {{era_name}}",
            "start": {
              "year": -9000,
              "month": 0,
              "day": 0
            },
            "id": "ID_897bba588a98",
            "restart": false,
            "endsYear": false,
            "event": false
          },
          {
            "name": "Anno Domini",
            "format": "Year {{year}} - {{era_name}}",
            "start": {
              "year": 1,
              "month": 0,
              "day": 1
            },
            "id": "ID_185ab9b8b95a",
            "restart": false,
            "endsYear": false,
            "event": false
          }
        ]
      },
      "current": {
        "day": 6,
        "month": 4,
        "year": 735
      },
      "events": [
        {
          "name": "Winter Solstice",
          "description": "The Winter Solstice is the day of the year with the least time between sunrise and sunset. Many western cultures consider it the official start of winter.",
          "id": "824455",
          "note": null,
          "date": {
            "day": null,
            "year": null,
            "month": null
          },
          "category": "natural-event",
          "sort": {
            "timestamp": 5e-324,
            "order": ""
          }
        },
        {
          "name": "Summer Solstice",
          "description": "The Summer Solstice is the day of the year with the most time between \nsunrise and sunset. Many western cultures consider it the official start\n of summer.",
          "id": "824456",
          "note": null,
          "date": {
            "day": null,
            "year": null,
            "month": null
          },
          "category": "natural-event",
          "sort": {
            "timestamp": 5e-324,
            "order": ""
          }
        },
        {
          "name": "Spring Equinox",
          "description": "The Spring Equinox,\nalso called the Vernal Equinox, is the day between the winter and\nsummer solstices where the day is the exact same length as the night.\nMany western cultures consider it the official start of Spring.\n",
          "id": "824457",
          "note": null,
          "date": {
            "day": null,
            "year": null,
            "month": null
          },
          "category": "natural-event",
          "sort": {
            "timestamp": 5e-324,
            "order": ""
          }
        },
        {
          "name": "Autumnal Equinox",
          "description": "The Autumnal Equinox,\nalso called the Fall Equinox, is the midpoint between the summer and\nwinter solstices, where the day is the exact same length as the night.\nMany western cultures consider it the official start of Autumn.\n",
          "id": "824458",
          "note": null,
          "date": {
            "day": null,
            "year": null,
            "month": null
          },
          "category": null,
          "sort": {
            "timestamp": 5e-324,
            "order": ""
          }
        },
        {
          "name": "Paschal Full Moon",
          "description": "The first full moon after march 21st, which is considered the fixed date for the spring equinox.",
          "id": "824460",
          "note": null,
          "date": {
            "day": null,
            "year": null,
            "month": null
          },
          "category": "natural-event",
          "sort": {
            "timestamp": 5e-324,
            "order": ""
          }
        },
        {
          "name": "New Year's Day",
          "description": "New Year's day marks the start of a new year.",
          "id": "824459",
          "note": null,
          "date": {
            "day": 1,
            "year": null,
            "month": null
          },
          "category": null,
          "sort": {
            "timestamp": 5e-324,
            "order": ""
          }
        },
        {
          "name": "Sessie 001",
          "description": null,
          "date": {
            "day": 4,
            "month": 4,
            "year": 735
          },
          "id": "ID_ea78c999d9f9",
          "note": "Tabletop/Curse of Strahd 2023/Sessies/Sessie 001 - 2023-05-18, Een Goed Baroviaans Welkom.md",
          "category": "ID_3ba96ba998ea",
          "sort": {
            "timestamp": 7350404,
            "order": ""
          },
          "end": {
            "year": 735,
            "month": 4,
            "day": 5
          }
        },
        {
          "name": "Sessie 001",
          "description": null,
          "date": {
            "day": 3,
            "month": 4,
            "year": 735
          },
          "id": "ID_ea78c999d9f9",
          "note": "Tabletop/Curse of Strahd 2023/Sessies/Sessie 001 - 2023-05-18, Een Goed Baroviaans Welkom.md",
          "category": "ID_3ba96ba998ea",
          "sort": {
            "timestamp": 7350403,
            "order": ""
          },
          "end": {
            "year": 735,
            "month": 4,
            "day": 4
          }
        },
        {
          "name": "Sessie 002 - 2023-06-01",
          "description": null,
          "date": {
            "day": 4,
            "month": 4,
            "year": 735
          },
          "id": "ID_2b7a486ba85a",
          "note": "Tabletop/Curse of Strahd 2023/Sessies/Sessie 002 - 2023-06-01.md",
          "category": "ID_3ba96ba998ea",
          "sort": {
            "timestamp": 7350404,
            "order": ""
          }
        },
        {
          "name": "Sessie 002 - 2023-06-01",
          "description": null,
          "date": {
            "day": 4,
            "month": 4,
            "year": 735
          },
          "id": "ID_2b7a486ba85a",
          "note": "Tabletop/Curse of Strahd 2023/Sessies/Sessie 002 - 2023-06-01.md",
          "category": "ID_3ba96ba998ea",
          "sort": {
            "timestamp": 7350404,
            "order": ""
          }
        },
        {
          "name": "Sessie 001 - 2023-05-18",
          "description": null,
          "date": {
            "day": 3,
            "month": 4,
            "year": 735
          },
          "id": "ID_ea78c999d9f9",
          "note": "Tabletop/Curse of Strahd 2023/Sessies/Sessie 001 - 2023-05-18, Een Goed Baroviaans Welkom.md",
          "category": "ID_3ba96ba998ea",
          "sort": {
            "timestamp": 7350403,
            "order": ""
          },
          "end": {
            "year": 735,
            "month": 4,
            "day": 4
          }
        },
        {
          "name": "Sessie 003 - 2023-06-22",
          "description": null,
          "date": {
            "day": 4,
            "month": 4,
            "year": 735
          },
          "id": "ID_d90a1b1b980a",
          "note": "Tabletop/Curse of Strahd 2023/Sessies/Sessie 003 - 2023-06-22.md",
          "category": null,
          "sort": {
            "timestamp": 7350404,
            "order": ""
          }
        },
        {
          "name": "Sessie 004 - 2023-07-27",
          "description": null,
          "date": {
            "day": 4,
            "month": 4,
            "year": 735
          },
          "id": "ID_d8cbf808a849",
          "note": "Tabletop/Curse of Strahd 2023/Sessies/Sessie 004 - 2023-07-27.md",
          "category": "ID_3ba96ba998ea",
          "sort": {
            "timestamp": 7350404,
            "order": ""
          }
        },
        {
          "name": "Sessie 003 - 2023-06-22",
          "description": null,
          "date": {
            "day": 4,
            "month": 4,
            "year": 735
          },
          "id": "ID_d90a1b1b980a",
          "note": "Tabletop/Curse of Strahd 2023/Sessies/Sessie 003 - 2023-06-22.md",
          "category": "ID_3ba96ba998ea",
          "sort": {
            "timestamp": 7350404,
            "order": ""
          }
        },
        {
          "name": "Sessie 005 - 2023-08-10",
          "description": null,
          "date": {
            "day": 4,
            "month": 4,
            "year": 735
          },
          "id": "ID_5b7a4ad88abb",
          "note": "Tabletop/Curse of Strahd 2023/Sessies/Sessie 005 - 2023-08-10.md",
          "category": "ID_3ba96ba998ea",
          "sort": {
            "timestamp": 7350404,
            "order": ""
          },
          "end": {
            "year": 735,
            "month": 4,
            "day": 5
          }
        },
        {
          "name": "Sessie 006 - 2023-08-24",
          "description": null,
          "date": {
            "day": 5,
            "month": 4,
            "year": 735
          },
          "id": "ID_9ad81b2b0bcb",
          "note": "Tabletop/Curse of Strahd 2023/Sessies/Sessie 006 - 2023-08-24.md",
          "category": "ID_3ba96ba998ea",
          "sort": {
            "timestamp": 7350405,
            "order": ""
          }
        },
        {
          "name": "Sessie 007 - 2023-09-21",
          "description": null,
          "date": {
            "day": 5,
            "month": 4,
            "year": 735
          },
          "id": "ID_fabbfb29c838",
          "note": "Tabletop/Curse of Strahd 2023/Sessies/Sessie 007 - 2023-09-21.md",
          "category": "ID_3ba96ba998ea",
          "sort": {
            "timestamp": 7350405,
            "order": ""
          }
        },
        {
          "name": "Sessie 008 - 2023-10-18",
          "description": null,
          "date": {
            "day": 5,
            "month": 4,
            "year": 735
          },
          "id": "ID_9a6b5bfb5bea",
          "note": "Tabletop/Curse of Strahd 2023/Sessies/Sessie 008 - 2023-10-18.md",
          "category": "ID_3ba96ba998ea",
          "sort": {
            "timestamp": 7350405,
            "order": ""
          },
          "end": {
            "year": 735,
            "month": 4,
            "day": 6
          }
        },
        {
          "name": "Sessie 009 - 2023-11-29",
          "description": null,
          "date": {
            "day": 6,
            "month": 4,
            "year": 735
          },
          "id": "ID_39fb1b5bdbe9",
          "note": "Tabletop/Curse of Strahd 2023/Sessies/Sessie 009 - 2023-11-29.md",
          "category": "ID_3ba96ba998ea",
          "sort": {
            "timestamp": 7350406,
            "order": ""
          }
        },
        {
          "name": "Sessie 010 - 2024-03-20",
          "description": null,
          "date": {
            "day": 7,
            "month": 4,
            "year": 735
          },
          "id": "ID_3859bb3a3898",
          "note": "Tabletop/Curse of Strahd 2023/Sessies/Sessie 010 - 2024-03-20.md",
          "category": "ID_3ba96ba998ea",
          "sort": {
            "timestamp": 7350407,
            "order": ""
          }
        },
        {
          "name": "Sessie 010 - 2024-03-20",
          "description": null,
          "date": {
            "day": 6,
            "month": 4,
            "year": 735
          },
          "id": "ID_3859bb3a3898",
          "note": "Tabletop/Curse of Strahd 2023/Sessies/Sessie 010 - 2024-03-20.md",
          "category": "ID_3ba96ba998ea",
          "sort": {
            "timestamp": 7350406,
            "order": ""
          },
          "end": {
            "year": 735,
            "month": 4,
            "day": 7
          }
        }
      ],
      "id": "ID_094b68aba97a",
      "categories": [
        {
          "name": "Natural Event",
          "id": "natural-event",
          "color": "#9e9d24"
        },
        {
          "id": "ID_3ba96ba998ea",
          "color": "#e27175",
          "name": "Sessions"
        }
      ]
    }
  ],
  "configDirectory": null,
  "dailyNotes": false,
  "dateFormat": "YYYY-MM-DD",
  "defaultCalendar": "ID_094b68aba97a",
  "eventPreview": false,
  "exit": {
    "saving": false,
    "event": false,
    "calendar": false
  },
  "eventFrontmatter": false,
  "parseDates": false,
  "version": {
    "major": 1,
    "minor": 0,
    "patch": 12,
    "beta": null
  },
  "debug": false,
  "askedToMoveFC": false,
  "askedAboutSync": false,
  "syncBehavior": "Ask",
  "inlineEventsTag": null,
  "paths": []
}

If I can provide a log or some other information to help diagnose the issue, please let me know. I am not well-versed in debugging Obsidian on Android to know where to look

Which Operating Systems are you using?

Obsidian Version Check

1.5.8 and 1.5.8 on desktop, 1.5.11 on Tablet

Plugin Version

1.0.12 on both

Confirmation

Possible solution

No response

mvriel commented 3 months ago

I tried tweaking my settings to see if there is another outcome, but to no avail:

image

I added a path to my Curse of Strahd calendar, and to set 'Add events to default calender' off. I hoped it was an indexing issue and tried to manipulate this in such a way that it wouldn't index or index just a portion

mvriel commented 3 months ago

And because this is bugging me, I have enabled ADB and Developer Tools on my device and followed the instructions at https://docs.obsidian.md/Plugins/Getting+started/Mobile+development#Android. But the console doesn't give a significant difference or errors compared to my local setup. (there is one difference, a Path not Found error; but that happens when Calendarium is disabled as well)

SaschaDz commented 3 months ago

I have exactly the same issue. Obsidian started crashing on android yesterday after I installed and configured calendarium on desktop. Deactivated all plugins and tried one by one.

valentine195 commented 2 months ago

Hi @mvriel , @SaschaDz

I don't have an Android so I can't do testing, unfortunately, but a few people tried recreating this issue and couldn't.

I do have a few follow up questions:

  1. Do you use Obsidian Sync?
  2. How many notes do you have?
  3. What is the "Settings sync behavior" set to in Calendarium Settings (under advanced)

An interesting detail may be that the crash only happens when the application is running for maybe 10 to 30 seconds or so. It is not immediate

@SaschaDz is this the case for you as well?

This makes me think it is perhaps Obsidian Sync finishing, and Calendarium doing its setting reload.

mvriel commented 2 months ago
  1. No, but I do use DriveSync (external application) to sync my notes folder to Google Drive
  2. 467
  3. It is set to "Continue Asking"
valentine195 commented 2 months ago

@mvriel what kind of phone do you use

mvriel commented 2 months ago

It happens on both my Galaxy Tab S8 and Galaxy A53

mvriel commented 2 months ago

If I have time I wouldn't mind and try to debug the issue; but I have never made a plugin before so I don't really know what toolchain to use and/or how to best remote debug it on my device

mvriel commented 2 months ago

I had hoped to see a Javascript error in de ADB logs, but oddly enough nothing pops up

Shyclops commented 2 months ago

I too have this problem, the problem is consistent but i haven't been able to narrow it down to a specific cause i've narrowed it down a 23.2MB png causing the problem

valentine195 commented 2 months ago

@mvriel @SaschaDz can you try the latest build

SaschaDz commented 2 months ago

@mvriel @SaschaDz can you try the latest build

Updated and enabled the plugin, obsidian did not crash. Looks good, thank you!

mvriel commented 2 months ago

Same for me, that was a super-fix :) Thank you so much

valentine195 commented 2 months ago

Great :)