Komodo / KomodoEdit

Komodo Edit is a fast and free multi-language code editor. Written in JS, Python, C++ and based on the Mozilla platform.
http://www.komodoide.com/komodo-edit
Other
2.14k stars 299 forks source link

komodo ide 11.1 crashes on debugger start after a few runs of the debugger, using perl on windows #3634

Open wchristian opened 5 years ago

wchristian commented 5 years ago

Short Summary

See below:

Steps to Reproduce

  1. Load Komodo with a perl file. (Might need a sizable one, not sure, i tend to debug bigger projects.)
  2. Start the debugger by way of the Go button.
  3. Let it run to the end, or stop it, doesn't seem to matter.
  4. go to 2.

Expected results

Eventually (sometimes a handful, sometimes ok for hours) upon hitting the "go" button Komodo will shut down quietly.

Actual results

Instead of shutting down it should debug as per usual.

Platform Information

Komodo Edit or IDE? IDE Komodo Version? 11.1 Operating System (and version)? Windows 10, latest as of 2018-12-01

Additional Information

not sure if the log is useful, as it's from after restarting after a crash, but here you go:

[2018-12-01 00:44:13,611] [INFO] Startup: Welcome to Komodo IDE 11.1.0 build 91033 (platform win32-x86, running on Windows post2012Server version 6.3.9600)
[2018-12-01 00:44:13,611] [INFO] Startup: C:\Program Files (x86)\ActiveState Komodo IDE 11\lib\mozilla\komodo.exe built on Wed May 30 10:04:55 2018
[2018-12-01 00:44:15,448] [WARNING] console-logger: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create (1) in resource://gre/modules/Preferences.jsm:381
[2018-12-01 00:44:15,509] [WARNING] root: [object Object].logging has been converted to a CommonJS module; use require("ko/logging") instead (since Komodo 9.0.0a1).
    @chrome://komodo/content/komodo.js:15:1

[2018-12-01 00:44:16,358] [ERROR] console-logger: bad script XDR magic number (0) in :0
Traceback (most recent call last):
  File "", line 0, in 

[2018-12-01 00:44:17,739] [WARNING] keybindings: [Ctrl+0] was used for 'cmd_goToQuickBookmark_0', overriding to use 'cmd_fontZoomReset'
[2018-12-01 00:44:18,674] [WARNING] console-logger: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create (1) in file:///C:/Program%20Files%20(x86)/ActiveState%20Komodo%20IDE%2011/lib/mozilla/components/koamAddonManager.js:138
[2018-12-01 00:44:27,026] [WARNING] koLanguage: unknown emacs mode: 'cperl'
[2018-12-01 00:44:27,845] [WARNING] ko.widgets: Pref path doesn't exist: windowWorkspace, 1
[2018-12-01 00:44:27,845] [WARNING] ko.widgets: Can't load 'ui.tabs.sidepanes.state' from 'prefpath': windowWorkspace,1
[2018-12-01 00:44:27,887] [WARNING] ko.widgets: Could not restore widget unittest-widget
[2018-12-01 00:44:27,903] [WARNING] ko.widgets: Could not restore widget symbolbrowser-widget
[2018-12-01 00:44:28,032] [DEBUG] ko.launch: versioncheck on http://docs.komodoide.com/changelog/11
[2018-12-01 00:44:29,463] [INFO] koInitService: Adding pre startup service for 'koFileStatusService': '@activestate.com/koFileStatusService;1'
[2018-12-01 00:44:30,164] [INFO] codeintel/process: Starting CodeIntel
[2018-12-01 00:44:30,167] [DEBUG] codeintel/process: PYTHONPATH: C:\Program Files (x86)\ActiveState Komodo IDE 11\lib\python\..\lib\python2.7;C:\Program Files (x86)\ActiveState Komodo IDE 11\lib\support\dbgp\pythonlib;C:\Program Files (x86)\ActiveState Komodo IDE 11\lib\mozilla\extensions\codeintel@activestate.com\content\..\pylib\codeintel\lib;C:\Program Files (x86)\ActiveState Komodo IDE 11\lib\mozilla\extensions\codeintel@activestate.com\content\..\pylib\codeintel\env\Lib\site-packages
[2018-12-01 00:44:30,236] [INFO] elastic_tabstops: Elastic tabstops loaded.
[2018-12-01 00:44:30,282] [INFO] komodospellchecker: Spell checker loaded.
[2018-12-01 00:44:30,285] [INFO] komodospellchecker: Using dictionary en-US
[2018-12-01 00:44:33,875] [WARNING] console-logger: XUL box for tab element contained an inline #text child, forcing all its children to be wrapped in a block. (1) in file:///C:/Program%20Files%20(x86)/ActiveState%20Komodo%20IDE%2011/lib/mozilla/components/koLessProtocolHandler.js:154
[2018-12-01 00:44:33,875] [WARNING] console-logger: XUL box for tab element contained an inline #text child, forcing all its children to be wrapped in a block. (1) in file:///C:/Program%20Files%20(x86)/ActiveState%20Komodo%20IDE%2011/lib/mozilla/components/koLessProtocolHandler.js:154
[2018-12-01 00:44:33,875] [WARNING] console-logger: XUL box for tab element contained an inline #text child, forcing all its children to be wrapped in a block. (1) in file:///C:/Program%20Files%20(x86)/ActiveState%20Komodo%20IDE%2011/lib/mozilla/components/koLessProtocolHandler.js:154
[2018-12-01 00:44:33,997] [INFO] koInitService: Adding pre startup service for 'KoMemoryReporter': '@activestate.com/koMemoryReporter;1'
[2018-12-01 00:44:34,010] [INFO] koInitService: Adding pre startup service for 'koCommandmentService': '@activestate.com/koCommandmentService;1'
[2018-12-01 00:44:34,035] [INFO] koInitService: Adding pre startup service for 'koDBGPManager': '@activestate.com/koDBGPManager;1'
[2018-12-01 00:44:34,454] [WARNING] console-logger: XUL box for tab element contained an inline #text child, forcing all its children to be wrapped in a block. (1) in chrome://unittest/content/views/panel.xul:0
[2018-12-01 00:44:34,454] [WARNING] console-logger: XUL box for tab element contained an inline #text child, forcing all its children to be wrapped in a block. (1) in chrome://unittest/content/views/panel.xul:0
[2018-12-01 00:44:34,456] [WARNING] console-logger: XUL box for tab element contained an inline #text child, forcing all its children to be wrapped in a block. (1) in chrome://unittest/content/views/panel.xul:0
[2018-12-01 00:44:37,801] [DEBUG] codeintel/process: stdout: 
port:57818

pid:14636

[2018-12-01 00:44:37,802] [INFO] codeintel/process: CodeIntel started on port 57818
[2018-12-01 00:44:37,802] [DEBUG] codeintel/process: Calling callbacks for: started, number: 1
[2018-12-01 00:44:38,999] [DEBUG] ko.launch: Response: http://docs.komodoide.com/__omnigollum__/auth/github?origin=%2Fcreate%2Fchangelog%2F11 (404)
[2018-12-01 00:44:39,000] [DEBUG] ko.launch: versioncheck on http://docs.komodoide.com/changelog/111
[2018-12-01 00:44:39,729] [DEBUG] ko.launch: Response: http://docs.komodoide.com/__omnigollum__/auth/github?origin=%2Fcreate%2Fchangelog%2F111 (404)
[2018-12-01 00:44:46,855] [ERROR] console-logger: TypeError: n is undefined (2) in chrome://komodo/content/contrib/commonjs/underscore.js:5
Traceback (most recent call last):
  File "chrome://komodo/content/contrib/commonjs/underscore.js", line 5, in 

[2018-12-01 00:47:08,673] [WARNING] console-logger: Key event not available on GTK2: key="u" modifiers="control,shift" (1) in chrome://komodo/content/tail/tail.xul:0
Roeya commented 5 years ago

I have the same problem,

Komodo crashes every few runs during start of debug (several times a day), Komodo IDE, version 11.1.0, build 91033, platform win32-x86. Built on Wed May 30 10:04:55 2018. Windows 10 Pro 1803

wchristian commented 5 years ago

Would it helped if i posted everytime it crashed?

wchristian commented 5 years ago

k7ct41t57x7z 1

wchristian commented 5 years ago

image

wchristian commented 5 years ago

image

wchristian commented 5 years ago

image

wchristian commented 5 years ago

image

Naatan commented 5 years ago

Can you reproduce this with a very basic perl (Hello world) file? And what version of Perl?

Please I feel like this goes without saying but please refrain from spamming this ticket with anime pictures. I appreciate you must be frustrated but I assure you it does not expedite the process ;)

wchristian commented 5 years ago

It wasn't about spamming but to provide a reference as to how often it actually happens. :) (Altho given that Komodo IDE 7 did not do this, i am also somewhat regretting the kind of costly upgrade.)

I reproduced it with a minimal perl script

use strictures 2;
print 1;
exit;

However by looping i was only able to reproduce it in an instance of the editor that had been running a while. When i tried it with a fresh instance it didn't happen after 50 runs of it. However, this number isn't authoritative. In previous crashes it crashed within as little as 5 runs on a newly started instance with other scripts.

Maybe you can repro it with automation?

As for the Perl version, i use Strawberry Perl 32bit v5.28.0, but it happened with other versions as well, and i seem to recall it also happened with a python script.

Is there any way i can extract more useful error logs from the program, or get it to not overwrite the logs of previous runs?

wchristian commented 5 years ago

Since a crash just now happened again i went looking for Komodo-related files on my own. Here's what i found:

Naatan commented 5 years ago

Thanks for the logs @wchristian. Unfortunately there's not much else to go on there. You say the issue only happens when you've been running Komodo for a while, or sometimes it even happened after as little as 5 runs. Perhaps this is related to a previous action you took in Komodo. See if you can figure out any recurring themes in what you were doing before the crash happened.

wchristian commented 5 years ago

There is no recurring theme other than that i switched from 7 to 11 and that i usually hit F5 after changing the code a little. This has been occurring for months under a variety of conditions.

Wouldn't it make sense to look closer into why codeintel might be crashing out? The last log entries were exactly at the time the IDE crashed.

Naatan commented 5 years ago

Not really, codeintel runs in a separate process. It's certainly possible for there to be a connection but it seems unlikely. Is that a correlation that you always see when there's a crash? ie. codeintel shows those log entries for the exact timestamp of the crash?

wchristian commented 5 years ago

I haven't inspected that before, so i can't tell, but if you like i can check again on the next crash and let you know.

wchristian commented 5 years ago

Crash happened 20:35, which is what the minidump metadata is timestamped as, and the code intel log also shows error at 20:35.

codeintel3.log minidump.zip

I also just realized that normally a crash reporter dialogue should pop up? Doesn't seem to in my case.

wchristian commented 5 years ago

I disabled codeintelligence and that seems to have stopped the crashes from occurring.

wchristian commented 5 years ago

Fwiw, the crashes are less, but i still need to periodically restart the thing as it gets really sluggish.

Naatan commented 5 years ago

When you say a crash occurs do you mean Komodo itself literally shuts down or do you mean something else?

wchristian commented 5 years ago

As i said above:

upon hitting the "go" button Komodo will shut down quietly.

I don't get the crash reporter or anything else.

Naatan commented 5 years ago

And after disabling CodeIntel hitting Go does not crash anymore?

Very strange. CodeIntel has zero interaction with debugging as far as I'm aware.

wchristian commented 5 years ago

And after disabling CodeIntel hitting Go does not crash anymore?

That is accurate.

Very strange. CodeIntel has zero interaction with debugging as far as I'm aware.

Possibly it is related to pre-debug activities? E.g. stuff that happens during the "save files before debug" phase?

Naatan commented 5 years ago

Could be. But you said the crash happens when you hit the debugging button, not when you save. Right?

wchristian commented 5 years ago

I have not experienced it yet when i save, no. My current guess is that it might be some kind of error only occurring when features correlate in execution, like a race condition.

I also wonder if the fact that Komodo gets progressively slower over time might be related as well.

wchristian commented 5 years ago

I'm also seeing some very persistent errors being dumped into the log:

https://gist.github.com/wchristian/409f5924b7ce93b4f81f523acead2bba

wchristian commented 5 years ago

It just crashed again, with the codeintel3.log file again indicating the server just quit. My CodeIntel settings look like this:

image

Naatan commented 5 years ago

You could try disabling the codeintel addon altogether to see if that makes a difference. Disable it via Tools > Addons (Legacy).

That way we can either eliminate or confirm it as a suspect.

wchristian commented 5 years ago

Sorry for not getting back to this earlier. I have disabled the codeintel addon completely, and while the occurrence of these crashes has dropped drastically, i had still gotten one crash upon starting a debug session.

It did not occur at an opportune time to gather metadata, but i will update the next time it does.

wchristian commented 5 years ago

And an additional note: #2583 might be related.

wchristian commented 5 years ago

Just had a crash happen again. The codeintel plugin is disabled via Tools > Addons (Legacy).

The crash happened at 14:09. No codeintel log file exists, but pystderr.log contained this from 7 minutes earlier. Possibly the aftermath of another debug session i ran then (and which worked):

[2019-02-09 14:02:10,305] [ERROR] debugSessionTab: 
-- EXCEPTION START --
TypeError: invocation is null
+ stack
    ko_dbg_invocation_doStart/onInvocationReady@chrome://komodo/content/debugger/debugger.js:2456:17
    ko_dbg_invocation_getInvocation/onSessionReady@chrome://komodo/content/debugger/debugger.js:2227:13
    ko_dbg_invocation_getInvocation@chrome://komodo/content/debugger/debugger.js:2231:13
    ko_dbg_invocation_doStart/onSessionReady@chrome://komodo/content/debugger/debugger.js:2443:1
    DBG_Manager_newSession/onTabMgrReady@chrome://komodo/content/debugger/debugger.js:382:13
    outputTabManager_getTabMgr@chrome://komodo/content/debugger/debugSessionTab.js:1082:21
    DBG_Manager_newSession@chrome://komodo/content/debugger/debugger.js:388:13
    ko_dbg_invocation_doStart@chrome://komodo/content/debugger/debugger.js:2549:17
    DBG_Manager.prototype.doStep@chrome://komodo/content/debugger/debugger.js:646:13
    doGo@chrome://komodo/content/debugger/debuggerController.js:195:9
    DebuggerItemsController.prototype.do_cmd_dbgGo@chrome://komodo/content/debugger/debuggerController.js:201:9
    xtk.Controller.prototype.doCommand@chrome://xtk/content/controller.js:61:9
    command_doCommand@chrome://komodo/content/library/commands.js:239:1
    debugger_doCommand@chrome://komodo/content/debugger/debuggerController.js:31:16
    oncommand@chrome://komodo/content/komodo.xul:1:1
-- EXCEPTION END --
th3coop commented 5 years ago

@wchristian do you recall if you installed padwalker for Perl debugging? Komodo recommends it. Could you confirm you have that module installed?

wchristian commented 5 years ago

It's an additional dependency and i have it installed, yeah:

C:\Users\Mithaldu>perl -MV=PadWalker
PadWalker
        C:\Strawberry\perl\site\lib\PadWalker.pm: 2.3

I believe its primary purpose is to provide a mechanism for the debugger in perl with which komodo interfaces to load a more complete list of "local" variables for the variable tracking tab.

https://metacpan.org/pod/PadWalker - "PadWalker is a module which allows you to inspect (and even change!) lexical variables in any subroutine which called you. It will only show those variables which are in scope at the point of the call."

th3coop commented 5 years ago

I believe its primary purpose is to provide a mechanism for the debugger in perl with which komodo interfaces to load a more complete list of "local" variables

Yep, that's what it's for. I'd say that's more related to the issue than code intel though ;). Btw, I think you can enable it again. Seems not to have helped to disable it.

I don't see anyone asking you to try Safe Mode yet (Help > Troubleshooting > Restart in Safe Mode) . Have you tried that? I'm been hitting F5 in a Perl file for most of the day without any crashes so there must be something specific to your configuration causing this.