Author Topic: SE crash when enabling spell check while typing  (Read 988 times)

rjpontefract

  • Senior Community Member
  • Posts: 231
  • Hero Points: 9
Re: SE crash when enabling spell check while typing
« Reply #15 on: March 01, 2023, 09:32:51 pm »
I wasn't sure what to expect, but the first thing that I noticed was that line 7 had a compile error "invalid expression".  I changed the code to the following and tried again:
Code: [Select]
#include "slick.sh"
defmain()
{
   args:=arg(1);
   filename:=parse_file(args,false);
   if (filename!="") {
       // We want this one to act like user typed command on command line
       // except we don't look for internal editor commands.
       _str vslickpathfilename=slick_path_search(filename,"");
       // We want this one to act like user is at shell prompt.
       _str pathfilename=path_search(filename,"","");
       _str msg="VSLICKPATH found <"vslickpathfilename">   PATH found <"pathfilename">";
       sticky_message(msg);
   }
}

That resulted in the following message in the status line:
Code: [Select]
VSLICKPATH found <>  PATH found <>

I'm not sure if that helps or not.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3910
  • Hero Points: 513
Re: SE crash when enabling spell check while typing
« Reply #16 on: March 01, 2023, 09:39:39 pm »
Argh, it was supposed to be "void defmain()", that's what I get for being overconfident.

Anyway, not finding the dictionary is a problem.  Did you remember to pass "smain.dct" to the batch file?  Are you setting any SlickEdit specific environment variables (VSLICKMACROS maybe?)

rjpontefract

  • Senior Community Member
  • Posts: 231
  • Hero Points: 9
Re: SE crash when enabling spell check while typing
« Reply #17 on: March 01, 2023, 09:54:08 pm »
I did pass smain.dct to the macro. The command was "xcom /tmp/which_file.e smain.dct"

I do set VSLICKMACROS so I unset it and ran SE again. The macro returned the same result.

The following is the output from "env | grep vs" in the build window of SE:
Code: [Select]
VSLICKUNICODECALLS=1
VSROOT=/Applications/SlickEditPro2022.app/Contents/
VSLICKINCLUDE=/Applications/SlickEditPro2022.app/Contents/macros
VSLICKUTF8=1
VSLICKPATH=/Users/rjp/Library/Application Support/SlickEdit/27.0.1/:/Users/rjp/Development/SlickEdit/Macros
VSLICKBIN=/Applications/SlickEditPro2022.app/Contents/MacOS/
VSDIR=/Applications/SlickEditPro2022.app/Contents/MacOS/
VSLICKBITMAPS=/Applications/SlickEditPro2022.app/Contents/bitmaps:plugin://:/Users/rjp/Development/SlickEdit/Bitmaps
VSLICKMACROS=/Applications/SlickEditPro2022.app/Contents/macros:plugin://
VSLICKBUILDALLOWUTF8=1
VSLICKMISC=/Applications/SlickEditPro2022.app/Contents/
VSLICKBIN1=/Applications/SlickEditPro2022.app/Contents/MacOS/

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6582
  • Hero Points: 511
Re: SE crash when enabling spell check while typing
« Reply #18 on: March 01, 2023, 11:24:20 pm »
Looks like VSLICKPATH is bad. Make sure you unset that. I get nothing if I set mine to that.

rjpontefract

  • Senior Community Member
  • Posts: 231
  • Hero Points: 9
Re: SE crash when enabling spell check while typing
« Reply #19 on: March 01, 2023, 11:49:51 pm »
I unset VSLICKPATH and now the macro shows

Code: [Select]
VSLICKPATH found </Applications/SlickEditPro2022.app/Contents/smain.dct> PATH found <>

What format should VSLICKPATH be in?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6582
  • Hero Points: 511
Re: SE crash when enabling spell check while typing
« Reply #20 on: March 02, 2023, 12:02:52 am »
Looks like you fixed it (smain.dct was found). Try spell checking with that fix.

If you are wondering what the correct value for VSLICKPATH is, type "set VSLICKPATH" on the SlickEdit command line. This will show the current value for VSLICKPATH.
« Last Edit: March 02, 2023, 12:18:35 am by Clark »

rjpontefract

  • Senior Community Member
  • Posts: 231
  • Hero Points: 9
Re: SE crash when enabling spell check while typing
« Reply #21 on: March 02, 2023, 03:11:45 am »
Hi Clark, that worked a treat, thanks.
I see that I was missing some directories from VSLICKPATH.  Because SE put its own entry before mine when I set it in .zshrc I figured that the value I provided would be appended to the default value used by SE.  I can see now that's not the case. 
Thanks again.