Author Topic: RC4 MAC Slick-C Error Stack  (Read 1829 times)

rajkej

  • Senior Community Member
  • Posts: 271
  • Hero Points: 11
RC4 MAC Slick-C Error Stack
« on: October 04, 2016, 03:25:27 pm »
I run RC4 on MAC and have my own language tagging extension. It seems that I get a slick-c stack sometimes when I change focus from another program back into SE with that language file being the current file. Here is a picture of the stack and the stack trace from the stack.log file. Tagging is working for my simple tagging extension for this language. Any suggestions as to what to look for?

stack[2016-10-04T09:19:11Z] Slick-C STACK TRACE ******************************
stack[2016-10-04T09:19:11Z] Created on 10/4/2016 at 9:19:11 (9 ms)
stack[2016-10-04T09:19:11Z] SlickEdit Pro Version 21.0.0.10 Copyright 1988-2016 SlickEdit Inc.
stack[2016-10-04T09:19:11Z] Edit module and type "st -f <offset>" to get the
stack[2016-10-04T09:19:11Z] run-time error position
stack[2016-10-04T09:19:11Z]
stack[2016-10-04T09:19:11Z] error code=-3071
stack[2016-10-04T09:19:11Z] Variable element or variable not initialized
stack[2016-10-04T09:19:11Z]
stack[2016-10-04T09:19:11Z]tagwin.ex 1362 tagwin:restorePreviewWindow(
stack[2016-10-04T09:19:11Z]   1:   ._typename()=PREVIEW-WINDOW-STACK-ITEM
stack[2016-10-04T09:19:11Z]   1:   .stack-top=(null)
stack[2016-10-04T09:19:11Z]   1:   .tree-line=<empty>
stack[2016-10-04T09:19:11Z]   1:   .symbols=(null)
stack[2016-10-04T09:19:11Z]   1:   .helpText=(null)
stack[2016-10-04T09:19:11Z]   1:   .fileText=(null)
stack[2016-10-04T09:19:11Z]   1:   .htmlCtlScrollInfo=(null)
stack[2016-10-04T09:19:11Z]   p_window_id: 67
stack[2016-10-04T09:19:11Z]   p_object: OI_FORM
stack[2016-10-04T09:19:11Z]   p_name: _tbtagwin_form
stack[2016-10-04T09:19:11Z]tagwin.ex 9791 tagwin:_UpdateTagWindowNow(<empty>)   p_window_id: 143   p_object: OI_SSTAB   p_name: ctlsstab1
stack[2016-10-04T09:19:11Z]tagwin.ex 9986 _UpdateTagWindowDelayed(<empty>,0)   p_window_id: 143   p_object: OI_SSTAB   p_name: ctlsstab1
stack[2016-10-04T09:19:11Z]bufftabs.ex 2228 _tbbufftabs_form.ctlsstab1.on_highlight(-1,)   p_window_id: 143   p_object: OI_SSTAB   p_name: ctlsstab1
 
The language extension tagging file contains the following code

Code: [Select]
#pragma option(strict,on)
#include "slick.sh"

///////////////////////////////////////////////////////////////////////////////
// This function is called to search for declarations within an ATIF source
// file. It searches from the current cursor location for anything that
// appears to be a function or varaible declaration.
//
int atif_proc_search( _str &proc_name, int find_first )
{
    int status;
    if ( find_first )
    {
        //If this is the first time we are called, set up the search
        //Functions that call xxx_proc_search will go to the top of the
        //buffer each time
        if ( proc_name:=='' )
        {
            //set proc_name equal to regular expression equal to a combination
            //one or more alphanumerics,_'s,and -'s
            proc_name=':v';
        }
        status=search("^(" proc_name "[:])",'ri');
    }
    else
    {
        //Just use repeat search.  This is a faster.
        status=repeat_search();
    }
    if ( status )
    {
        //There are probably no more tags.
        //Return error code(Caller probably in a loop)
        return(status);
   }

    // grab the line and parse out the variable name
    _str line="";
    get_line(line);
    parse strip(line) with proc_name ':';
    proc_name = tag_tree_compose_tag(proc_name,"","gvar",0);
    //proc_name = proc_name :+ "(gvar)";
    return(0);
}

///////////////////////////////////////////////////////////////////////////////
// Build a tag file.
// This function is used to automatically build a tag file for language-specific
// libraries and built-in functions. You can create a [lang].tagdoc file to
// document built-in functions. Look at [slickedit]/builtins/basic.tagdoc or
// html.tagdoc for some examples of how this is done.

int _atif_MaybeBuildTagFile( int &tfindex )
{
    // maybe we can recycle tag file(s)
    _str ext="atif";
    _str tagfilename="";
    if (ext_MaybeRecycleTagFile(tfindex,tagfilename,ext,ext)) {
       return(0);
    }

    // now build the extension specific tag file
    return(0);
    //return ext_BuildTagFile(tfindex,
    //                        tagfilename,
    //                        ext,
    //                        "ATIF Tags",
    //                        false,
    //                        "",
    //                        ext_builtins_path(ext,ext),
    //                        false,
    //                        false
    //                        );
}

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2522
  • Hero Points: 367
Re: RC4 MAC Slick-C Error Stack
« Reply #1 on: October 04, 2016, 07:00:06 pm »
Try the attached hot fix.

rajkej

  • Senior Community Member
  • Posts: 271
  • Hero Points: 11
Re: RC4 MAC Slick-C Error Stack
« Reply #2 on: October 04, 2016, 07:38:55 pm »
This time I got an error when the preview window was showing and I saved one of my language files. I had loaded the hot fix, exited SE and saved its configuration, restarted SE, modified my language file and saved it to get this stack.

stack[2016-10-04T13:36:43Z] Slick-C STACK TRACE ******************************
stack[2016-10-04T13:36:43Z] Created on 10/4/2016 at 13:36:43 (199 ms)
stack[2016-10-04T13:36:43Z] SlickEdit Pro Version 21.0.0.10 Copyright 1988-2016 SlickEdit Inc.
stack[2016-10-04T13:36:43Z] Edit module and type "st -f <offset>" to get the
stack[2016-10-04T13:36:43Z] run-time error position
stack[2016-10-04T13:36:43Z]
stack[2016-10-04T13:36:43Z] error code=-3071
stack[2016-10-04T13:36:43Z] Variable element or variable not initialized
stack[2016-10-04T13:36:43Z]
stack[2016-10-04T13:36:43Z]tagwin.ex 1362 tagwin:restorePreviewWindow(
stack[2016-10-04T13:36:43Z]   1:   ._typename()=PREVIEW-WINDOW-STACK-ITEM
stack[2016-10-04T13:36:43Z]   1:   .stack-top=(null)
stack[2016-10-04T13:36:43Z]   1:   .tree-line=<empty>
stack[2016-10-04T13:36:43Z]   1:   .symbols=(null)
stack[2016-10-04T13:36:43Z]   1:   .helpText=(null)
stack[2016-10-04T13:36:43Z]   1:   .fileText=(null)
stack[2016-10-04T13:36:43Z]   1:   .htmlCtlScrollInfo=(null)
stack[2016-10-04T13:36:43Z]   p_window_id: 38
stack[2016-10-04T13:36:43Z]   p_object: OI_FORM
stack[2016-10-04T13:36:43Z]   p_name: _tbtagwin_form
stack[2016-10-04T13:36:43Z]tagwin.ex 9791 tagwin:_UpdateTagWindowNow(<empty>)   p_window_id: 36   p_object: OI_SSTAB   p_name: ctlsstab1
stack[2016-10-04T13:36:43Z]tagwin.ex 9986 _UpdateTagWindowDelayed(<empty>,0)   p_window_id: 15   p_object: OI_EDITOR   p_name:
stack[2016-10-04T13:36:43Z]bufftabs.ex 2228 _tbbufftabs_form.ctlsstab1.on_highlight(-1,)   p_window_id: 15   p_object: OI_EDITOR   p_name:

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2522
  • Hero Points: 367
Re: RC4 MAC Slick-C Error Stack
« Reply #3 on: October 04, 2016, 10:04:55 pm »
It seems suspicious that you got the exact same Slick-C stack.  Verify that the hot fix was actually loaded.  Help > Product Updates > List Installed Fixes.

Also, do you really want to use the Buffer Tabs toolbar, or was that toolbar something that you migrated from an earlier release?  The Document Tabs makes Buffer Tabs obsolete for most users.

rajkej

  • Senior Community Member
  • Posts: 271
  • Hero Points: 11
Re: RC4 MAC Slick-C Error Stack
« Reply #4 on: October 05, 2016, 01:03:33 pm »
Hot fixes show the hot fix loaded.

I can't figure out what you mean by "Buffer Tabs" and "Document Tabs". When I look at Options->Appearance->ToolWindows or Toolbars neither of those are listed. I did just port my old configuration over.

Toolbars shows Mac Standard as being the only visible one.
ToolWindows shows several visible but none of them are marked Document Tabs or Buffer Tabs.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2522
  • Hero Points: 367
Re: RC4 MAC Slick-C Error Stack
« Reply #5 on: October 05, 2016, 02:17:29 pm »
I should have called them "File Tabs".  View > Tool Windows > File Tabs.  It used to be called buffer tabs.  I can tell from your Slick-C stack that you have it active.

The Document Tabs are built into the multiple document interface.  If you don't see them, then try Window > Zoom Toggle, and they should turn up above the editor window.

rajkej

  • Senior Community Member
  • Posts: 271
  • Hero Points: 11
Re: RC4 MAC Slick-C Error Stack
« Reply #6 on: October 05, 2016, 02:32:19 pm »
Hmmm. I'll try the new document tabs. It looks to me like a dropdown arrow on the top right of the document window. Does that sound right?

I like the File Tabs because they are always visible and at a glance I can see what files I have open. One click and I'm in my new file (as long as I don't have too many files open).

Document tabs as I understand it are a few clicks (one to bring up the drop down then another to select which file). An advantage would be its easier to see all the files that are open than with File Tabs if I have more open than fit on the screen.

I'll give this a try for a day or two and see how it goes and if I get any more slick-C stacks.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2522
  • Hero Points: 367
Re: RC4 MAC Slick-C Error Stack
« Reply #7 on: October 05, 2016, 03:46:59 pm »
You probably have the "Multiple files shared window" setting turned on (Tools > Options > Editing > Editor Windows > Files per window).  If you change that to "One file per window" the Document tabs will be much more useful.  Refer to the following to see what they are supposed to look like (in a default configuration):

     https://www.slickedit.com/products/slickedit/cool-features#h-files-editing.