{"action":"created","issue":{"url":"https://api.github.com/repos/KimiNewt/pyshark/issues/72","labels_url":"https://api.github.com/repos/KimiNewt/pyshark/issues/72/labels{/name}","comments_url":"https://api.github.com/repos/KimiNewt/pyshark/issues/72/comments","events_url":"https://api.github.com/repos/KimiNewt/pyshark/issues/72/events","html_url":"https://github.com/KimiNewt/pyshark/issues/72","id":65480543,"number":72,"title":"memory error with big capture","user":{"login":"Armonkee","id":11739706,"avatar_url":"https://avatars.githubusercontent.com/u/11739706?v=3","gravatar_id":"","url":"https://api.github.com/users/Armonkee","html_url":"https://github.com/Armonkee","followers_url":"https://api.github.com/users/Armonkee/followers","following_url":"https://api.github.com/users/Armonkee/following{/other_user}","gists_url":"https://api.github.com/users/Armonkee/gists{/gist_id}","starred_url":"https://api.github.com/users/Armonkee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Armonkee/subscriptions","organizations_url":"https://api.github.com/users/Armonkee/orgs","repos_url":"https://api.github.com/users/Armonkee/repos","events_url":"https://api.github.com/users/Armonkee/events{/privacy}","received_events_url":"https://api.github.com/users/Armonkee/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-03-31T15:36:47Z","updated_at":"2015-05-13T13:00:43Z","closed_at":"2015-05-11T09:52:21Z","body":"If I try to read a big Wireshark capture file with over 88000 captures, pyshark crashes after several thousands of packets (the number varies, even with the same capture file)\r\nwith a MemoryError:\r\n\r\n  File \"C:\\Python27\\lib\\site-packages\\pyshark\\capture\\capture.py\", line 167, in _packets_from_tshark_sync\r\n    self._get_packet_from_stream(tshark_process.stdout, data, psml_structure=psml_structure))\r\n  File \"C:\\Python27\\lib\\site-packages\\trollius\\base_events.py\", line 300, in run_until_complete\r\n    return future.result()\r\n  File \"C:\\Python27\\lib\\site-packages\\trollius\\futures.py\", line 287, in result\r\n    raise self._exception\r\nMemoryError \r\n\r\nI shrunk the Python program itself to a basic loop:\r\n\r\ncap=pyshark.FileCapture(capture+\".pcapng\",keep_packets=False) \r\np=0\r\nstart=time.time()\r\nfor packet in cap:\r\n    p+=1\r\n    if p%500 ==0:\r\n        print p,time.time()-start\r\n        start=time.time()\r\n\r\nThe output also shows that the program slows down while working its way through the packets\r\n(indication of a memory leak?):\r\n500 2.42000007629\r\n1000 3.33999991417\r\n1500 5.38499999046\r\n2000 7.25200009346\r\n2500 9.28200006485\r\n3000 11.371999979\r\n3500 13.3539998531\r\n4000 15.4560000896\r\n4500 17.6549999714\r\n5000 19.7650001049\r\n5500 21.7889997959\r\n6000 24.0099999905\r\n6500 26.1820001602\r\n7000 28.4779999256\r\n7500 30.6789999008\r\n8000 32.9380002022\r\n"},"comment":{"url":"https://api.github.com/repos/KimiNewt/pyshark/issues/comments/101654882","html_url":"https://github.com/KimiNewt/pyshark/issues/72#issuecomment-101654882","issue_url":"https://api.github.com/repos/KimiNewt/pyshark/issues/72","id":101654882,"user":{"login":"malli02422","id":10920419,"avatar_url":"https://avatars.githubusercontent.com/u/10920419?v=3","gravatar_id":"","url":"https://api.github.com/users/malli02422","html_url":"https://github.com/malli02422","followers_url":"https://api.github.com/users/malli02422/followers","following_url":"https://api.github.com/users/malli02422/following{/other_user}","gists_url":"https://api.github.com/users/malli02422/gists{/gist_id}","starred_url":"https://api.github.com/users/malli02422/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malli02422/subscriptions","organizations_url":"https://api.github.com/users/malli02422/orgs","repos_url":"https://api.github.com/users/malli02422/repos","events_url":"https://api.github.com/users/malli02422/events{/privacy}","received_events_url":"https://api.github.com/users/malli02422/received_events","type":"User","site_admin":false},"created_at":"2015-05-13T13:00:43Z","updated_at":"2015-05-13T13:00:43Z","body":"Hi ,\r\nI found that you are working on the windows environment .\r\nBut I am not able to work with it , It is causing a problem for me when I try to run very basic test also \r\nTraceback (most recent call last):\r\n  File \"C:/pyexample/test.py\", line 6, in <module>\r\n    print cap[0]\r\n  File \"C:\\Python27\\lib\\site-packages\\pyshark\\capture\\file_capture.py\", line 63, in __getitem__\r\n    self.next()\r\n  File \"C:\\Python27\\lib\\site-packages\\pyshark\\capture\\file_capture.py\", line 53, in next\r\n    packet = self._packet_generator.send(None)\r\n  File \"C:\\Python27\\lib\\site-packages\\pyshark\\capture\\capture.py\", line 162, in _packets_from_tshark_sync\r\n    tshark_process = existing_process or self.eventloop.run_until_complete(self._get_tshark_process())\r\n  File \"C:\\Python27\\lib\\site-packages\\trollius\\base_events.py\", line 300, in run_until_complete\r\n    return future.result()\r\n  File \"C:\\Python27\\lib\\site-packages\\trollius\\futures.py\", line 287, in result\r\n    raise self._exception\r\nWindowsError: [Error 123] The filename, directory name, or volume label syntax is incorrect\r\n\r\n\r\nPlease give me some tips to work with this library on the window envronment"}}