question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mathview setText causing java.lang.StringIndexOutOfBoundsException

See original GitHub issue

This is the value that i try to set in mathview

(\ N_{0}/2 ) atoms of X(g) are converted into (\ X^{+}(g) ) by energy (\ E_{1} ). (\ N_{0}/2 ) atoms of X(g) are converted into (\ X^{-}(g) ) by energy (\ E_{2} ). Hence, ionisation potential and electron affinity of X (g) are

This causes an exception

java.lang.StringIndexOutOfBoundsException: length=0; index=0 at java.lang.String.charAt(Native Method) at com.x5.template.providers.TemplateProvider.parseEmbeddedExtension(TemplateProvider.java:117) at com.x5.template.providers.TemplateProvider.resourceName(TemplateProvider.java:91) at com.x5.template.providers.TemplateProvider.loadItemDoc(TemplateProvider.java:80) at com.x5.template.providers.TemplateProvider.getSnippet(TemplateProvider.java:43) at com.x5.template.providers.TemplateProvider.provides(TemplateProvider.java:29) at com.x5.template.Theme.getSnippet(Theme.java:194) at com.x5.template.Chunk.altFetch(Chunk.java:955) at com.x5.template.Chunk.altFetch(Chunk.java:858) at com.x5.template.Chunk._resolveTagValue(Chunk.java:1038) at com.x5.template.Chunk.resolveTagValue(Chunk.java:1009) at com.x5.template.SnippetTag.render(SnippetTag.java:43) at com.x5.template.Snippet.render(Snippet.java:843) at com.x5.template.SnippetTag.render(SnippetTag.java:50) at com.x5.template.Snippet.render(Snippet.java:843) at com.x5.template.Chunk.explodeToPrinter(Chunk.java:728) at com.x5.template.Chunk.renderForParentToPrinter(Chunk.java:689) at com.x5.template.Chunk.explodeForParentToPrinter(Chunk.java:681) at com.x5.template.Chunk.render(Chunk.java:643) at com.x5.template.Chunk.toString(Chunk.java:612) at io.github.kexanie.library.MathView.setText(MathView.java:69)

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:2
  • Comments:6

github_iconTop GitHub Comments

4reactions
donpeter06commented, Mar 27, 2017

Looks like MathView is not capable of parsing X^{+}. this part is actually causing the crash

0reactions
techbhaskarcommented, Mar 21, 2019

Looks like MathView is not capable of parsing X^{+}. this part is actually causing the crash

You saved alot of time for me , Thank u so much

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unsupported LaTex causing StringIndexOutOfBoundsException
Java code: ((MathView) lloption.findViewById(R.id.math0)).setText(txt);. I tried other LaTex equations. They are working perfectly.
Read more >
StringIndexOutOfBoundsException Class (Java.Lang)
Constructs a new StringIndexOutOfBoundsException class with an argument indicating the illegal index. A constructor used when creating managed representations ...
Read more >
JDK-4116436 StringIndexOutOfBoundsException with ... - Bug ID
Press any key and you will get a java.lang.StringIndexOutOfBoundsException. Dragging the mouse button anywhere over the text area will stop the exception ...
Read more >
StringIndexOutOfBoundsException: length=0; index=-1
It gives me an "java.lang.StringIndexOutOfBoundsException: length=0; index=-1". Someone know how to fix it? ... setText(calculation + "+" );.
Read more >
StringIndexOutOfBoundsException (Java Platform SE 8 )
Constructs a StringIndexOutOfBoundsException with the specified detail message. Method Summary. Methods inherited from class java.lang.Throwable · addSuppressed ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found