Giter Site home page Giter Site logo

leak-finder-for-javascript's People

Contributors

marjaholtta avatar marjakh avatar

Watchers

 avatar

leak-finder-for-javascript's Issues

"uncaptured python exception" when test-page is hosted in an iframe

What steps will reproduce the problem?
1.Create an html page that hosts the test-page provided in the docs in an 
iframe:
<!DOCTYPE html>
<html>
<head>
    <title>Host the page with the memory leak</title>
</head>
<body>
<h1>Host the page with the memory leak</h1>
<iframe src="test-page.html" width="400" height="400"/>
</body>
</html>
2. Run the memory leak finder with the given instructions 


Expect:
To see a leak detected report.

Actual:
$ python jsleakcheck.py -d closure-disposable -v
INFO:root:Using leak definition closure-disposable
DEBUG:root:[ {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/devtools.html?ws=localhost:9222/devtools/pa
ge/C5762B8C-5279-4604-9821-DE5DCF4DFAAB",
   "id": "C5762B8C-5279-4604-9821-DE5DCF4DFAAB",
   "title": "Host the page with the memory leak",
   "type": "page",
   "url": "file:///C:/.../depot_tools/leak-finder/doc/host-page.htm
l",
   "webSocketDebuggerUrl": "ws://localhost:9222/devtools/page/C5762B8C-5279-4604
-9821-DE5DCF4DFAAB"
} ]

DEBUG:root:{"description": "", "title": "Host the page with the memory leak", "u
rl": "file:///.../depot_tools/leak-finder/doc/host-page.html", "
webSocketDebuggerUrl": "ws://localhost:9222/devtools/page/C5762B8C-5279-4604-982
1-DE5DCF4DFAAB", "type": "page", "id": "C5762B8C-5279-4604-9821-DE5DCF4DFAAB", "
devtoolsFrontendUrl": "/devtools/devtools.html?ws=localhost:9222/devtools/page/C
5762B8C-5279-4604-9821-DE5DCF4DFAAB"}
INFO:root:Reading suppressions from "closure-disposable-suppressions.txt"
INFO:root:Taking heap snapshot
INFO:root:Analyzing heap snapshot
INFO:root:Retrieving creating stack traces for leaking objects
error: uncaptured python exception, closing channel <remote_inspector_client._De
vToolsSocketClient at 0x30237c8> (<type 'exceptions.KeyError'>:'value' [C:\Pytho
n27\Lib\asyncore.py|read|83] [C:\Python27\Lib\asyncore.py|handle_read_event|442]
 [../../pyautolib/remote_inspector_client.py|handle_read|220] [../../pyautolib/r
emote_inspector_client.py|NotifyReply|344] [../../pyautolib/remote_inspector_cli
ent.py|HandleReply|931])


OS: Windows
SHA:3a6c8723



Original issue reported on code.google.com by [email protected] on 7 Feb 2014 at 5:59

No module named remote_inspector_client

What steps will reproduce the problem?
1. follow instructions at https://code.google.com/p/leak-finder-for-javascript/
2. run jsleakcheck.py -h

What is the expected output? What do you see instead?
  jsleakcheck should display configuration options

  but

  ImportError: No module named remote_inspector_client

What version of the product are you using? On what operating system?
  Chrome Canary 33
  Windows 7 64Bit


Please provide any additional information below.

Please provide some instructions on how to install pyauto - this seems to be an 
undocumented prerequisite.
...Actually, it seems that pyauto has been deprecated - does jscheckleak need 
updating?

Original issue reported on code.google.com by [email protected] on 17 Nov 2013 at 12:07

Implement way to save/load heap snapshots to/from disk

Currently, it is quite time consuming to capture the heap, and sometimes 
several different analyses are desired that could each be run on the same heap 
capture.

It'd be great to have the option to save heap capture to disk and load from 
disk instead of hitting the chrome tab/process again and again.

Original issue reported on code.google.com by [email protected] on 9 Jan 2013 at 8:36

Container not found: goog.Disposable.instances_

What steps will reproduce the problem?
C:\Projects\retail\depot_tools\file\leak-finder\src>python jsleakcheck.py -d 
closure-disposable -v

Output:

INFO:root:Using leak definition closure-disposable
INFO:root:Reading suppressions from "closure-disposable-suppressions.txt"
INFO:root:Taking heap snapshot
INFO:root:Analyzing heap snapshot
ERROR:root:Error analyzing snapshot: <class 'leak_finder.Error'>
Traceback (most recent call last):
  File "jsleakcheck.py", line 345, in <module>
    sys.exit(main())
  File "jsleakcheck.py", line 340, in main
    result = leak_checker.Run(inspector_client)
  File "jsleakcheck.py", line 151, in Run
    leaks = self._FindLeaks(client)
  File "jsleakcheck.py", line 189, in _FindLeaks
    self.leak_definition.stacktrace_suffix).FindLeaks(nodes))
  File "C:\Projects\retail\depot_tools\file\leak-finder\src\leak_finder.py", lin
e 571, in FindLeaks
    raise Error('Container not found: %s' % edge_description)
leak_finder.Error: Container not found: goog.Disposable.instances_

What is the expected output? What do you see instead?
leak if any should be detected

What version of the product are you using? On what operating system?
I m using Python 25 on Windows 7

I m not getting how do i deal with this error.Tried out things but it dint work.
Please help  


Original issue reported on code.google.com by [email protected] on 1 Sep 2012 at 9:01

Provide way to specify combined LeakDefinition/Suppression in a single file

It would be handy for projects to maintain their own leak definitions and 
suppressions.

For instance, if using closure and compiling using pseudonames, things like 
goog.Disposable.instances_ become goog$Disposable$instances_ and should be 
altered in the definition and the suppression.

It would be handy to call via something like:

python .../leak-finder-for-javascript/jsleakcheck.py 
--definition-suppression-file=.../myprojects/disposable-leak-def.py

Original issue reported on code.google.com by [email protected] on 9 Jan 2013 at 8:43

failed to run jsleakcheck.py

What steps will reproduce the problem?
1. python jsleakcheck.py -h
2.
3.

What is the expected output? What do you see instead?
A successful run of jsleakcheck.py

What version of the product are you using? On what operating system?
A fresh version of closure (downloaded near the 2012/08/09)
Leak Finder downloaded near the 2012/08/09 too
Mac OSX Lion

Please provide any additional information below.
Traceback (most recent call last):
  File "jsleakcheck.py", line 30, in <module>
    import leak_finder
  File "/Users/maxime/chromium/local-repository/leak-finder/src/leak_finder.py", line 50, in <module>
    import simplejson
ImportError: No module named simplejson

Original issue reported on code.google.com by [email protected] on 14 Aug 2012 at 7:43

Container not found: goog.Disposable.instances_

What steps will reproduce the problem?
1. include the script in the index file like this :
<body>
                <script type="text/javascript">
            goog.Disposable.prototype.dispose = function() {
                if (!this.disposed_) {
                    this.disposed_ = true;
                    this.disposeInternal();
                    if (goog.Disposable.ENABLE_MONITORING) {
                        var uid = goog.getUid(this);
                        delete goog.Disposable.instances_[uid];
                    }
                }
            };
            goog.Disposable.ENABLE_MONITORING=true;
        </script>
...
2. Launch Chrome in remote debug mode
/Applications/Google\ rome.app/Contents/MacOS/Google\ Chrome 
--remote-debugging-port=9222 --js-flags=--stack_trace_limit=-1 
--user-data-dir=/tmp/jsleakcheck
3. goTo the webApp URL in the first tab of Chrome
4. python jsleakcheck.py -d closure-disposable -v

What is the expected output? What do you see instead?
leak finder may runs

What version of the product are you using? On what operating system?
A fresh version of closure (downloaded near the 2012/08/09)
Leak Finder downloaded near the 2012/08/09 too
Mac OSX Lion

Please provide any additional information below.
python jsleakcheck.py -d closure-disposable -v
INFO:root:Using leak definition closure-disposable
INFO:root:Reading suppressions from "closure-disposable-suppressions.txt"
INFO:root:Taking heap snapshot
INFO:root:Analyzing heap snapshot
ERROR:root:Error analyzing snapshot: Container not found: 
goog.Disposable.instances_
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 530, in __bootstrap_inner
    self.run()
  File "../../pyautolib/remote_inspector_client.py", line 571, in run
    asyncore.loop(timeout=1, count=1, use_poll=True)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/asyncore.py", line 214, in loop
    poll_fun(timeout, map)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/asyncore.py", line 140, in poll
    r, w, e = select.select(r, w, e, timeout)
error: (9, 'Bad file descriptor')

Traceback (most recent call last):
  File "jsleakcheck.py", line 336, in <module>
    sys.exit(main())
  File "jsleakcheck.py", line 332, in main
    return leak_checker.Run()
  File "jsleakcheck.py", line 151, in Run
    leaks = self._FindLeaks(client)
  File "jsleakcheck.py", line 189, in _FindLeaks
    self.leak_definition.stacktrace_suffix).FindLeaks(nodes))
  File "/Users/maxime/chromium/local-repository/leak-finder/src/leak_finder.py", line 571, in FindLeaks
    raise Error('Container not found: %s' % edge_description)
leak_finder.Error: Container not found: goog.Disposable.instances_

Thanks

Original issue reported on code.google.com by [email protected] on 14 Aug 2012 at 8:04

socket.py Bad file descriptor


when run this:
python jsleakcheck.py -d closure-disposable -v

throw error :

File 
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threadin
g.py", line 522, in __bootstrap_inner
  File "../../pyautolib/remote_inspector_client.py", line 361, in run
    self._client.SendMessage(str(request))
  File "../../pyautolib/remote_inspector_client.py", line 166, in SendMessage
    self._Write('\x00' + msg.encode('utf-8') + '\xff')
  File "../../pyautolib/remote_inspector_client.py", line 175, in _Write
    self.handle_write()
  File "../../pyautolib/remote_inspector_client.py", line 181, in handle_write
    sent = self.send(self._write_buffer)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/asyncore.py", line 349, in send
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/socket.py", line 165, in _dummy
error: [Errno 9] Bad file descriptor


I want known where the problems are? thanks

Original issue reported on code.google.com by [email protected] on 23 Aug 2012 at 10:47

doc: command line under macosx

What steps will reproduce the problem?
1. start google chrome under macosx with following command line :
google-chrome --remote-debugging-port=9222 --js-flags=--stack_trace_limit=-1
2.
3.

What is the expected output? What do you see instead?
Chrome may runs but... "command not found"

What version of the product are you using? On what operating system?
the last one for macosx Lion

Please provide any additional information below.
the good command
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome

Original issue reported on code.google.com by [email protected] on 10 Aug 2012 at 1:36

Unable to gclient sync without developer chromium account

What steps will reproduce the problem?
1. Follow the the setup instructions
2. Run `gclient sync'

The pyautolib dependency is pointed to 
svn://svn.chromium.org/chrome/trunk/src/chrome/test/pyautolib, which requires 
committers access.

If you point this to 
http://src.chromium.org/chrome/trunk/src/chrome/test/pyautolib, all seems to 
download fine.

Original issue reported on code.google.com by [email protected] on 9 Aug 2012 at 6:05

How to install Leak-finder-for-javascript without GIT

I am trying to setup leak finder for javascript but when i try to get the code 
from git i am getting the following error.

fatal: unable to access 'https://code.google.com/p/closure-library/': Failed con
nect to code.google.com:443; No error

Is there any other way to get the code or to fix this error.

Thanks in advance.

Original issue reported on code.google.com by manee18284 on 1 Oct 2013 at 10:03

Heap Snapshots aren't deleted after capture

What steps will reproduce the problem?
1. Open the inspector profiles tab and see no heap snapshots
2. Close the inspector
2. Run the jsleakcheck
3. Open the inspector profiles tab and see heap snapshot taking up memory in 
the process.

What is the expected output? What do you see instead?
- Expected: same state as seen in #1 (no snapshots)
- See: new snapshot for each time the jsleakcheck is run

What version of the product are you using? On what operating system?
Linux Chrome M23

Original issue reported on code.google.com by [email protected] on 9 Jan 2013 at 8:32

Documentation should remind that git-svn should be installed

What steps will reproduce the problem?
1. follow instructions at https://code.google.com/p/leak-finder-for-javascript/
2. Run gclient sync
3. Receive error 'svn command not found pyautolib'
4. Run jsleakcheck -h
5. Receive error 'ImportError: No module named remote_inspector_client'

What is the expected output? What do you see instead?
- Didn't expect the two errors

What version of the product are you using? On what operating system?
Chromium 32, Lubuntu 13.10

Solution:
- apt-get install git-svn
- git config --global user.name "My Name"
- git config --global user.email "my@email"
- git config --global core.autocrlf false
- git config --global core.filemode false
- gclient sync 
(from: http://dev.chromium.org/developers/how-tos/get-the-code)



Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 26 Feb 2014 at 11:23

gclient.js

"2. Create a directory for your local repository, and put the following text in 
a file called .gclient"

Why? The content is plain JavaScript, why is this a secret .name file instead 
of just gclient.js?

Original issue reported on code.google.com by [email protected] on 10 Aug 2012 at 5:31

socket.py Bad file descriptor


when run this:
python jsleakcheck.py -d closure-disposable -v

throw error :

File 
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threadin
g.py", line 522, in __bootstrap_inner
  File "../../pyautolib/remote_inspector_client.py", line 361, in run
    self._client.SendMessage(str(request))
  File "../../pyautolib/remote_inspector_client.py", line 166, in SendMessage
    self._Write('\x00' + msg.encode('utf-8') + '\xff')
  File "../../pyautolib/remote_inspector_client.py", line 175, in _Write
    self.handle_write()
  File "../../pyautolib/remote_inspector_client.py", line 181, in handle_write
    sent = self.send(self._write_buffer)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/asyncore.py", line 349, in send
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/socket.py", line 165, in _dummy
error: [Errno 9] Bad file descriptor


I want known where the problems are? thanks

Original issue reported on code.google.com by [email protected] on 23 Aug 2012 at 10:47

  • Merged into: #6

Suppressions from LeakDefinition fail if running outside the script directory

What steps will reproduce the problem?
1. CD into your project directory
2. Run the tool specifying its path (like python 
../../leak-finder-for-javascript/jsleakcheck.py -d closure-disposable

What is the expected output? What do you see instead?
- Expect it to run with the closure-disposab definition provided
- Fails to find the suppressions file which is in the script's directory; not 
the current directory

Original issue reported on code.google.com by [email protected] on 9 Jan 2013 at 8:40

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.