{"action":"created","issue":{"url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/6352","repository_url":"https://api.github.com/repos/mavlink/qgroundcontrol","labels_url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/6352/labels{/name}","comments_url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/6352/comments","events_url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/6352/events","html_url":"https://github.com/mavlink/qgroundcontrol/issues/6352","id":314371594,"number":6352,"title":"Offline Terrain: Crashing on Windows","user":{"login":"DonLakeFlyer","id":5876851,"avatar_url":"https://avatars3.githubusercontent.com/u/5876851?v=4","gravatar_id":"","url":"https://api.github.com/users/DonLakeFlyer","html_url":"https://github.com/DonLakeFlyer","followers_url":"https://api.github.com/users/DonLakeFlyer/followers","following_url":"https://api.github.com/users/DonLakeFlyer/following{/other_user}","gists_url":"https://api.github.com/users/DonLakeFlyer/gists{/gist_id}","starred_url":"https://api.github.com/users/DonLakeFlyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DonLakeFlyer/subscriptions","organizations_url":"https://api.github.com/users/DonLakeFlyer/orgs","repos_url":"https://api.github.com/users/DonLakeFlyer/repos","events_url":"https://api.github.com/users/DonLakeFlyer/events{/privacy}","received_events_url":"https://api.github.com/users/DonLakeFlyer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-04-14T23:45:07Z","updated_at":"2018-04-15T14:55:42Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"@birchera @dogmaphobic Will need your help on this one. This shows up on Windows because the airmap queries are https and we don't install OpenSSL on windows. That said, it exposes a code path which is crashing. No idea how to fix.\r\n\r\nThe problem starts here: https://github.com/mavlink/qgroundcontrol/blob/master/src/QtLocationPlugin/QGeoMapReplyQGC.cpp#L156. It spits out: ```Fetch tile error: \"Error creating SSL context ()\"```.\r\n\r\nIt will then make it to here: https://github.com/mavlink/qgroundcontrol/blob/master/src/Terrain/TerrainQuery.cc#L442. Which is incorrect. The tile should have errored out. Instead it builds a tile with 0 bytes of data: ```Received some bytes of terrain data:  0```.\r\n\r\nWhich then eventually crashes here: https://github.com/mavlink/qgroundcontrol/blob/master/src/TerrainTile.cc#L122.  I'm assuming because _data is some crazy incorrect size or something like that caused by the bad tile build.\r\n\r\nI see two bugs here:\r\n* Why didn't the tile error out since it got a network error?\r\n* This code here: https://github.com/mavlink/qgroundcontrol/blob/master/src/TerrainTile.cc#L47 needs more sanity checking on the input data.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/comments/381412646","html_url":"https://github.com/mavlink/qgroundcontrol/issues/6352#issuecomment-381412646","issue_url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/6352","id":381412646,"user":{"login":"Antiheavy","id":12117027,"avatar_url":"https://avatars1.githubusercontent.com/u/12117027?v=4","gravatar_id":"","url":"https://api.github.com/users/Antiheavy","html_url":"https://github.com/Antiheavy","followers_url":"https://api.github.com/users/Antiheavy/followers","following_url":"https://api.github.com/users/Antiheavy/following{/other_user}","gists_url":"https://api.github.com/users/Antiheavy/gists{/gist_id}","starred_url":"https://api.github.com/users/Antiheavy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Antiheavy/subscriptions","organizations_url":"https://api.github.com/users/Antiheavy/orgs","repos_url":"https://api.github.com/users/Antiheavy/repos","events_url":"https://api.github.com/users/Antiheavy/events{/privacy}","received_events_url":"https://api.github.com/users/Antiheavy/received_events","type":"User","site_admin":false},"created_at":"2018-04-15T14:55:42Z","updated_at":"2018-04-15T14:55:42Z","author_association":"NONE","body":"for what it is worth, i can only get this crash to occur when a fixed wing landing pattern is in the mission plan.  I've tried and tried and cannot reproduce the crash without the fixed wing landing pattern.  With a fixed wing landing pattern the crash sometimes happens quickly, sometimes after many minutes, but it always happens.  Windows 10."}}
{"actor":{"display_login":"Antiheavy"}}