New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display Warning When Trying to Locally Debug Remote Files (It Tries to Open Them Instead and Errors) #738

Closed
rdeast opened this Issue Oct 17, 2015 · 13 comments

Comments

Projects
None yet
6 participants
@rdeast

rdeast commented Oct 17, 2015

When I debug Perl remotely using sftp, the base Perl file opens but when stepping or setting breakpoints that require opening another file, I get the error. I can browse to the file to set a breakpoint but when the breakpoint is triggered, I get the error.

Log from step into another file :

ERROR:xpcom:Unhandled exception calling 'int8 * read(in int32, optional out uint32, out retval Array[]);'
Traceback (most recent call last):
File "C:\Program Files (x86)\ActiveState Komodo IDE 9\lib\mozilla\python\xpcom\server\policy.py", line 300, in CallMethod
return 0, func(*params)
File "C:\Program Files (x86)\ActiveState Komodo IDE 9\lib\mozilla\python\komodo\URIlib.py", line 913, in read
return conn.readFile(self._uri.path)
File "<XPCOMObject method 'readFile'>", line 3, in readFile
Exception: 2147500037 (NS_ERROR_FAILURE)
[2015-10-17 10:13:32,721] [ERROR] views:
-- EXCEPTION START --
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [koIDocument.load]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://komodo/content/views.js :: viewManager.prototype._newViewFromURI :: line 569" data: no]

  • toString (function) 3 lines
  • message (string) 'Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [koIDocument.load]'
  • result (number) 2147500037
  • name (string) 'NS_ERROR_FAILURE'
  • filename (string) 'chrome://komodo/content/views.js'
  • lineNumber (number) 569
  • columnNumber (number) 0
  • inner (object) null
    | + data (object) null
    | + stack (string) 'viewManager.prototype._newViewFromURI@chrome://komodo/content/views.js:569:12
    viewManager.prototype.'...318 chars
  • location (object) JS frame :: chrome://komodo/content/views.js :: viewManager.prototype._newViewFromURI :: line 569
    | + QueryInterface (function) 3 lines
    | + language (number) 2
    | + languageName (string) 'JavaScript'
    | + filename (string) 'chrome://komodo/content/views.js'
    | + name (string) 'viewManager.prototype._newViewFromURI'
    | + lineNumber (number) 569
    | + columnNumber (number) 12
    | + sourceLine (string) ''
    | + caller (object) JS frame :: chrome://komodo/content/views.js :: viewManager.prototype._doFileOpen :: line 702
    | + formattedStack (string) 'viewManager.prototype._newViewFromURI@chrome://komodo/content/views.js:569:12
    viewManager.prototype.'...318 chars
    | + stack
    viewManager.prototype._newViewFromURI@chrome://komodo/content/views.js:569:12
    viewManager.prototype._doFileOpen@chrome://komodo/content/views.js:702:11
    viewManager.prototype._doFileOpenAtLine@chrome://komodo/content/views.js:762:12
    viewManager.prototype.doFileOpenAtLineAsync/<@chrome://komodo/content/views.js:831:19
    -- EXCEPTION END --
    [2015-10-17 10:13:32,782] [ERROR] koSFTPConnection: SFTP do_readFile ERROR: No such file
    ERROR:xpcom:Unhandled exception calling 'int8 * read(in int32, optional out uint32, out retval Array[]);'
    Traceback (most recent call last):
    File "C:\Program Files (x86)\ActiveState Komodo IDE 9\lib\mozilla\python\xpcom\server\policy.py", line 300, in CallMethod
    return 0, func(*params)
    File "C:\Program Files (x86)\ActiveState Komodo IDE 9\lib\mozilla\python\komodo\URIlib.py", line 913, in read
    return conn.readFile(self._uri.path)
    File "<XPCOMObject method 'readFile'>", line 3, in readFile
    Exception: 2147500037 (NS_ERROR_FAILURE)
    [2015-10-17 10:13:33,428] [ERROR] views:
    -- EXCEPTION START --
    [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [koIDocument.load]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://komodo/content/views.js :: viewManager.prototype._newViewFromURI :: line 569" data: no]
  • toString (function) 3 lines
  • message (string) 'Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [koIDocument.load]'
  • result (number) 2147500037
  • name (string) 'NS_ERROR_FAILURE'
  • filename (string) 'chrome://komodo/content/views.js'
  • lineNumber (number) 569
  • columnNumber (number) 0
  • inner (object) null
    | + data (object) null
    | + stack (string) 'viewManager.prototype._newViewFromURI@chrome://komodo/content/views.js:569:12
    viewManager.prototype.'...318 chars
  • location (object) JS frame :: chrome://komodo/content/views.js :: viewManager.prototype._newViewFromURI :: line 569
    | + QueryInterface (function) 3 lines
    | + language (number) 2
    | + languageName (string) 'JavaScript'
    | + filename (string) 'chrome://komodo/content/views.js'
    | + name (string) 'viewManager.prototype._newViewFromURI'
    | + lineNumber (number) 569
    | + columnNumber (number) 12
    | + sourceLine (string) ''
    | + caller (object) JS frame :: chrome://komodo/content/views.js :: viewManager.prototype._doFileOpen :: line 702
    | + formattedStack (string) 'viewManager.prototype._newViewFromURI@chrome://komodo/content/views.js:569:12
    viewManager.prototype.'...318 chars
    | + stack
    viewManager.prototype._newViewFromURI@chrome://komodo/content/views.js:569:12
    viewManager.prototype._doFileOpen@chrome://komodo/content/views.js:702:11
    viewManager.prototype._doFileOpenAtLine@chrome://komodo/content/views.js:762:12
    viewManager.prototype.doFileOpenAtLineAsync/<@chrome://komodo/content/views.js:831:19
    -- EXCEPTION END --
@rdeast

This comment has been minimized.

rdeast commented Oct 17, 2015

Update: this appears to be associated with using chdir in the Perl script

@rdeast rdeast closed this Oct 17, 2015

@Naatan Naatan added the Type: Bug label Oct 19, 2015

@Naatan Naatan added this to the Backlog milestone Oct 19, 2015

@Naatan Naatan reopened this Oct 19, 2015

@Naatan

This comment has been minimized.

Member

Naatan commented Oct 19, 2015

That would still be a bug :) Thanks

@pobicus

This comment has been minimized.

pobicus commented Jan 22, 2016

Seeing similar when just opening a remote file on OS X 10.10.5 (14F1509). Can browse remote files but not open them.

[2016-01-22 14:24:41,367] [DEBUG] console: log: prefs#preferences_server_configuration
[2016-01-22 14:30:51,748] [ERROR] koSFTPConnection: SFTP do_readFile ERROR: No such file
ERROR:xpcom:Unhandled exception calling 'int8 * read(in int32, optional out uint32, out retval Array[]);'
Traceback (most recent call last):
File "/Applications/Komodo Edit 10.app/Contents/Resources/python/xpcom/server/policy.py", line 300, in CallMethod
return 0, func(*params)
File "/Applications/Komodo Edit 10.app/Contents/Resources/python/komodo/URIlib.py", line 942, in read
return conn.readFile(self._uri.path)
File "<XPCOMObject method 'readFile'>", line 3, in readFile
Exception: 2147500037 (NS_ERROR_FAILURE)
[2016-01-22 14:31:15,785] [ERROR] views:
-- EXCEPTION START --
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [koIDocument.load]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://komodo/content/views.js :: viewManager.prototype._newViewFromURI :: line 602" data: no]

  • toString (function) 3 lines
  • message (string) 'Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [koIDocument.load]'
  • result (number) 2147500037
  • name (string) 'NS_ERROR_FAILURE'
  • filename (string) 'chrome://komodo/content/views.js'
  • lineNumber (number) 602
  • columnNumber (number) 0
  • inner (object) null
    | + data (object) null
    | + stack (string) 'viewManager.prototype._newViewFromURI@chrome://komodo/content/views.js:602:12
    viewManager.prototype.'...232 chars
  • location (object) JS frame :: chrome://komodo/content/views.js :: viewManager.prototype._newViewFromURI :: line 602
    | + QueryInterface (function) 3 lines
    | + language (number) 2
    | + languageName (string) 'JavaScript'
    | + filename (string) 'chrome://komodo/content/views.js'
    | + name (string) 'viewManager.prototype._newViewFromURI'
    | + lineNumber (number) 602
    | + columnNumber (number) 12
    | + sourceLine (string) ''
    | + caller (object) JS frame :: chrome://komodo/content/views.js :: viewManager.prototype._doFileOpen :: line 732
    | + formattedStack (string) 'viewManager.prototype._newViewFromURI@chrome://komodo/content/views.js:602:12
    viewManager.prototype.'...232 chars
    | + stack
    viewManager.prototype._newViewFromURI@chrome://komodo/content/views.js:602:12
    viewManager.prototype._doFileOpen@chrome://komodo/content/views.js:732:11
    viewManager.prototype.doFileOpenAsync/<@chrome://komodo/content/views.js:757:19
@flatvurm

This comment has been minimized.

flatvurm commented Apr 13, 2016

I experienced the same error of being able to browse remotely via SFTP but being unable to open files. (A "no such file" dialog would pop up on file open attempt.) The resulting error in my log file was also very similar -- NS_ERROR_FAILURE error.

I was able to prevent the error and successfully open a file once I changed the "Default path" in the server settings to an absolute (vs. relative) path. Hope that helps diagnose!

@mitchell-as

This comment has been minimized.

Member

mitchell-as commented Apr 14, 2016

Okay, thanks for the info :)

@mitchell-as

This comment has been minimized.

Member

mitchell-as commented Sep 21, 2016

I've spent some time on this and here are my findings. First off, when it comes to remote files, our code tends to throw NS_ERROR_FAILURE for lots of little things -- I don't think @flatvurm's error is the same as @rdeast's.

That being said, the inability to do two things at once on an SFTP connection points to locking issues. While it's not explicit in the original poster's error message, this line in the readFile() method is the source of NS_ERROR_FAILURE:

        self._raiseServerException("Could not acquire remote connection lock. Multi-threaded access detected!")

Why that message is not present is anyone's guess. However, that is where the call stack ultimately points to.

@Naatan I'd venture a guess that the Places pane has the lock on the remote SFTP filesystem in another thread, and the debugger is trying to also get access in the main thread. Do you have any ideas how we can proceed?

@Naatan

This comment has been minimized.

Member

Naatan commented Sep 21, 2016

Not sure I follow, what does the debugger have to do with SFTP?

@mitchell-as

This comment has been minimized.

Member

mitchell-as commented Sep 21, 2016

When the debugger hits a breakpoint, it sends the URI and line number of that location hit. Komodo is supposed to open that file and jump to that line number. In this case, Komodo uses the SFTP adapter to open the remote file, but another thread (presumably the Places pane) has locked the SFTP adapter.

@Naatan

This comment has been minimized.

Member

Naatan commented Sep 21, 2016

I don't see a valid use-case for that though, since we don't support debugging on remote files? Did someone set up a mapping to an ftp address?

@mitchell-as

This comment has been minimized.

Member

mitchell-as commented Sep 21, 2016

After some internal discussion, we do not support debugging remote files with the local Perl debugger. We recommend you try remote debugging instead @rdeast.

What should be done about this ticket is displaying a warning dialog that debugging remote files locally is not supported and that the user should try to perform remote debugging. Include a link to the documentation.

@mitchell-as mitchell-as modified the milestones: 11, Backlog Sep 21, 2016

@cgchoffman

This comment has been minimized.

Member

cgchoffman commented Sep 21, 2016

We recommend you try remote debugging instead @rdeast.

Also @pobicus and @flatvurm

@pobicus

This comment has been minimized.

pobicus commented Sep 22, 2016

I had guessed😀

On Wed, 21 Sep 2016, 22:43 Carey Hoffman, notifications@github.com wrote:

We recommend you try remote debugging instead @rdeast
https://github.com/rdeast.

Also @pobicus https://github.com/pobicus and @flatvurm
https://github.com/flatvurm


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
#738 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ANglMTt17YqmDlXetsgWISZjPDkQHSRgks5qsaT4gaJpZM4GQvGl
.

@mitchell-as mitchell-as changed the title from Komodo was unable to open the file, browse works but not step or breakpoint to Display Warning When Trying to Locally Debug Remote Files (It Tries to Open Them Instead and Errors) Sep 23, 2016

@mitchell-as

This comment has been minimized.

Member

mitchell-as commented Oct 3, 2016

@mitchell-as mitchell-as closed this Oct 3, 2016

@Naatan Naatan modified the milestones: 11.x.x, 11 Apr 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment