D15836: Endless state transition guard

2018-09-29 Thread Christoph Cullmann
This revision was automatically updated to reflect the committed changes.
Closed by commit R216:899ce3e7bb6e: Endless state transition guard (authored by 
cullmann).

REPOSITORY
  R216 Syntax Highlighting

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D15836?vs=42558=42559

REVISION DETAIL
  https://phabricator.kde.org/D15836

AFFECTED FILES
  src/lib/abstracthighlighter.cpp

To: cullmann, dhaumann, vkrause, nibags
Cc: kwrite-devel, kde-frameworks-devel, michaelh, ngraham, bruns, demsking, 
cullmann, sars, dhaumann


D15836: Endless state transition guard

2018-09-29 Thread Volker Krause
vkrause accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D15836

To: cullmann, dhaumann, vkrause, nibags
Cc: kwrite-devel, kde-frameworks-devel, michaelh, ngraham, bruns, demsking, 
cullmann, sars, dhaumann


D15836: Endless state transition guard

2018-09-29 Thread Christoph Cullmann
cullmann created this revision.
cullmann added reviewers: dhaumann, vkrause, nibags.
Herald added projects: Kate, Frameworks.
Herald added subscribers: kde-frameworks-devel, kwrite-devel.
cullmann requested review of this revision.

REVISION SUMMARY
  This e.g. catches the "hang" people did see before the fix in 
https://phabricator.kde.org/D15773
  Its a simple good old "endless loop counter" that aborts after too many 
transitions.
  IMHO more than a few without any progress at the text offset make no sense, 
therefore the hard limit of 1024 should be reasonable

TEST PLAN
  I tried the examples attached for https://phabricator.kde.org/D15773, with my 
fix, I get just
  
  Endless state transitions, aborting highlighting of line.
  
  as debug output but no longer any hang.
  
  (but yes, the highlighting of some lines is messed up, which IMHO is ok, much 
better than a hard hang of the application

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D15836

AFFECTED FILES
  src/lib/abstracthighlighter.cpp

To: cullmann, dhaumann, vkrause, nibags
Cc: kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, 
demsking, cullmann, sars, dhaumann