This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 270306 - AssertionError: Invalid start:0 end:-1
Summary: AssertionError: Invalid start:0 end:-1
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: Dev
Hardware: All All
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-05 12:13 UTC by dusty
Modified: 2017-04-05 12:13 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 224568


Attachments
stacktrace (5.45 KB, text/plain)
2017-04-05 12:13 UTC, dusty
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dusty 2017-04-05 12:13:27 UTC
Build: NetBeans IDE Dev (Build 201703210002)
VM: OpenJDK 64-Bit Server VM, 25.121-b13, OpenJDK Runtime Environment, 1.8.0_121-8u121-b13-0ubuntu1.16.10.2-b13
OS: Linux

User Comments:
Dusty: Inserting a comment into a .js file

GUEST: Attempt to generate documentation to function:

..code-block:: javascript

  var Reporter = function(options) {
      toastr.options = jQuery.extend({}, this.defaults, options || {});
  };

Exception occured after input ``/**`` and press Enter key.

GUEST: Trying to insert automatic documenation ( /** {tab} ) for a javascript class.

GUEST: typing /** <return>

GUEST: started adding comments
1) typed:
/* 
2) (Enter)

3) comment auto completed to 
/*
 * 
*/
4) Exception thrown

romanet: Typed in editor:

/* + Enter 

/*  <--here 
 * 
 */
const HashAlias = {
    "$.audioObject": "$.downloadContent.audioDescription.#",
    "$.subtitleObject": "$.downloadContent.subtitleDescription.#",
    "$.billingPackage.": "$.content.billingPackage.#.",
    "$.contentEncodings.": "$.content.contentEncodings.#."
};




Stacktrace: 
java.lang.AssertionError: Invalid start:0 end:-1
   at org.netbeans.modules.csl.api.OffsetRange.<init>(OffsetRange.java:66)
   at org.netbeans.modules.javascript2.model.JsElementImpl.getOffsetRange(JsElementImpl.java:174)
   at org.netbeans.modules.javascript2.editor.doc.JsDocumentationCompleter.getWrapperScope(JsDocumentationCompleter.java:188)
   at org.netbeans.modules.javascript2.editor.doc.JsDocumentationCompleter.access$400(JsDocumentationCompleter.java:91)
   at org.netbeans.modules.javascript2.editor.doc.JsDocumentationCompleter$DocumentationGenerator$1.run(JsDocumentationCompleter.java:146)
   at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:609)
Comment 1 dusty 2017-04-05 12:13:29 UTC
Created attachment 164033 [details]
stacktrace