Author Topic: Unable to create code annotation  (Read 1718 times)

rjpontefract

  • Senior Community Member
  • Posts: 250
  • Hero Points: 10
Unable to create code annotation
« on: March 28, 2021, 10:51:13 PM »
Using SE 25.0.1 (hot fix 2) on Windows 10 I am unable to add a code annotation using the content menu.  I get the following stack:

Code: [Select]
Stack trace written to file: C:\Users\PONTEF~1\AppData\Local\Temp\vsstack.
 Variable element or variable not initialized
annotations.ex 30424 annotations:showFields(
   1:   [0]=0
   p_window_id: 568
   p_object: OI_MINIHTML
   p_name: _note_preview
annotations.ex 4573 annotations:updateAnnotationsBrowser(
   1:   [0]=0
   p_window_id: 196
   p_object: OI_FORM
   p_name: _new_annotation_form
annotations.ex 8737 annotations:importAnnotations((Project Annotations))   p_window_id: 759   p_object: OI_FORM   p_name:
annotations.ex 7065 annotations:importAllAnnotations()   p_window_id: 759   p_object: OI_FORM   p_name:
annotations.ex 37293 _new_annotation_form.on_create()   p_window_id: 759   p_object: OI_FORM   p_name:
dlgeditv.ex 6359 show(-xy -modal _new_annotation_form)   p_window_id: 759   p_object: OI_FORM   p_name:
annotations.ex 7532 new_annotation()   p_window_id: 782   p_object: OI_EDITOR   p_name:

Subsequent attempts to create a code annotation on a different line display the dialog box but neither the Annotation Type or Annotation File have any choosable options.

How do I reset the annotations so that I can add them again please?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6865
  • Hero Points: 528
Re: Unable to create code annotation
« Reply #1 on: March 29, 2021, 12:31:01 PM »
I suspect the problem is in a .sca file. Please post your .sca (annotations file). If the last successful annotation you added was personal and not project/workspace specific, please post your personal.sca file. project and workspace .sca files look like <myproject>_project.sca or <myproject>_workspace.sca.

rjpontefract

  • Senior Community Member
  • Posts: 250
  • Hero Points: 10
Re: Unable to create code annotation
« Reply #2 on: March 29, 2021, 09:41:32 PM »
Hi, I checked the annotation files as requested.  The project annotation file is as follows:
Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<CodeAnnotationData version="1.0" productName="SlickEdit Pro" productVersion="25.0.1.0">
</CodeAnnotationData>

personal.sca has the following:
Code: [Select]
<?xml version="1.0" encoding="utf-8" ?>
<CodeAnnotationData version="1.0" productName="SlickEdit Tools" productVersion="2.0.0">
  <AnnotationDef id="580f3fc2-4747-49a2-8b46-cb500ca28e31" name="Comment" markerColor="-14513374" author="SlickEdit" creationDate="1/31/2007" lastModifiedUser="SlickEdit" lastModifiedDate="1/31/2007" version="1">
    <FieldDef name="Comment" type="Multiline Text Control" index="0">
      <DefaultValue><![CDATA[]]></DefaultValue>
    </FieldDef>
  </AnnotationDef>
  <AnnotationDef id="07546835-9367-4c73-ad6d-9205f9445df1" name="Bug" markerColor="-2818048" author="SlickEdit" creationDate="1/31/2007" lastModifiedUser="SlickEdit" lastModifiedDate="1/31/2007" version="1">
    <FieldDef name="Description" type="Multiline Text Control" index="0">
      <DefaultValue><![CDATA[]]></DefaultValue>
    </FieldDef>
    <FieldDef name="Status" type="Dropdown Control" index="1">
      <PredefinedValue name="OPEN" index="0" />
      <PredefinedValue name="PASSED" index="1" />
      <PredefinedValue name="FAILED" index="2" />
      <PredefinedValue name="DEFERRED" index="3" />
      <PredefinedValue name="NOT A BUG" index="4" />
      <DefaultValue><![CDATA[0]]></DefaultValue>
    </FieldDef>
  </AnnotationDef>
  <AnnotationDef id="895365b3-530b-44a5-a62e-767730b25bc9" name="Review Comment" markerColor="-11534177" author="SlickEdit" creationDate="1/31/2007" lastModifiedUser="SlickEdit" lastModifiedDate="1/31/2007" version="1">
    <FieldDef name="Issue" type="Multiline Text Control" index="0">
      <DefaultValue><![CDATA[]]></DefaultValue>
    </FieldDef>
    <FieldDef name="Resolution" type="Multiline Text Control" index="1">
      <DefaultValue><![CDATA[]]></DefaultValue>
    </FieldDef>
    <FieldDef name="Status" type="Dropdown Control" index="2">
      <PredefinedValue name="OPEN" index="0" />
      <PredefinedValue name="PASSED" index="1" />
      <PredefinedValue name="FAILED" index="2" />
      <PredefinedValue name="DEFERRED" index="3" />
      <PredefinedValue name="NOT A BUG" index="4" />
      <DefaultValue><![CDATA[0]]></DefaultValue>
    </FieldDef>
  </AnnotationDef>
  <AnnotationDef id="f3ee22ce-2305-477d-9732-f23fe7feab94" name="Task" markerColor="-16101890" author="SlickEdit" creationDate="1/31/2007" lastModifiedUser="SlickEdit" lastModifiedDate="1/31/2007" version="1">
    <FieldDef name="Description" type="Multiline Text Control" index="0">
      <DefaultValue><![CDATA[]]></DefaultValue>
    </FieldDef>
    <FieldDef name="Assigned to" type="Multiline Text Control" index="1">
      <DefaultValue><![CDATA[]]></DefaultValue>
    </FieldDef>
    <FieldDef name="Due date" type="Date Control" index="2">
      <DefaultValue><![CDATA[]]></DefaultValue>
    </FieldDef>
    <FieldDef name="Resolved" type="Checkbox Control" index="3">
      <DefaultValue><![CDATA[false]]></DefaultValue>
    </FieldDef>
  </AnnotationDef>
  <AnnotationDef name="Code Snippet" id="D83E3E5F-9EFF-4794-EBBB-FAFC43077A9A" author="SlickEdit" creationDate="8/26/2016" lastModifiedDate="8/26/2016" lastModifiedUser="SlickEdit" version="1">
      <FieldDef name="Summary" type="Text Control" index="0">
          <DefaultValue>
              <![CDATA[]]>
          </DefaultValue>
      </FieldDef>
      <FieldDef name="Comment" type="Multiline Text Control" index="1">
          <DefaultValue>
              <![CDATA[]]>
          </DefaultValue>
      </FieldDef>
      <FieldDef name="Code" type="Multiline Text Control" index="2" ModeName="Auto">
          <DefaultValue>
              <![CDATA[]]>
          </DefaultValue>
      </FieldDef>
  </AnnotationDef>
</CodeAnnotationData>

When I try to create a code annotation, I get the attached dialog with no options for the annotation type and repeated options for the annotation file.

Hope that helps.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6865
  • Hero Points: 528
Re: Unable to create code annotation
« Reply #3 on: March 30, 2021, 03:58:39 PM »
I'm not able to reproduce what you are seeing.

Try a clean config:

vs +new -sc <new-config-dir>

See if you can add annotations in this new config. Then try copying in your personal.sca file into the <new-config-dir>/25.0.1 and see if you can add annotations. Then try opening the project you had open and see if you can add annotations.


Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6865
  • Hero Points: 528
Re: Unable to create code annotation
« Reply #4 on: March 30, 2021, 05:24:23 PM »
Hmm...I seem to have reproduced what you're seeing in my own config. For now, don't bother trying to start a new config. I'll see if I can figure out what's going on.

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: Unable to create code annotation
« Reply #5 on: March 30, 2021, 10:59:31 PM »
I believe this is related to https://community.slickedit.com/index.php/topic,18142.0.html.

I also put in a tweak to some code in the path of that Slick-C stack, so this should be patched up in the next 25.0.1 hot fix.

rjpontefract

  • Senior Community Member
  • Posts: 250
  • Hero Points: 10
Re: Unable to create code annotation
« Reply #6 on: March 31, 2021, 07:40:52 AM »
Thanks Dennis.  Is that the hot fix after number 6?  Any chance of a pre-release as I'm really missing being able to add code annotations?

rjpontefract

  • Senior Community Member
  • Posts: 250
  • Hero Points: 10
Re: Unable to create code annotation
« Reply #7 on: May 20, 2021, 09:01:08 PM »
Is there any update on a fix for this as I'm still unable to add code annotations?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6865
  • Hero Points: 528
Re: Unable to create code annotation
« Reply #8 on: May 21, 2021, 12:51:37 AM »
Download 25.0.2. I'm pretty sure this problem is fixed. 25.0.2 has all the latest hot fixes included.

rjpontefract

  • Senior Community Member
  • Posts: 250
  • Hero Points: 10
Re: Unable to create code annotation
« Reply #9 on: May 21, 2021, 07:35:23 PM »
Thanks! I downloaded 25.0.2 and am happy to say I can create code annotations aga8n.