Sublime Forum

Bug: Infinite loop/freeze on OSX

#1

This happens several times per day with build 2219 on OSX.

How to reproduce:

  • Revert to a freshly installed state
  • Create a plugin with this content:

[code]import sublime, sublime_plugin

count = 0
class MyEventListener(sublime_plugin.EventListener):
def on_selection_modified(self, view):
global count
print “%d” % count
count += 1
[/code]

  • Open up the default settings file
  • Put the cursor on the last visible line and then drag select downwards to select text outside of the current viewport
  • Beachball/freeze

Stack:

Thread 0x15ace DispatchQueue 1 priority 47 cpu time 1.486s 16 start + 52 (Sublime Text 2) [0x102afb444] 16 main + 2251 (Sublime Text 2) [0x102becb6b] 16 -[NSApplication run] + 517 (AppKit) [0x7fff89408283] 16 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128 (AppKit) [0x7fff89410ed2] 16 _DPSNextEvent + 685 (AppKit) [0x7fff89411613] 16 BlockUntilNextEventMatchingListInMode + 62 (HIToolbox) [0x7fff8e458cd3] 16 ReceiveNextEventCommon + 356 (HIToolbox) [0x7fff8e458e42] 16 RunCurrentEventLoopInMode + 209 (HIToolbox) [0x7fff8e4590a4] 16 CFRunLoopRunSpecific + 290 (CoreFoundation) [0x7fff8cce56b2] 16 __CFRunLoopRun + 789 (CoreFoundation) [0x7fff8cce5dc5] 16 __CFRunLoopDoSources0 + 245 (CoreFoundation) [0x7fff8ccc2a25] 16 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 (CoreFoundation) [0x7fff8ccc3101] 16 __NSThreadPerformPerform + 225 (Foundation) [0x7fff881b5677] 13 ns_work_queue_runner::run_items() + 169 (Sublime Text 2) [0x102d5ea63] 13 funnel_log_listener::main_thread_thunk(void*) + 102 (Sublime Text 2) [0x102b86ee6] 13 non-virtual thunk to console_panel::on_message_logged(log_header, char const*) + 46 (Sublime Text 2) [0x102b858de] 5 console_panel::on_message_logged(log_header, char const*) + 291 (Sublime Text 2) [0x102b85a07] 5 TextBuffer::eraseCharacters(SelectionRegion) + 640 (Sublime Text 2) [0x102cbf3fc] 4 TokenStorage::eraseCharacters(SelectionRegion) + 1038 (Sublime Text 2) [0x102d31f3c] 4 TokenBuffer::updateLayout() + 45 (Sublime Text 2) [0x102d14eef] 4 TokenBuffer::updateLayout() + 45 (Sublime Text 2) [0x102d14eef] 3 TokenBuffer::updateLayout() + 45 (Sublime Text 2) [0x102d14eef] 2 TokenBuffer::updateLayout() + 45 (Sublime Text 2) [0x102d14eef] 2 TokenBuffer::updateLayout() + 62 (Sublime Text 2) [0x102d14f00] 2 TokenBuffer::reflowLayout() + 298 (Sublime Text 2) [0x102d14d52] 2 TokenBuffer::calculateLayout(unsigned int, LayoutInfo const&) + 1101 (Sublime Text 2) [0x102d14a6d] 2 TokenWordWrapper<HorizontalExtentsTrackingRenderer>::processToken(Token*) + 416 (Sublime Text 2) [0x102d15c58] 1 TokenWordWrapper<HorizontalExtentsTrackingRenderer>::processWord(slate::usubstring, float, Token*) + 479 (Sublime Text 2) [0x102d15919] 1 <executing in user space> 1 TokenWordWrapper<HorizontalExtentsTrackingRenderer>::processWord(slate::usubstring, float, Token*) + 242 (Sublime Text 2) [0x102d1582c] 1 <executing in user space> 1 TokenBuffer::updateLayout() + 62 (Sublime Text 2) [0x102d14f00] 1 TokenBuffer::reflowLayout() + 298 (Sublime Text 2) [0x102d14d52] 1 TokenBuffer::calculateLayout(unsigned int, LayoutInfo const&) + 1101 (Sublime Text 2) [0x102d14a6d] 1 TokenWordWrapper<HorizontalExtentsTrackingRenderer>::processToken(Token*) + 416 (Sublime Text 2) [0x102d15c58] 1 TokenWordWrapper<HorizontalExtentsTrackingRenderer>::processWord(slate::usubstring, float, Token*) + 212 (Sublime Text 2) [0x102d1580e] 1 <executing in user space> 1 TokenBuffer::updateLayout() + 62 (Sublime Text 2) [0x102d14f00] 1 TokenBuffer::reflowLayout() + 298 (Sublime Text 2) [0x102d14d52] 1 TokenBuffer::calculateLayout(unsigned int, LayoutInfo const&) + 1101 (Sublime Text 2) [0x102d14a6d] 1 TokenWordWrapper<HorizontalExtentsTrackingRenderer>::processToken(Token*) + 416 (Sublime Text 2) [0x102d15c58] 1 TokenWordWrapper<HorizontalExtentsTrackingRenderer>::processWord(slate::usubstring, float, Token*) + 611 (Sublime Text 2) [0x102d1599d] 1 TokenWordWrapper<HorizontalExtentsTrackingRenderer>::drawCharacterWrapped(double, slate::usubstring) + 150 (Sublime Text 2) [0x102d156e2] 1 <executing in user space> 1 TokenStorage::eraseCharacters(SelectionRegion) + 1019 (Sublime Text 2) [0x102d31f29] 1 TokenStorage::tokenise(BucketContainer<tree_list<TokenBuffer, TokenBuffer::token_list_ops>, TokenStorage::TokenBufferFactory>::iterator, long long, LexerState*, slate::usubstring) + 547 (Sublime Text 2) [0x102d31a83] 1 TokenStorage::insertTokens(BucketContainer<tree_list<TokenBuffer, TokenBuffer::token_list_ops>, TokenStorage::TokenBufferFactory>::iterator, std::vector<TokenInfo, std::allocator<TokenInfo> >) + 816 (Sublime Text 2) [0x102d317ee] 1 void BucketContainer<tree_list<TokenBuffer, TokenBuffer::token_list_ops>, TokenStorage::TokenBufferFactory>::insert<__gnu_cxx::__normal_iterator<Token**, std::vector<Token*, std::allocator<Token*> > > >(BucketContainer<tree_list<TokenBuffer, TokenBuffer::token_list_ops>, TokenStorage::TokenBufferFactory>::iterator, __gnu_cxx::__normal_iterator<Token**, std::vector<Token*, std::allocator<Token*> > >, __gnu_cxx::__normal_iterator<Token**, std::vector<Token*, std::allocator<Token*> > >) + 214 (Sublime Text 2) [0x102d4c4b2] 1 void TokenBuffer::insert<Token**>(Token**, Token**, Token**) + 185 (Sublime Text 2) [0x102d4b941] 1 <executing in user space> 4 console_panel::on_message_logged(log_header, char const*) + 311 (Sublime Text 2) [0x102b85a1b] 4 control::update_layout() + 82 (Sublime Text 2) [0x102b1d208] 4 control::update_layout() + 130 (Sublime Text 2) [0x102b1d238] 4 scroll_area_control::on_layout() + 42 (Sublime Text 2) [0x102b48532] 4 scroll_area_control::run_layout() + 3225 (Sublime Text 2) [0x102b47fd5] 4 non-virtual thunk to skyline_text_control::get_tracked_position() + 16 (Sublime Text 2) [0x102c82fc0] 4 skyline_text_control::get_tracked_position() + 240 (Sublime Text 2) [0x102c830b2] 4 TextBufferView::pointToView(long long) + 16 (Sublime Text 2) [0x102cdd33e] 4 TokenRenderer::pointToView(long long) + 47 (Sublime Text 2) [0x102d1999f] 4 TokenStorage::pointToView(unsigned int, long long) + 463 (Sublime Text 2) [0x102d35a4f] 4 TokenStorage::Location TokenStorage::summarise<LayoutSummary>(long long, LayoutSummary&) + 187 (Sublime Text 2) [0x102d447a9] 3 TokenWordWrapper<LayoutSummary::RecordingTextRenderer>::processToken(Token*) + 466 (Sublime Text 2) [0x102d4418a] 3 TokenWordWrapper<LayoutSummary::RecordingTextRenderer>::processWord(slate::usubstring, float, Token*) + 654 (Sublime Text 2) [0x102d43ea0] 2 TokenWordWrapper<LayoutSummary::RecordingTextRenderer>::drawCharacterWrapped(double, slate::usubstring) + 69 (Sublime Text 2) [0x102d43911] 1 FontLayoutInfo::charWidth(double, wchar_t) const + 6 (Sublime Text 2) [0x102d200ee] 1 <executing in user space> 1 FontLayoutInfo::charWidth(double, wchar_t) const + 102 (Sublime Text 2) [0x102d2014e] 1 google::dense_hashtable<std::pair<unsigned int const, float>, unsigned int, std::tr1::hash<unsigned int>, google::dense_hash_map<unsigned int, float, std::tr1::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<float> >::SelectKey, google::dense_hash_map<unsigned int, float, std::tr1::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<float> >::SetKey, std::equal_to<unsigned int>, std::allocator<float> >::find(unsigned int const&) const + 315 (Sublime Text 2) [0x102ce65cb] 1 <executing in user space> 1 TokenWordWrapper<LayoutSummary::RecordingTextRenderer>::drawCharacterWrapped(double, slate::usubstring) + 107 (Sublime Text 2) [0x102d43937] 1 <executing in user space> 1 TokenWordWrapper<LayoutSummary::RecordingTextRenderer>::processToken(Token*) + 156 (Sublime Text 2) [0x102d44054] 1 TokenWordWrapper<LayoutSummary::RecordingTextRenderer>::visibleRegion(slate::usubstring) + 179 (Sublime Text 2) [0x102d3789d] 1 <executing in user space> 3 console_panel::on_message_logged(log_header, char const*) + 193 (Sublime Text 2) [0x102b859a5] 2 TextBuffer::insertCharacters(long long, slate::usubstring, bool) + 1054 (Sublime Text 2) [0x102cbebd8] 2 TextBuffer::endAction(bool, bool) + 644 (Sublime Text 2) [0x102cbeece] 2 scroll_area_control::on_preferred_size_changed() + 65 (Sublime Text 2) [0x102b466d5] 2 non-virtual thunk to skyline_text_control::get_tracked_position() + 16 (Sublime Text 2) [0x102c82fc0] 2 skyline_text_control::get_tracked_position() + 240 (Sublime Text 2) [0x102c830b2] 2 TextBufferView::pointToView(long long) + 16 (Sublime Text 2) [0x102cdd33e] 2 TokenRenderer::pointToView(long long) + 47 (Sublime Text 2) [0x102d1999f] 2 TokenStorage::pointToView(unsigned int, long long) + 463 (Sublime Text 2) [0x102d35a4f] 2 TokenStorage::Location TokenStorage::summarise<LayoutSummary>(long long, LayoutSummary&) + 187 (Sublime Text 2) [0x102d447a9] 2 TokenWordWrapper<LayoutSummary::RecordingTextRenderer>::processToken(Token*) + 466 (Sublime Text 2) [0x102d4418a] 2 TokenWordWrapper<LayoutSummary::RecordingTextRenderer>::processWord(slate::usubstring, float, Token*) + 654 (Sublime Text 2) [0x102d43ea0] 1 TokenWordWrapper<LayoutSummary::RecordingTextRenderer>::drawCharacterWrapped(double, slate::usubstring) + 217 (Sublime Text 2) [0x102d439a5] 1 <executing in user space> 1 TokenWordWrapper<LayoutSummary::RecordingTextRenderer>::drawCharacterWrapped(double, slate::usubstring) + 156 (Sublime Text 2) [0x102d43968] 1 <executing in user space> 1 TextBuffer::insertCharacters(long long, slate::usubstring, bool) + 102 (Sublime Text 2) [0x102cbe820] 1 TextBuffer::beginAction(const_substring) + 210 (Sublime Text 2) [0x102cbe5f8] 1 TransientState::TransientState(TextBuffer*) + 788 (Sublime Text 2) [0x102cc7346] 1 boost::unordered_detail::hash_table<boost::unordered_detail::set<boost::hash<std::string>, std::equal_to<std::string>, std::allocator<std::string> > >::find(std::string const&) const + 147 (Sublime Text 2) [0x102bf3903] 1 <executing in user space> 1 console_panel::on_message_logged(log_header, char const*) + 338 (Sublime Text 2) [0x102b85a36] 1 scroll_area_control::scroll_to(point, bool, bool) + 380 (Sublime Text 2) [0x102b46d1e] 1 scroll_area_control::scroll_to_impl(point, bool) + 331 (Sublime Text 2) [0x102b4698d] 1 skyline_text_control::track_position(point) + 47 (Sublime Text 2) [0x102c84051] 1 TokenStorage::viewToPoint(unsigned int, point const&) + 423 (Sublime Text 2) [0x102d2f135] 1 void TokenBuffer::visitBuffers<ViewToPointExtractor>(ViewToPointExtractor&) + 324 (Sublime Text 2) [0x102d45450] 1 ViewToPointExtractor::visitBuffer(TokenBuffer const&) + 970 (Sublime Text 2) [0x102d4521c] 1 TokenWordWrapper<TrackingTextRenderer>::processToken(Token*) + 282 (Sublime Text 2) [0x102d44e42] 1 TokenWordWrapper<TrackingTextRenderer>::processWord(slate::usubstring, float, Token*) + 641 (Sublime Text 2) [0x102d44c15] 1 TokenWordWrapper<TrackingTextRenderer>::drawCharacterWrapped(double, slate::usubstring) + 228 (Sublime Text 2) [0x102d43bd8] 1 TrackingTextRenderer::emit(point, double, slate::usubstring) + 489 (Sublime Text 2) [0x102d43259] 1 <executing in user space> 2 ns_work_queue_runner::run_items() + 188 (Sublime Text 2) [0x102d5ea76] 2 _px_post_timeout() + 184 (Sublime Text 2) [0x102d57788] 2 window_impl::pre_paint() + 20 (Sublime Text 2) [0x102b6d7b2] 2 window_impl::tick_animations() + 218 (Sublime Text 2) [0x102b6d2b4] 2 text_drag_handler::tick(double) + 134 (Sublime Text 2) [0x102c959b6] 2 text_drag_handler::select_to_point(point) + 505 (Sublime Text 2) [0x102c9631b] 2 TextBuffer::notifySelectionModified() + 34 (Sublime Text 2) [0x102cb963e] 2 plugin_handler::on_selection_modified() + 98 (Sublime Text 2) [0x102c493a4] 2 plugin_loader::run_buffer_callback(char const*, SP<TextBuffer>) + 236 (Sublime Text 2) [0x102c360e0] 2 boost::python::detail::returnable<boost::python::api::object>::type boost::python::call<boost::python::api::object, SP<TextBufferView> >(_object*, SP<TextBufferView> const&, boost::type<boost::python::api::object>*) + 63 (Sublime Text 2) [0x102c3a4df] 2 PyEval_CallFunction + 183 (Python) [0x1034ec80a] 2 PyEval_CallObjectWithKeywords + 177 (Python) [0x1034c3dfc] 2 PyObject_Call + 97 (Python) [0x1034bcaba] 2 ??? (Python + 348024) [0x1034fdf78] 2 PyEval_EvalCodeEx + 1956 (Python) [0x1034be281] 1 PyEval_EvalFrameEx + 14248 (Python) [0x1034c1a6d] 1 <executing in user space> 1 PyEval_EvalFrameEx + 7693 (Python) [0x1034c00d2] 1 ??? (Python + 112107) [0x1034c45eb] 1 PyEval_EvalFrameEx + 14302 (Python) [0x1034c1aa3] 1 ??? (Python + 427663) [0x10351168f] 1 <executing in user space> 1 ns_work_queue_runner::run_items() + 126 (Sublime Text 2) [0x102d5ea38] 1 <executing in user space>

0 Likes

When will the sublime text 3 be ready?
Updates for the stable Sublime Text
#2

Any luck figuring out a work around to this problem…or is there a fix incoming for this??

I am experiencing this bug A LOT! And it’s a doozy!

0 Likes