Author Topic: 16.1 : PHP - Error expanding comments  (Read 1682 times)

Christoph

  • Senior Community Member
  • Posts: 114
  • Hero Points: 6
16.1 : PHP - Error expanding comments
« on: February 02, 2012, 08:12:21 pm »
I ran into a problem adding comments to my PHP code.  After typing /**<enter> (or /*<space>, /**<space>, etc; basically anything involving /*), the following error pops up.



I compared my comment settings in 16.1 to the settings in v16.0.3 and they appear to be identical.  Nothing in the error is jumping out at me to help me figure out how I might be able to fix this and get it so that I can use multi-line comments again.

I don't suppose any of you can offer some pointers as to what I can do to rectify the issue?

thnx,
Christoph
« Last Edit: February 02, 2012, 08:14:59 pm by Christoph »

Rodney

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 706
  • Hero Points: 45
Re: 16.1 : PHP - Error expanding comments
« Reply #1 on: February 02, 2012, 09:59:04 pm »
I cannot reproduce the stack, but I can make a guess from inspecting yours. Do/did you have the Options dialog open to the color-coding settings at some point and get/got a Slick-C stack? I'm just guessing because it is pulling a cached value (which is null) from a hash table used by the color-coding settings form.

Anyway, try this:
open the offending file.
go to Document>[LangId] Options...
select Color Coding
make a change (e.g. toggle Case-sensitive off, then back on)
hit OK
exit and restart the editor for safe measure

--rodney++

Christoph

  • Senior Community Member
  • Posts: 114
  • Hero Points: 6
Re: 16.1 : PHP - Error expanding comments
« Reply #2 on: February 03, 2012, 03:02:00 pm »
Rodney, I tried that but it didn't seem to help matters.  You are right, though, I was changing my color coding settings yesterday but since I hadn't used multi-line comments in PHP before then, I can't say that those changes caused the problem.  The problem is definitely with the language because when I edit a .js file, I'm able to add multi-line comments w/o incident.

This is what the stack trace looks like after performing your suggested steps:



thnx,
Chris
« Last Edit: February 03, 2012, 03:04:14 pm by Christoph »

Rodney

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 706
  • Hero Points: 45
Re: 16.1 : PHP - Error expanding comments
« Reply #3 on: February 03, 2012, 03:18:42 pm »
There is a global static in commentformat.e that could have gotten munged. Try reloading macros/commentformat.e from Macro>Load Module.

--rodney++

Christoph

  • Senior Community Member
  • Posts: 114
  • Hero Points: 6
Re: 16.1 : PHP - Error expanding comments
« Reply #4 on: February 03, 2012, 03:26:39 pm »
I reloaded commentformat.e, closed SlickEdit, restarted and was presented with this stack trace when I tried again:



thnx,
Christoph

Rodney

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 706
  • Hero Points: 45
Re: 16.1 : PHP - Error expanding comments
« Reply #5 on: February 03, 2012, 03:32:54 pm »
exit SE
temporarily rename user.vlx (the file referenced in the stack)
restart SE and try to reproduce

if that still fails, then try pointing SE at a clean-config directory (-sc <dir>). if that works, then you can send your offending vunxdefs.e into support and we can see if we can reproduce it here. we would probably also need an offending source file.

--rodney++

Christoph

  • Senior Community Member
  • Posts: 114
  • Hero Points: 6
Re: 16.1 : PHP - Error expanding comments
« Reply #6 on: February 03, 2012, 03:44:23 pm »
That seems to have worked.  What does user.vlx do, anyway?  And should it have been recreated?  It wasn't.

Also, it was causing this problem in any PHP file.  As one of my tests, I created a new PHP file which had nothing but the following:

<?php
  function joe()
  {
  }
?>

and it still caused the problem.  But with user.vlx gone, this problem is as well.

thnx,
Christoph

Rodney

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 706
  • Hero Points: 45
Re: 16.1 : PHP - Error expanding comments
« Reply #7 on: February 03, 2012, 03:49:36 pm »
user.vlx holds user-customized color-coding settings. If you can reproduce the customizations that caused the problem, then definitely send the steps to support.

--rodney++

Christoph

  • Senior Community Member
  • Posts: 114
  • Hero Points: 6
Re: 16.1 : PHP - Error expanding comments
« Reply #8 on: February 03, 2012, 03:55:29 pm »
So w/o that file, the color codings I changed yesterday should be gone?  I ask because they aren't.  My color coding is just as it was before I renamed user.vlx.

thnx,
Christoph

Rodney

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 706
  • Hero Points: 45
Re: 16.1 : PHP - Error expanding comments
« Reply #9 on: February 03, 2012, 03:56:28 pm »
That is correct.

Christoph

  • Senior Community Member
  • Posts: 114
  • Hero Points: 6
Re: 16.1 : PHP - Error expanding comments
« Reply #10 on: February 03, 2012, 03:57:25 pm »
Then what's going on with my color coding not reverting?

thnx,
Christoph

Rodney

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 706
  • Hero Points: 45
Re: 16.1 : PHP - Error expanding comments
« Reply #11 on: February 03, 2012, 03:58:51 pm »
I have no idea. Could you be more specific about what exactly is not reverting?

Christoph

  • Senior Community Member
  • Posts: 114
  • Hero Points: 6
Re: 16.1 : PHP - Error expanding comments
« Reply #12 on: February 03, 2012, 04:02:38 pm »
For example, the change to the color (in the gutter) representing inserted and modified lines.

One other point of interest.  Just to see something, I put the user.vlx I had renamed back in place, reopened SE and now the comments are working correctly again.  What would SE have done when it saw the user.vlx gone such that the problem would be fixed even with it back in place?

thnx,
Christoph

Rodney

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 706
  • Hero Points: 45
Re: 16.1 : PHP - Error expanding comments
« Reply #13 on: February 03, 2012, 04:12:13 pm »
user.vlx governs what is defined as a symbol (keyword, comment, etc.). It does not specify the colors used to color those symbols.

The colors used to color symbols are stored in the state file (vslick.stu) and saved in macro form in vunxdefs.e (in order to transfer configuration when you upgrade).

Why putting user.vlx in place continued to work? I have no idea. I suspect it allowed a code path to be followed to completion, perhaps clearing out some global hash tables along the way that track language/color/symbol information. It is difficult to say because I never reproduced. If you are able to reproduce it, then please do provide us the steps.

--rodney++

Christoph

  • Senior Community Member
  • Posts: 114
  • Hero Points: 6
Re: 16.1 : PHP - Error expanding comments
« Reply #14 on: February 03, 2012, 04:22:44 pm »
Will do.  Thanks for all your help with this!

thnx,
Christoph