{
   "expand": "operations,versionedRepresentations,editmeta,changelog,renderedFields",
   "id": "402918",
   "self": "https://bugs.mojang.com/rest/api/2/issue/402918",
   "key": "BDS-11039",
   "fields": {
      "issuetype": "1",
      "project": "11700",
      "fixVersions": [],
      "resolution": "3",
      "customfield_10500": {
         "self": "https://bugs.mojang.com/rest/api/2/customFieldOption/10300",
         "value": "Unconfirmed",
         "id": "10300",
         "disabled": false
      },
      "customfield_12800": null,
      "customfield_12602": [],
      "customfield_12601": null,
      "customfield_12604": null,
      "customfield_12603": null,
      "customfield_12606": null,
      "customfield_12605": null,
      "customfield_12608": null,
      "resolutiondate": "2021-01-20T13:34:45.000+0200",
      "customfield_12607": null,
      "customfield_12609": null,
      "workratio": -1,
      "lastViewed": null,
      "watches": {
         "self": "https://bugs.mojang.com/rest/api/2/issue/BDS-11039/watchers",
         "watchCount": 7,
         "isWatching": false
      },
      "created": "2021-01-07T21:04:07.000+0200",
      "customfield_12000": null,
      "customfield_12201": null,
      "customfield_12600": null,
      "labels": [],
      "customfield_11700": "{}",
      "versions": [
         "19717"
      ],
      "issuelinks": [
         {
            "id": "218466",
            "self": "https://bugs.mojang.com/rest/api/2/issueLink/218466",
            "type": "10102",
            "outwardIssue": "397357"
         }
      ],
      "assignee": null,
      "updated": "2021-01-20T13:34:45.000+0200",
      "status": "5",
      "description": "To reproduce:\r\n 1. Stand at the position 1695 36 -953 and wait (in the world [here|https://www.dropbox.com/s/vzvf9ag35gt0p87/buggy_world.zip?dl=1]).\r\n\r\n2. Game Crashes.\r\n\r\nThe following crash log was produced on the server:\r\n{code:java}\r\nCrash\r\n[INFO] at std::__shared_count<[__gnu_cxx::_Lock_policy]2>::__shared_count[std::__weak_count<[__gnu_cxx::_Lock_policy]2> const&, std::nothrow_t] (UnknownFile:?)\r\n at std::__shared_ptr<POIInstance, [__gnu_cxx::_Lock_policy]2>::__shared_ptr[std::__weak_ptr<POIInstance, [__gnu_cxx::_Lock_policy]2> const&, std::nothrow_t] (UnknownFile:?)\r\n at std::shared_ptr<POIInstance>::shared_ptr[std::weak_ptr<POIInstance> const&, std::nothrow_t] (UnknownFile:?)\r\n at std::weak_ptr<POIInstance>::lock[] const (UnknownFile:?)\r\n at Village::getBedPOICount[] const (UnknownFile:?)\r\n at Village::tick[Tick, BlockSource&] (UnknownFile:?)\r\n at VillageManager::tickVillages[Tick const&, Vec3 const&, BlockSource&] (UnknownFile:?)\r\n at ServerPlayer::tickWorld[Tick const&] (UnknownFile:?)\r\n at std::function<bool [Player&]>::operator[][Player&] const (UnknownFile:?)\r\n at Level::forEachPlayer[std::function<bool [Player&]>] (UnknownFile:?)\r\n at Level::tick[] (UnknownFile:?)\r\n at ServerLevel::tick[] (UnknownFile:?)\r\n at GameSession::tick[] (UnknownFile:?)\r\n at Minecraft::tickSimtime[int, int] (UnknownFile:?)\r\n at Minecraft::update[] (UnknownFile:?)\r\n at ServerInstance::_update[] (UnknownFile:?)\r\n at clone (UnknownFile:?){code}\r\nFrom what I have discovered, this bug is caused by locking a weak_ptr from the POIInstance list (std::vector<std::weak_ptr<POIInstance>>). When reading from the vector using [], a null value is returned, which ultimately gets dereferenced and causes a crash. To be exact, the address+8 is dereferenced, which to my knowledge is the offset for the reference count of a smart pointer. \r\n\r\nI can also see that right after locking the weak_ptr, there is some kind of null check (not sure if its for the same pointer though, I think not).\r\n\r\nI propose the following: before locking the weak_ptr, check if it is nullptr. If not, then you can lock it. I don't know why any of the POIInstances should ever be nullpointers, but simply checking for this could solve the issue.",
      "customfield_11100": null,
      "customfield_11300": null,
      "customfield_11500": "457993",
      "customfield_12503": null,
      "customfield_12700": null,
      "customfield_12502": null,
      "customfield_12504": null,
      "attachment": [],
      "summary": "Server Crashed on Village::getBedPOICount[]",
      "creator": "JIRAUSER593813",
      "reporter": "JIRAUSER593813",
      "customfield_10002": null,
      "customfield_12501": null,
      "customfield_12500": null,
      "customfield_11601": null,
      "customfield_11600": "0|i1r75z:",
      "environment": "Debian GNU/Linux 10 (buster), glibc version 2.28-10, Linux kernel 4.19.0-13-amd64",
      "customfield_11801": null,
      "customfield_11800": null,
      "customfield_11602": null,
      "customfield_11802": null,
      "comment": {
         "comments": [
            {
               "self": "https://bugs.mojang.com/rest/api/2/issue/402918/comment/891684",
               "id": "891684",
               "author": "JIRAUSER594056",
               "body": "Same problem, position [ 219 69 -688 ]\r\n\r\n[INFO] Package: com.mojang.minecraft.dedicatedserver\r\nVersion: 1.16.201.2\r\nOS: Linux\r\nServer start: 2021-01-08 14:15:13 UTC\r\nDmp timestamp: 2021-01-08 14:17:05 UTC\r\nUpload Date: 2021-01-08 14:17:05 UTC\r\nSession ID: 86854841-37a9-422e-a10d-246184401b39\r\nCommit hash:\r\nBuild id: development\r\nCrashReporter Key: ce158104-660f-3b4f-9fe4-b690c05910a6\r\n\r\nCrash\r\n[INFO] at std::__shared_count<[__gnu_cxx::_Lock_policy]2>::__shared_count[std::__weak_count<[__gnu_cxx::_Lock_policy]2> const&, std::nothrow_t] (UnknownFile:?)\r\n at std::__shared_ptr<POIInstance, [__gnu_cxx::_Lock_policy]2>::__shared_ptr[std::__weak_ptr<POIInstance, [__gnu_cxx::_Lock_policy]2> const&, std::nothrow_t] (UnknownFile:?)\r\n at std::shared_ptr<POIInstance>::shared_ptr[std::weak_ptr<POIInstance> const&, std::nothrow_t] (UnknownFile:?)\r\n at std::weak_ptr<POIInstance>::lock[] const (UnknownFile:?)\r\n at Village::getBedPOICount[] const (UnknownFile:?)\r\n at Village::tick[Tick, BlockSource&] (UnknownFile:?)\r\n at VillageManager::tickVillages[Tick const&, Vec3 const&, BlockSource&] (UnknownFile:?)\r\n at ServerPlayer::tickWorld[Tick const&] (UnknownFile:?)\r\n at std::function<bool [Player&]>::operator[][Player&] const (UnknownFile:?)\r\n at Level::forEachPlayer[std::function<bool [Player&]>] (UnknownFile:?)\r\n at Level::tick[] (UnknownFile:?)\r\n at ServerLevel::tick[] (UnknownFile:?)\r\n at GameSession::tick[] (UnknownFile:?)\r\n at Minecraft::tickSimtime[int, int] (UnknownFile:?)\r\n at Minecraft::update[] (UnknownFile:?)\r\n at ServerInstance::_update[] (UnknownFile:?)\r\n at clone (UnknownFile:?)",
               "updateAuthor": "JIRAUSER594056",
               "created": "2021-01-08T13:21:29.609+0200",
               "updated": "2021-01-08T13:21:29.609+0200"
            },
            {
               "self": "https://bugs.mojang.com/rest/api/2/issue/402918/comment/892479",
               "id": "892479",
               "author": "JIRAUSER591766",
               "body": "Added some comments in BDS-10666.\r\n\r\ntl;dr: using the test world attached to this bug, I can reliably reproduce the crash under Ubuntu 20.04 but have not been able to reproduce under Ubuntu 18.04. I believe the difference is the version of libstdc++ (6.0.25 on Ubuntu 18.04; 6.0.28 on Ubuntu 20.04).\r\n\r\nI'm testing using a Docker container and the standard Ubuntu provided images (ubuntu:18.04 and ubuntu:20.04).\r\n\r\nCan you try this and see if it fixes the crash for you?",
               "updateAuthor": "arisabot",
               "created": "2021-01-09T09:54:13.441+0200",
               "updated": "2021-01-09T09:54:15.854+0200"
            },
            {
               "self": "https://bugs.mojang.com/rest/api/2/issue/402918/comment/892657",
               "id": "892657",
               "author": "JIRAUSER593813",
               "body": "@Tom Gray my debian install where the crash occured is on libstdc++6.0.25. My personal computer, which has libstdc++6.0.28 also crashes. I don't think this is an issue with any specific libstdc++ version.",
               "updateAuthor": "JIRAUSER593813",
               "created": "2021-01-09T15:36:42.204+0200",
               "updated": "2021-01-09T15:36:42.204+0200"
            },
            {
               "self": "https://bugs.mojang.com/rest/api/2/issue/402918/comment/892989",
               "id": "892989",
               "author": "JIRAUSER595019",
               "body": "Same here - Ubuntu 20.04\r\n\r\n[INFO] Package: com.mojang.minecraft.dedicatedserver\r\nVersion: 1.16.201.2\r\nOS: Linux\r\nServer start: 2021-01-09 17:06:40 UTC\r\nDmp timestamp: 2021-01-09 17:29:28 UTC\r\nUpload Date: 2021-01-09 17:29:28 UTC\r\nSession ID: 629e8872-5ead-4c07-a0af-0146148018e5\r\nCommit hash: \r\nBuild id: development\r\nCrashReporter Key: 2d02d684-d26e-3ee0-b5cd-52ae42c374db\r\n\r\nCrash\r\n[INFO]  at std::__shared_count<[__gnu_cxx::_Lock_policy]2>::__shared_count[std::__weak_count<[__gnu_cxx::_Lock_policy]2> const&, std::nothrow_t] (UnknownFile:?)\r\n        at std::__shared_ptr<POIInstance, [__gnu_cxx::_Lock_policy]2>::__shared_ptr[std::__weak_ptr<POIInstance, [__gnu_cxx::_Lock_policy]2> const&, std::nothrow_t] (UnknownFile:?)\r\n        at std::shared_ptr<POIInstance>::shared_ptr[std::weak_ptr<POIInstance> const&, std::nothrow_t] (UnknownFile:?)\r\n        at std::weak_ptr<POIInstance>::lock[] const (UnknownFile:?)\r\n        at Village::getBedPOICount[] const (UnknownFile:?)\r\n        at Village::tick[Tick, BlockSource&] (UnknownFile:?)\r\n        at VillageManager::tickVillages[Tick const&, Vec3 const&, BlockSource&] (UnknownFile:?)\r\n        at ServerPlayer::tickWorld[Tick const&] (UnknownFile:?)\r\n        at std::function<bool [Player&]>::operator[][Player&] const (UnknownFile:?)\r\n        at Level::forEachPlayer[std::function<bool [Player&]>] (UnknownFile:?)\r\n        at Level::tick[] (UnknownFile:?)\r\n        at ServerLevel::tick[] (UnknownFile:?)\r\n        at GameSession::tick[] (UnknownFile:?)\r\n        at Minecraft::tickSimtime[int, int] (UnknownFile:?)\r\n        at Minecraft::update[] (UnknownFile:?)\r\n        at ServerInstance::_update[] (UnknownFile:?)\r\n        at clone (UnknownFile:?)",
               "updateAuthor": "JIRAUSER595019",
               "created": "2021-01-10T07:38:23.395+0200",
               "updated": "2021-01-10T07:38:23.395+0200"
            },
            {
               "self": "https://bugs.mojang.com/rest/api/2/issue/402918/comment/893044",
               "id": "893044",
               "author": "JIRAUSER591766",
               "body": "Thanks for confirming. I've put some more detail on\u00a0BDS-10666 with .so versions from my working install - can you compare these against your system?",
               "updateAuthor": "JIRAUSER591766",
               "created": "2021-01-10T12:54:04.080+0200",
               "updated": "2021-01-10T12:54:04.080+0200"
            },
            {
               "self": "https://bugs.mojang.com/rest/api/2/issue/402918/comment/899968",
               "id": "899968",
               "author": "mega_spud",
               "body": "*Thank you for your report!*\r\nWe're actually already tracking this issue at *+BDS-10666+*, so we will resolve and link this ticket as a duplicate. \r\n\r\nIf you would like to add a vote and any extra information to the main ticket it would be appreciated.\r\n\r\n*Quick Links*:\r\n\ud83d\udcd3 [Issue Guidelines|https://aka.ms/MCBugTrackerHelp|How To Write Awesome Tickets! \ud83d\udcaf] -- \ud83d\udcac [Mojang Support|https://help.minecraft.net/hc/en-us/requests/new|Account Support \ud83d\udd79] -- \ud83d\udce7 [Suggestions|https://feedback.minecraft.net/|Feedback and Suggestions \u270d\ufe0f] -- \ud83d\udcd6 [Minecraft Wiki|http://minecraft.gamepedia.com/Minecraft_Wiki|Minecraft Wiki \ud83c\udf93]",
               "updateAuthor": "mega_spud",
               "created": "2021-01-20T13:34:45.236+0200",
               "updated": "2021-01-20T13:34:45.236+0200"
            }
         ],
         "maxResults": 6,
         "total": 6,
         "startAt": 0
      },
      "votes": {
         "self": "https://bugs.mojang.com/rest/api/2/issue/BDS-11039/votes",
         "votes": 5,
         "hasVoted": false
      }
   },
   "changelog": {
      "startAt": 0,
      "maxResults": 8,
      "total": 8,
      "histories": [
         {
            "id": "1965045",
            "author": "JIRAUSER593813",
            "created": "2021-01-07T21:15:59.202+0200",
            "items": [
               {
                  "field": "description",
                  "fieldtype": "jira",
                  "from": null,
                  "fromString": "The following crash log was produced on the server:\r\n{code:java}\r\nCrash\r\n[INFO] at std::__shared_count<[__gnu_cxx::_Lock_policy]2>::__shared_count[std::__weak_count<[__gnu_cxx::_Lock_policy]2> const&, std::nothrow_t] (UnknownFile:?)\r\n at std::__shared_ptr<POIInstance, [__gnu_cxx::_Lock_policy]2>::__shared_ptr[std::__weak_ptr<POIInstance, [__gnu_cxx::_Lock_policy]2> const&, std::nothrow_t] (UnknownFile:?)\r\n at std::shared_ptr<POIInstance>::shared_ptr[std::weak_ptr<POIInstance> const&, std::nothrow_t] (UnknownFile:?)\r\n at std::weak_ptr<POIInstance>::lock[] const (UnknownFile:?)\r\n at Village::getBedPOICount[] const (UnknownFile:?)\r\n at Village::tick[Tick, BlockSource&] (UnknownFile:?)\r\n at VillageManager::tickVillages[Tick const&, Vec3 const&, BlockSource&] (UnknownFile:?)\r\n at ServerPlayer::tickWorld[Tick const&] (UnknownFile:?)\r\n at std::function<bool [Player&]>::operator[][Player&] const (UnknownFile:?)\r\n at Level::forEachPlayer[std::function<bool [Player&]>] (UnknownFile:?)\r\n at Level::tick[] (UnknownFile:?)\r\n at ServerLevel::tick[] (UnknownFile:?)\r\n at GameSession::tick[] (UnknownFile:?)\r\n at Minecraft::tickSimtime[int, int] (UnknownFile:?)\r\n at Minecraft::update[] (UnknownFile:?)\r\n at ServerInstance::_update[] (UnknownFile:?)\r\n at clone (UnknownFile:?){code}",
                  "to": null,
                  "toString": "To reproduce:\r\n1. Stand at the position 1695 36 -953 and wait (in the world i added to the issue).\r\n\r\n2. Game Crashes.\r\n\r\n\r\nThe following crash log was produced on the server:\r\n{code:java}\r\nCrash\r\n[INFO] at std::__shared_count<[__gnu_cxx::_Lock_policy]2>::__shared_count[std::__weak_count<[__gnu_cxx::_Lock_policy]2> const&, std::nothrow_t] (UnknownFile:?)\r\n at std::__shared_ptr<POIInstance, [__gnu_cxx::_Lock_policy]2>::__shared_ptr[std::__weak_ptr<POIInstance, [__gnu_cxx::_Lock_policy]2> const&, std::nothrow_t] (UnknownFile:?)\r\n at std::shared_ptr<POIInstance>::shared_ptr[std::weak_ptr<POIInstance> const&, std::nothrow_t] (UnknownFile:?)\r\n at std::weak_ptr<POIInstance>::lock[] const (UnknownFile:?)\r\n at Village::getBedPOICount[] const (UnknownFile:?)\r\n at Village::tick[Tick, BlockSource&] (UnknownFile:?)\r\n at VillageManager::tickVillages[Tick const&, Vec3 const&, BlockSource&] (UnknownFile:?)\r\n at ServerPlayer::tickWorld[Tick const&] (UnknownFile:?)\r\n at std::function<bool [Player&]>::operator[][Player&] const (UnknownFile:?)\r\n at Level::forEachPlayer[std::function<bool [Player&]>] (UnknownFile:?)\r\n at Level::tick[] (UnknownFile:?)\r\n at ServerLevel::tick[] (UnknownFile:?)\r\n at GameSession::tick[] (UnknownFile:?)\r\n at Minecraft::tickSimtime[int, int] (UnknownFile:?)\r\n at Minecraft::update[] (UnknownFile:?)\r\n at ServerInstance::_update[] (UnknownFile:?)\r\n at clone (UnknownFile:?){code}"
               }
            ]
         },
         {
            "id": "1965055",
            "author": "JIRAUSER593813",
            "created": "2021-01-07T21:19:53.176+0200",
            "items": [
               {
                  "field": "description",
                  "fieldtype": "jira",
                  "from": null,
                  "fromString": "To reproduce:\r\n1. Stand at the position 1695 36 -953 and wait (in the world i added to the issue).\r\n\r\n2. Game Crashes.\r\n\r\n\r\nThe following crash log was produced on the server:\r\n{code:java}\r\nCrash\r\n[INFO] at std::__shared_count<[__gnu_cxx::_Lock_policy]2>::__shared_count[std::__weak_count<[__gnu_cxx::_Lock_policy]2> const&, std::nothrow_t] (UnknownFile:?)\r\n at std::__shared_ptr<POIInstance, [__gnu_cxx::_Lock_policy]2>::__shared_ptr[std::__weak_ptr<POIInstance, [__gnu_cxx::_Lock_policy]2> const&, std::nothrow_t] (UnknownFile:?)\r\n at std::shared_ptr<POIInstance>::shared_ptr[std::weak_ptr<POIInstance> const&, std::nothrow_t] (UnknownFile:?)\r\n at std::weak_ptr<POIInstance>::lock[] const (UnknownFile:?)\r\n at Village::getBedPOICount[] const (UnknownFile:?)\r\n at Village::tick[Tick, BlockSource&] (UnknownFile:?)\r\n at VillageManager::tickVillages[Tick const&, Vec3 const&, BlockSource&] (UnknownFile:?)\r\n at ServerPlayer::tickWorld[Tick const&] (UnknownFile:?)\r\n at std::function<bool [Player&]>::operator[][Player&] const (UnknownFile:?)\r\n at Level::forEachPlayer[std::function<bool [Player&]>] (UnknownFile:?)\r\n at Level::tick[] (UnknownFile:?)\r\n at ServerLevel::tick[] (UnknownFile:?)\r\n at GameSession::tick[] (UnknownFile:?)\r\n at Minecraft::tickSimtime[int, int] (UnknownFile:?)\r\n at Minecraft::update[] (UnknownFile:?)\r\n at ServerInstance::_update[] (UnknownFile:?)\r\n at clone (UnknownFile:?){code}",
                  "to": null,
                  "toString": "To reproduce:\r\n 1. Stand at the position 1695 36 -953 and wait (in the world [here|https://www.dropbox.com/s/vzvf9ag35gt0p87/buggy_world.zip?dl=1]).\r\n\r\n2. Game Crashes.\r\n\r\nThe following crash log was produced on the server:\r\n{code:java}\r\nCrash\r\n[INFO] at std::__shared_count<[__gnu_cxx::_Lock_policy]2>::__shared_count[std::__weak_count<[__gnu_cxx::_Lock_policy]2> const&, std::nothrow_t] (UnknownFile:?)\r\n at std::__shared_ptr<POIInstance, [__gnu_cxx::_Lock_policy]2>::__shared_ptr[std::__weak_ptr<POIInstance, [__gnu_cxx::_Lock_policy]2> const&, std::nothrow_t] (UnknownFile:?)\r\n at std::shared_ptr<POIInstance>::shared_ptr[std::weak_ptr<POIInstance> const&, std::nothrow_t] (UnknownFile:?)\r\n at std::weak_ptr<POIInstance>::lock[] const (UnknownFile:?)\r\n at Village::getBedPOICount[] const (UnknownFile:?)\r\n at Village::tick[Tick, BlockSource&] (UnknownFile:?)\r\n at VillageManager::tickVillages[Tick const&, Vec3 const&, BlockSource&] (UnknownFile:?)\r\n at ServerPlayer::tickWorld[Tick const&] (UnknownFile:?)\r\n at std::function<bool [Player&]>::operator[][Player&] const (UnknownFile:?)\r\n at Level::forEachPlayer[std::function<bool [Player&]>] (UnknownFile:?)\r\n at Level::tick[] (UnknownFile:?)\r\n at ServerLevel::tick[] (UnknownFile:?)\r\n at GameSession::tick[] (UnknownFile:?)\r\n at Minecraft::tickSimtime[int, int] (UnknownFile:?)\r\n at Minecraft::update[] (UnknownFile:?)\r\n at ServerInstance::_update[] (UnknownFile:?)\r\n at clone (UnknownFile:?){code}"
               }
            ]
         },
         {
            "id": "1965056",
            "author": "JIRAUSER593813",
            "created": "2021-01-07T21:20:29.899+0200",
            "items": [
               {
                  "field": "summary",
                  "fieldtype": "jira",
                  "from": null,
                  "fromString": "Server Crashed on locking a std::weak_ptr",
                  "to": null,
                  "toString": "Server Crashed on Village::getBedPOICount[]"
               }
            ]
         },
         {
            "id": "1965869",
            "author": "JIRAUSER593813",
            "created": "2021-01-08T16:57:48.779+0200",
            "items": [
               {
                  "field": "description",
                  "fieldtype": "jira",
                  "from": null,
                  "fromString": "To reproduce:\r\n 1. Stand at the position 1695 36 -953 and wait (in the world [here|https://www.dropbox.com/s/vzvf9ag35gt0p87/buggy_world.zip?dl=1]).\r\n\r\n2. Game Crashes.\r\n\r\nThe following crash log was produced on the server:\r\n{code:java}\r\nCrash\r\n[INFO] at std::__shared_count<[__gnu_cxx::_Lock_policy]2>::__shared_count[std::__weak_count<[__gnu_cxx::_Lock_policy]2> const&, std::nothrow_t] (UnknownFile:?)\r\n at std::__shared_ptr<POIInstance, [__gnu_cxx::_Lock_policy]2>::__shared_ptr[std::__weak_ptr<POIInstance, [__gnu_cxx::_Lock_policy]2> const&, std::nothrow_t] (UnknownFile:?)\r\n at std::shared_ptr<POIInstance>::shared_ptr[std::weak_ptr<POIInstance> const&, std::nothrow_t] (UnknownFile:?)\r\n at std::weak_ptr<POIInstance>::lock[] const (UnknownFile:?)\r\n at Village::getBedPOICount[] const (UnknownFile:?)\r\n at Village::tick[Tick, BlockSource&] (UnknownFile:?)\r\n at VillageManager::tickVillages[Tick const&, Vec3 const&, BlockSource&] (UnknownFile:?)\r\n at ServerPlayer::tickWorld[Tick const&] (UnknownFile:?)\r\n at std::function<bool [Player&]>::operator[][Player&] const (UnknownFile:?)\r\n at Level::forEachPlayer[std::function<bool [Player&]>] (UnknownFile:?)\r\n at Level::tick[] (UnknownFile:?)\r\n at ServerLevel::tick[] (UnknownFile:?)\r\n at GameSession::tick[] (UnknownFile:?)\r\n at Minecraft::tickSimtime[int, int] (UnknownFile:?)\r\n at Minecraft::update[] (UnknownFile:?)\r\n at ServerInstance::_update[] (UnknownFile:?)\r\n at clone (UnknownFile:?){code}",
                  "to": null,
                  "toString": "To reproduce:\r\n 1. Stand at the position 1695 36 -953 and wait (in the world [here|https://www.dropbox.com/s/vzvf9ag35gt0p87/buggy_world.zip?dl=1]).\r\n\r\n2. Game Crashes.\r\n\r\nThe following crash log was produced on the server:\r\n{code:java}\r\nCrash\r\n[INFO] at std::__shared_count<[__gnu_cxx::_Lock_policy]2>::__shared_count[std::__weak_count<[__gnu_cxx::_Lock_policy]2> const&, std::nothrow_t] (UnknownFile:?)\r\n at std::__shared_ptr<POIInstance, [__gnu_cxx::_Lock_policy]2>::__shared_ptr[std::__weak_ptr<POIInstance, [__gnu_cxx::_Lock_policy]2> const&, std::nothrow_t] (UnknownFile:?)\r\n at std::shared_ptr<POIInstance>::shared_ptr[std::weak_ptr<POIInstance> const&, std::nothrow_t] (UnknownFile:?)\r\n at std::weak_ptr<POIInstance>::lock[] const (UnknownFile:?)\r\n at Village::getBedPOICount[] const (UnknownFile:?)\r\n at Village::tick[Tick, BlockSource&] (UnknownFile:?)\r\n at VillageManager::tickVillages[Tick const&, Vec3 const&, BlockSource&] (UnknownFile:?)\r\n at ServerPlayer::tickWorld[Tick const&] (UnknownFile:?)\r\n at std::function<bool [Player&]>::operator[][Player&] const (UnknownFile:?)\r\n at Level::forEachPlayer[std::function<bool [Player&]>] (UnknownFile:?)\r\n at Level::tick[] (UnknownFile:?)\r\n at ServerLevel::tick[] (UnknownFile:?)\r\n at GameSession::tick[] (UnknownFile:?)\r\n at Minecraft::tickSimtime[int, int] (UnknownFile:?)\r\n at Minecraft::update[] (UnknownFile:?)\r\n at ServerInstance::_update[] (UnknownFile:?)\r\n at clone (UnknownFile:?){code}\r\nFrom what I have discovered, this bug is caused by locking a weak_ptr in the POIInstance list (std::vector<std::weak_ptr<POIInstance>>) which for some reason doesn't go well."
               }
            ]
         },
         {
            "id": "1965934",
            "author": "JIRAUSER593813",
            "created": "2021-01-08T17:21:46.081+0200",
            "items": [
               {
                  "field": "description",
                  "fieldtype": "jira",
                  "from": null,
                  "fromString": "To reproduce:\r\n 1. Stand at the position 1695 36 -953 and wait (in the world [here|https://www.dropbox.com/s/vzvf9ag35gt0p87/buggy_world.zip?dl=1]).\r\n\r\n2. Game Crashes.\r\n\r\nThe following crash log was produced on the server:\r\n{code:java}\r\nCrash\r\n[INFO] at std::__shared_count<[__gnu_cxx::_Lock_policy]2>::__shared_count[std::__weak_count<[__gnu_cxx::_Lock_policy]2> const&, std::nothrow_t] (UnknownFile:?)\r\n at std::__shared_ptr<POIInstance, [__gnu_cxx::_Lock_policy]2>::__shared_ptr[std::__weak_ptr<POIInstance, [__gnu_cxx::_Lock_policy]2> const&, std::nothrow_t] (UnknownFile:?)\r\n at std::shared_ptr<POIInstance>::shared_ptr[std::weak_ptr<POIInstance> const&, std::nothrow_t] (UnknownFile:?)\r\n at std::weak_ptr<POIInstance>::lock[] const (UnknownFile:?)\r\n at Village::getBedPOICount[] const (UnknownFile:?)\r\n at Village::tick[Tick, BlockSource&] (UnknownFile:?)\r\n at VillageManager::tickVillages[Tick const&, Vec3 const&, BlockSource&] (UnknownFile:?)\r\n at ServerPlayer::tickWorld[Tick const&] (UnknownFile:?)\r\n at std::function<bool [Player&]>::operator[][Player&] const (UnknownFile:?)\r\n at Level::forEachPlayer[std::function<bool [Player&]>] (UnknownFile:?)\r\n at Level::tick[] (UnknownFile:?)\r\n at ServerLevel::tick[] (UnknownFile:?)\r\n at GameSession::tick[] (UnknownFile:?)\r\n at Minecraft::tickSimtime[int, int] (UnknownFile:?)\r\n at Minecraft::update[] (UnknownFile:?)\r\n at ServerInstance::_update[] (UnknownFile:?)\r\n at clone (UnknownFile:?){code}\r\nFrom what I have discovered, this bug is caused by locking a weak_ptr in the POIInstance list (std::vector<std::weak_ptr<POIInstance>>) which for some reason doesn't go well.",
                  "to": null,
                  "toString": "To reproduce:\r\n 1. Stand at the position 1695 36 -953 and wait (in the world [here|https://www.dropbox.com/s/vzvf9ag35gt0p87/buggy_world.zip?dl=1]).\r\n\r\n2. Game Crashes.\r\n\r\nThe following crash log was produced on the server:\r\n{code:java}\r\nCrash\r\n[INFO] at std::__shared_count<[__gnu_cxx::_Lock_policy]2>::__shared_count[std::__weak_count<[__gnu_cxx::_Lock_policy]2> const&, std::nothrow_t] (UnknownFile:?)\r\n at std::__shared_ptr<POIInstance, [__gnu_cxx::_Lock_policy]2>::__shared_ptr[std::__weak_ptr<POIInstance, [__gnu_cxx::_Lock_policy]2> const&, std::nothrow_t] (UnknownFile:?)\r\n at std::shared_ptr<POIInstance>::shared_ptr[std::weak_ptr<POIInstance> const&, std::nothrow_t] (UnknownFile:?)\r\n at std::weak_ptr<POIInstance>::lock[] const (UnknownFile:?)\r\n at Village::getBedPOICount[] const (UnknownFile:?)\r\n at Village::tick[Tick, BlockSource&] (UnknownFile:?)\r\n at VillageManager::tickVillages[Tick const&, Vec3 const&, BlockSource&] (UnknownFile:?)\r\n at ServerPlayer::tickWorld[Tick const&] (UnknownFile:?)\r\n at std::function<bool [Player&]>::operator[][Player&] const (UnknownFile:?)\r\n at Level::forEachPlayer[std::function<bool [Player&]>] (UnknownFile:?)\r\n at Level::tick[] (UnknownFile:?)\r\n at ServerLevel::tick[] (UnknownFile:?)\r\n at GameSession::tick[] (UnknownFile:?)\r\n at Minecraft::tickSimtime[int, int] (UnknownFile:?)\r\n at Minecraft::update[] (UnknownFile:?)\r\n at ServerInstance::_update[] (UnknownFile:?)\r\n at clone (UnknownFile:?){code}\r\nFrom what I have discovered, this bug is caused by locking a weak_ptr from the POIInstance list (std::vector<std::weak_ptr<POIInstance>>). When reading from the vector using [], a null value is returned, which ultimately gets dereferenced and causes a crash. To be exact, the address+8 is dereferenced, which to my knowledge is the offset for the reference count of a smart pointer. \r\n\r\nI can also see that right after locking the weak_ptr, there is some kind of null check (not sure if its for the same pointer though, I think not).\r\n\r\nI propose the following: before locking the weak_ptr, check if it is nullptr. If not, then you can lock it. I don't know why any of the POIInstances should ever be nullpointers, but simply checking for this could solve the issue."
               }
            ]
         },
         {
            "id": "1979581",
            "author": "mega_spud",
            "created": "2021-01-20T13:21:31.383+0200",
            "items": [
               {
                  "field": "ADO",
                  "fieldtype": "custom",
                  "from": null,
                  "fromString": null,
                  "to": null,
                  "toString": "457993"
               },
               {
                  "field": "status",
                  "fieldtype": "jira",
                  "from": "1",
                  "fromString": "Open",
                  "to": "1",
                  "toString": "Open"
               }
            ]
         },
         {
            "id": "1979599",
            "author": "mega_spud",
            "created": "2021-01-20T13:34:45.423+0200",
            "items": [
               {
                  "field": "Link",
                  "fieldtype": "jira",
                  "from": null,
                  "fromString": null,
                  "to": "BDS-10666",
                  "toString": "This issue duplicates BDS-10666"
               }
            ]
         },
         {
            "id": "1979601",
            "author": "mega_spud",
            "created": "2021-01-20T13:34:45.431+0200",
            "items": [
               {
                  "field": "resolution",
                  "fieldtype": "jira",
                  "from": null,
                  "fromString": null,
                  "to": "3",
                  "toString": "Duplicate"
               },
               {
                  "field": "status",
                  "fieldtype": "jira",
                  "from": "1",
                  "fromString": "Open",
                  "to": "5",
                  "toString": "Resolved"
               }
            ]
         }
      ]
   }
}