{"action":"created","issue":{"url":"https://api.github.com/repos/scrapinghub/splash/issues/397","repository_url":"https://api.github.com/repos/scrapinghub/splash","labels_url":"https://api.github.com/repos/scrapinghub/splash/issues/397/labels{/name}","comments_url":"https://api.github.com/repos/scrapinghub/splash/issues/397/comments","events_url":"https://api.github.com/repos/scrapinghub/splash/issues/397/events","html_url":"https://github.com/scrapinghub/splash/issues/397","id":137280173,"number":397,"title":"splash segfaults if you pass filters but dont pass \"url\" argument","user":{"login":"pawelmhm","id":2700942,"avatar_url":"https://avatars.githubusercontent.com/u/2700942?v=3","gravatar_id":"","url":"https://api.github.com/users/pawelmhm","html_url":"https://github.com/pawelmhm","followers_url":"https://api.github.com/users/pawelmhm/followers","following_url":"https://api.github.com/users/pawelmhm/following{/other_user}","gists_url":"https://api.github.com/users/pawelmhm/gists{/gist_id}","starred_url":"https://api.github.com/users/pawelmhm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pawelmhm/subscriptions","organizations_url":"https://api.github.com/users/pawelmhm/orgs","repos_url":"https://api.github.com/users/pawelmhm/repos","events_url":"https://api.github.com/users/pawelmhm/events{/privacy}","received_events_url":"https://api.github.com/users/pawelmhm/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/scrapinghub/splash/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-29T15:03:38Z","updated_at":"2016-02-29T15:11:09Z","closed_at":null,"body":"Really interesting bug, if you want to use filters but dont pass \"url\" and try to make call to go() splash will segfault, following Python script reproduces the problem\r\n\r\n```python\r\nbase_url = \"http://localhost:8050/execute\"\r\npost_url = base_url + \"?filters=easylist\"\r\nlua_source = \"function main(splash) return splash:go('http://splash.readthedocs.com') end\"\r\nres = requests.post(post_url, data=json.dumps({\"lua_source\": lua_source}), headers={\"content-type\": \"application/json\"})\r\nprint(res.json())\r\n```\r\n\r\nThis ends with SIGSEGV (Address boundary error)\r\n\r\n``` \r\n> python3 ./bin/splash -v 3 --filters-path=dev/filters/                                                                                                           \r\n2016-02-29 16:01:10.502342 [pool] [140131975982720] SLOT 0 is starting\r\n2016-02-29 16:01:10.502430 [render] [140131975982720] function main(splash) return splash:go('http://splash.readthedocs.com') end\r\n2016-02-29 16:01:10.505161 [render] [140131975982720] [lua_runner] dispatch cmd_id=__START__, args=None\r\n2016-02-29 16:01:10.505255 [render] [140131975982720] [lua_runner] arguments are for command __START__, waiting for result of __START__\r\n2016-02-29 16:01:10.505335 [render] [140131975982720] [lua_runner] send None\r\n2016-02-29 16:01:10.505496 [render] [140131975982720] [lua_runner] got AsyncBrowserCommand(id=None, name='go', kwargs={'http_method': 'GET', 'baseurl': None, 'errback': '<an errback>', 'headers': None, 'url': 'http://splash.readthedocs.com', 'callback': '<a callback>', 'body': None})\r\n2016-02-29 16:01:10.505586 [render] [140131975982720] [lua_runner] instructions used: 62\r\n2016-02-29 16:01:10.505673 [render] [140131975982720] [lua_runner] executing AsyncBrowserCommand(id=0, name='go', kwargs={'http_method': 'GET', 'baseurl': None, 'errback': '<an errback>', 'headers': None, 'url': 'http://splash.readthedocs.com', 'callback': '<a callback>', 'body': None})\r\n2016-02-29 16:01:10.505749 [render] [140131975982720] HAR event: _onStarted\r\n2016-02-29 16:01:10.505872 [render] [140131975982720] callback 0 is connected to loadFinished\r\n2016-02-29 16:01:10.507348 [network] [140131975982720] GET http://splash.readthedocs.com/\r\n\r\nfish: “python3 ./bin/splash -v 3 --fil…” terminated by signal SIGSEGV (Address boundary error)\r\n```"},"comment":{"url":"https://api.github.com/repos/scrapinghub/splash/issues/comments/190251708","html_url":"https://github.com/scrapinghub/splash/issues/397#issuecomment-190251708","issue_url":"https://api.github.com/repos/scrapinghub/splash/issues/397","id":190251708,"user":{"login":"pawelmhm","id":2700942,"avatar_url":"https://avatars.githubusercontent.com/u/2700942?v=3","gravatar_id":"","url":"https://api.github.com/users/pawelmhm","html_url":"https://github.com/pawelmhm","followers_url":"https://api.github.com/users/pawelmhm/followers","following_url":"https://api.github.com/users/pawelmhm/following{/other_user}","gists_url":"https://api.github.com/users/pawelmhm/gists{/gist_id}","starred_url":"https://api.github.com/users/pawelmhm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pawelmhm/subscriptions","organizations_url":"https://api.github.com/users/pawelmhm/orgs","repos_url":"https://api.github.com/users/pawelmhm/repos","events_url":"https://api.github.com/users/pawelmhm/events{/privacy}","received_events_url":"https://api.github.com/users/pawelmhm/received_events","type":"User","site_admin":false},"created_at":"2016-02-29T15:11:09Z","updated_at":"2016-02-29T15:11:09Z","body":"doing git bisect seems like this is really old bug, I went to version 1.6 and  turns out in this version it was also crashing, but with somewhat better error message\r\n\r\nTraceback from version 1.6:\r\n\r\n```\r\n2016-02-29 16:10:14.346721 [-] Traceback (most recent call last):\r\n2016-02-29 16:10:14.346817 [-]   File \"/home/pawel/scrapinghub/splash/splash/network_manager.py\", line 370, in createRequest\r\n2016-02-29 16:10:14.346951 [-]     request = filter.process(request, render_options, operation, outgoingData)\r\n2016-02-29 16:10:14.347023 [-]   File \"/home/pawel/scrapinghub/splash/splash/request_middleware.py\", line 94, in process\r\n2016-02-29 16:10:14.347112 [-]     url, options = self._url_and_adblock_options(request, render_options)\r\n2016-02-29 16:10:14.347185 [-]   File \"/home/pawel/scrapinghub/splash/splash/request_middleware.py\", line 109, in _url_and_adblock_options\r\n2016-02-29 16:10:14.347280 [-]     domain = urlparse.urlsplit(render_options.get_url()).netloc\r\n2016-02-29 16:10:14.347342 [-]   File \"/home/pawel/scrapinghub/splash/splash/render_options.py\", line 97, in get_url\r\n2016-02-29 16:10:14.347407 [-]     return self._get_url(\"url\")\r\n2016-02-29 16:10:14.347459 [-]   File \"/home/pawel/scrapinghub/splash/splash/render_options.py\", line 88, in _get_url\r\n2016-02-29 16:10:14.347523 [-]     url = self.get(name, default, type=None)\r\n2016-02-29 16:10:14.347575 [-]   File \"/home/pawel/scrapinghub/splash/splash/render_options.py\", line 80, in get\r\n2016-02-29 16:10:14.347638 [-]     raise BadOption(\"Missing argument: %s\" % name)\r\n2016-02-29 16:10:14.347701 [-] splash.render_options.BadOption: Missing argument: url\r\nfish: “python ./bin/splash -v 3 --filt…” terminated by signal SIGABRT (Abort)\r\n```"}}