Atom debugging?


#1

I’m experiencing a hang in Atom 0.62.0 - “Editor is not responding”.

I’ve been looking for any crash logs, debug info, etc - can’t find any topics here yet.

What/where would one look to provide the Atom developers the best information about the situation in which we see problems?


#2

Happened again today.

Trying to work on a package’s .cson file, and resizing the editor window by dragging the edge to be a larger window.

Immediately, Atom Helper process goes into 100% CPU utilization, and hangs. After a few seconds, a popup comes up asking me to kill or wait.

Sampling the running Atom Helper process produces these results?

Sampling process 22138 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling Atom Helper (pid 22138) every 1 millisecond
Process:         Atom Helper [22138]
Path:            /Applications/Atom.app/Contents/Frameworks/Atom Helper.app/Contents/MacOS/Atom Helper
Load Address:    0x1036ec000
Identifier:      com.github.atom.helper
Version:         0.62.0 (0.62.0)
Code Type:       X86-64 (Native)
Parent Process:  Atom [22122]

Date/Time:       2014-03-01 08:35:18.298 -0500
OS Version:      Mac OS X 10.8.5 (12F45)
Report Version:  7

Call graph:
    2167 Thread_218142   DispatchQueue_1: com.apple.main-thread  (serial)
    + 2167 start  (in libdyld.dylib) + 1  [0x7fff8406d7e1]
    +   2167 AtomMain  (in Atom Framework) + 43  [0x1036f371b]
    +     2167 content::ContentMain(int, char const**, content::ContentMainDelegate*)  (in libchromiumcontent.dylib) + 70  [0x103dafaa6]
    +       2167 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x13973  [0x103db0973]
    +         2167 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x12cd5  [0x103dafcd5]
    +           2167 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x26e86b5  [0x1064856b5]
    +             2167 base::MessageLoop::Run()  (in libchromiumcontent.dylib) + 29  [0x103e1193d]
    +               2167 base::RunLoop::Run()  (in libchromiumcontent.dylib) + 26  [0x103e2fe3a]
    +                 2167 base::MessageLoop::RunInternal()  (in libchromiumcontent.dylib) + 226  [0x103e12292]
    +                   2167 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x24fec  [0x103dc1fec]
    +                     2167 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x257da  [0x103dc27da]
    +                       2167 -[NSApplication run]  (in AppKit) + 517  [0x7fff8b06f1a3]
    +                         2167 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]  (in AppKit) + 128  [0x7fff8b077df2]
    +                           2167 _DPSNextEvent  (in AppKit) + 685  [0x7fff8b078533]
    +                             2167 BlockUntilNextEventMatchingListInMode  (in HIToolbox) + 62  [0x7fff87743ae3]
    +                               2167 ReceiveNextEventCommon  (in HIToolbox) + 356  [0x7fff87743c52]
    +                                 2167 RunCurrentEventLoopInMode  (in HIToolbox) + 209  [0x7fff87743eb4]
    +                                   2167 CFRunLoopRunSpecific  (in CoreFoundation) + 290  [0x7fff8f5320e2]
    +                                     2167 __CFRunLoopRun  (in CoreFoundation) + 789  [0x7fff8f5327f5]
    +                                       2167 __CFRunLoopDoSources0  (in CoreFoundation) + 245  [0x7fff8f50f455]
    +                                         2167 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__  (in CoreFoundation) + 17  [0x7fff8f50fb31]
    +                                           2167 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x251f1  [0x103dc21f1]
    +                                             2167 base::MessageLoop::DoWork()  (in libchromiumcontent.dylib) + 655  [0x103e12faf]
    +                                               2167 base::MessageLoop::RunTask(base::PendingTask const&)  (in libchromiumcontent.dylib) + 1121  [0x103e12991]
    +                                                 2167 base::Timer::RunScheduledTask()  (in libchromiumcontent.dylib) + 131  [0x103e563b3]
    +                                                   2167 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x18a8218  [0x105645218]
    +                                                     2167 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x18a837f  [0x10564537f]
    +                                                       2167 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x15df36e  [0x10537c36e]
    +                                                         2167 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x15df482  [0x10537c482]
    +                                                           2167 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x1c1e63b  [0x1059bb63b]
    +                                                             2167 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x160467e  [0x1053a167e]
    +                                                               2167 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x1604b15  [0x1053a1b15]
    +                                                                 2167 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x2235839  [0x105fd2839]
    +                                                                   2167 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x2235983  [0x105fd2983]
    +                                                                     2167 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x2239280  [0x105fd6280]
    +                                                                       2167 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x221dabb  [0x105fbaabb]
    +                                                                         2167 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x221dd81  [0x105fbad81]
    +                                                                           2167 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x224466c  [0x105fe166c]
    +                                                                             2167 v8::Function::Call(v8::Handle<v8::Object>, int, v8::Handle<v8::Value>*)  (in libchromiumcontent.dylib) + 327  [0x104ed17d7]
    +                                                                               2167 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x119e176  [0x104f3b176]
    +                                                                                 2167 ???  (in <unknown binary>)  [0x2a9dc641a457]
    +                                                                                   2167 ???  (in <unknown binary>)  [0x2a9dc6436a04]
    +                                                                                     2167 ???  (in <unknown binary>)  [0x2a9dc76abe49]
    +                                                                                       2167 ???  (in <unknown binary>)  [0x2a9dc643a7fb]
    +                                                                                         2167 ???  (in <unknown binary>)  [0x2a9dc76ac47a]
    +                                                                                           2167 ???  (in <unknown binary>)  [0x2a9dc643a7f5]
    +                                                                                             2167 ???  (in <unknown binary>)  [0x2a9dc6411374]
    +                                                                                               2167 ???  (in <unknown binary>)  [0x2a9dc762b41f]
    +                                                                                                 2167 ???  (in <unknown binary>)  [0x2a9dc6411374]
    +                                                                                                   2167 ???  (in <unknown binary>)  [0x2a9dc762f966]
    +                                                                                                     2167 ???  (in <unknown binary>)  [0x2a9dc762fbf7]
    +                                                                                                       2167 ???  (in <unknown binary>)  [0x2a9dc762fd5e]
    +                                                                                                         2167 ???  (in <unknown binary>)  [0x2a9dc76cc02b]
    +                                                                                                           2167 ???  (in <unknown binary>)  [0x2a9dc77110c9]
    +                                                                                                             2167 ???  (in <unknown binary>)  [0x2a9dc77112dd]
    +                                                                                                               1765 ???  (in <unknown binary>)  [0x2a9dc760f48a]
    +                                                                                                               ! 509 ???  (in <unknown binary>)  [0x2a9dc76f6135]
    +                                                                                                               ! : 282 ???  (in <unknown binary>)  [0x2a9dc774da15]
    +                                                                                                               ! : | 282 ???  (in <unknown binary>)  [0x2a9dc6411374]
    +                                                                                                               ! : |   147 ???  (in <unknown binary>)  [0x2a9dc77aecb9]
    +                                                                                                               ! : |   + 100 ???  (in <unknown binary>)  [0x2a9dc7625f3e]
    +                                                                                                               ! : |   + ! 100 ???  (in <unknown binary>)  [0x2a9dc640c5e9]
    +                                                                                                               ! : |   + !   100 ???  (in <unknown binary>)  [0x2a9dc6406feb]
    +                                                                                                               ! : |   + !     100 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x13413b8  [0x1050de3b8]
    +                                                                                                               ! : |   + !       100 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x1364244  [0x105101244]
    +                                                                                                               ! : |   + !         57 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x12599ae  [0x104ff69ae]
    +                                                                                                               ! : |   + !         : 12 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x1260a0c  [0x104ffda0c]
    +                                                                                                               ! : |   + !         : 5 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x1260b2f  [0x104ffdb2f]
    +                                                                                                               ! : |   + !         : 4 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x12609f0  [0x104ffd9f0]
    +                                                                                                               ! : |   + !         : 4 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x1261c10  [0x104ffec10]
    +                                                                                                               ! : |   + !         : 2 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x12609a9  [0x104ffd9a9]
    +                                                                                                               ! : |   + !         : 2 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x1260b19  [0x104ffdb19]
    +                                                                                                               ! : |   + !         : 2 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x1260b21  [0x104ffdb21]
    +                                                                                                               ! : |   + !         : 2 ???  (in libchromiumcontent.dylib)  load address 0x103d9d000 + 0x1260b90  [0x104ffdb90]
    +                                                                                                               ! : |   + !         : 
...

There’s a ton more in this stack, trimmed for now, unless you want more.


#3

Seems that the editor was running in an infinite javascript loop, can you open the devtools and click the pause button?


#4

Thanks - that was helpful. It’s located under the Sources tab for anyone else looking.

After reproducing the error situation, I get stopped in underscore.js:

  _.pluck = function(obj, key) {
    return _.map(obj, _.property(key));
  };

(also during debugging, ALL cpus go wild and crazy)


#5

I’ll also point out that it looks like Atom uses underscore.js 1.5.2, and the maintainer has released 1.6.0 in early February - that might be helpful, but maybe not?


#6

I think I found the bug, ni idea how/where to look for fixing. Atom devs, you’re up! :smile:

From the call stack (don’t know how to copy/paste that from Chrome Dev Tools, neither does the Internet, apparently) it looks like this particular method was being called when 'softWrap': true was set in config.

I tried playing around with setting that, as well as softWrapAtPreferredLineLength - but both seem to be buggy enough that they crash Atom.


#7

I had the same issue with atom freezing. They seem to be aware of it and should be fixed by 0.63 apparently. If you disable the Soft Wrap features it will stop hanging for now until the update.


#8

Thanks for pointing out that thread! I had searched and stuff, but couldn’t find any threads on general debugging.

It might be a good idea to have a post on “what devs would like when trying to debug Atom”, starting with the notes over there.


#9

Yea I agree. It would be good if they could create a sticky note about what they would like to see and how to go about debugging etc.