Mathview setText causing java.lang.StringIndexOutOfBoundsException
See original GitHub issueThis 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:
- Created 6 years ago
- Reactions:2
- Comments:6

Top Related StackOverflow Question
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