D15773: AppArmor: fix crashes in open rules (in KF5.50) and improvements for the new Solarized schemes

2018-09-29 Thread Christoph Cullmann
cullmann added a comment.


  Thanks for the examples, with that I could reproduce and introduce some hard 
guard for such cases.
  Better broken highlighting then an endless hanging application.
  https://phabricator.kde.org/D15836

REPOSITORY
  R216 Syntax Highlighting

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

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


D15773: AppArmor: fix crashes in open rules (in KF5.50) and improvements for the new Solarized schemes

2018-09-27 Thread Nibaldo González
This revision was automatically updated to reflect the committed changes.
Closed by commit R216:896d3bda6c1d: AppArmor: fix crashes in open rules (in 
KF5.50) and improvements for the new… (authored by nibags).

REPOSITORY
  R216 Syntax Highlighting

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D15773?vs=42371&id=42454

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

AFFECTED FILES
  autotests/folding/usr.bin.apparmor-profile-test.fold
  autotests/html/usr.bin.apparmor-profile-test.html
  autotests/input/usr.bin.apparmor-profile-test
  autotests/reference/usr.bin.apparmor-profile-test.ref
  data/syntax/apparmor.xml

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


D15773: AppArmor: fix crashes in open rules (in KF5.50) and improvements for the new Solarized schemes

2018-09-27 Thread Nibaldo González
nibags added a comment.


  I attach two files. The "usr.bin.firefox" file causes the error on line 31 
and "usr.bin.apparmor-profile-test" on line 184.
  F6288872: usr.bin.firefox  F6288873: 
usr.bin.apparmor-profile-test 

REPOSITORY
  R216 Syntax Highlighting

BRANCH
  fix-apparmor

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

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


D15773: AppArmor: fix crashes in open rules (in KF5.50) and improvements for the new Solarized schemes

2018-09-27 Thread Christoph Cullmann
cullmann accepted this revision.
cullmann added a comment.
This revision is now accepted and ready to land.


  Ok,
  I would say: this should go in to workaround the current issue.
  
  If you have a file, that triggers the "freeze" with the old version, I would 
be happy to get it here as attachment afterwards to take a look at the issue.
  It might occur in other places, too.
  
  Thanks!

REPOSITORY
  R216 Syntax Highlighting

BRANCH
  fix-apparmor

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

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


D15773: AppArmor: fix crashes in open rules (in KF5.50) and improvements for the new Solarized schemes

2018-09-27 Thread Nibaldo González
nibags added a comment.


  I did debug with gdb and valgrind, but the information is not relevant, since 
Kate freezes and I have to kill the process (I think I used the term "crash" 
incorrectly :S). 
  I have done some tests and the problem is in the use of `#pop!some_context` 
on the main context ("_profile"). 
  For example, formerly, when doing `#pop!some_context` on the main context, 
"some_context" was stacked on top of the main context, it did not replace it. 
Now, in KF5.50.0, the main context is removed from de "stack" and replaced by 
"some_context". In the AppArmor XML file I use `#pop#pop!some_context` in 
general to finish a rule and, in some cases, `#pop!some_context` is done in the 
main context, which produces the error in large files, since it is not a 
behavior that I envisioned.
  
  I do not know if I'm explaining myself well, but with this diff I solve the 
problem.

REPOSITORY
  R216 Syntax Highlighting

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

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


D15773: AppArmor: fix crashes in open rules (in KF5.50) and improvements for the new Solarized schemes

2018-09-26 Thread Christoph Cullmann
cullmann added a comment.


  Have you some backtrace from the crash?

REPOSITORY
  R216 Syntax Highlighting

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

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


D15773: AppArmor: fix crashes in open rules (in KF5.50) and improvements for the new Solarized schemes

2018-09-26 Thread Nibaldo González
nibags created this revision.
nibags added reviewers: Framework: Syntax Highlighting, dhaumann, cullmann.
Herald added projects: Kate, Frameworks.
Herald added subscribers: kde-frameworks-devel, kwrite-devel.
nibags requested review of this revision.

REVISION SUMMARY
  After upgrading to KDE Frameworks 5.50.0, Kate crashes when detecting open 
AppArmor rules (the AppArmor rules are closed with a comma. If the user doesn't 
write a comma, the syntax highlighting underlines the statement of the 
following rule. This is defined in the `_end_rule_irnc` context of the XML 
file.)
  
  The problem occurs with the use of `#pop#pop!context` in the `_end_rule_irnc` 
context, only in KF5.50. However, apparently, this only happens in very large 
files. For example, this problem occurs to me when I open the new test file, 
updated in this diff. However, I do not know the exact cause of this error...
  
  On line 184 of the test file, I put some examples of open AppArmor rules.
  
  Also, some changes are made in the colors so that the highlighting looks 
better in the last update of Solarized schemes.

REPOSITORY
  R216 Syntax Highlighting

BRANCH
  fix-apparmor

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

AFFECTED FILES
  autotests/folding/usr.bin.apparmor-profile-test.fold
  autotests/html/usr.bin.apparmor-profile-test.html
  autotests/input/usr.bin.apparmor-profile-test
  autotests/reference/usr.bin.apparmor-profile-test.ref
  data/syntax/apparmor.xml

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