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

rjpontefract

  • Community Member
  • Posts: 87
  • Hero Points: 4
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: 5750
  • Hero Points: 459
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

  • Community Member
  • Posts: 87
  • Hero Points: 4
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: 5750
  • Hero Points: 459
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: 5750
  • Hero Points: 459
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

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3235
  • Hero Points: 460
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

  • Community Member
  • Posts: 87
  • Hero Points: 4
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?