BookmapAPI / python-api

Create Bookmap addons using Python
MIT License
54 stars 6 forks source link

rsyntaxtextarea exception when building python bookmap example #1

Closed githubgituser closed 1 year ago

githubgituser commented 1 year ago

when I open the mbo_test,py in the embedded python api, I get the following exception and the api is disabled:

java.lang.NullPointerException: Cannot invoke "org.fife.ui.rsyntaxtextarea.folding.Fold.setEndOffset(int)" because "" is null at org.fife.ui.rsyntaxtextarea.folding.PythonFoldParser.getFolds(SourceFile:87) at org.fife.ui.rsyntaxtextarea.folding.DefaultFoldManager.reparse(SourceFile:445) at org.fife.ui.rsyntaxtextarea.folding.DefaultFoldManager$1.parse(SourceFile:477) at org.fife.ui.rsyntaxtextarea.ParserManager.actionPerformed(SourceFile:163) at java.desktop/javax.swing.Timer.fireActionPerformed(Timer.java:311) at java.desktop/javax.swing.Timer$DoPostEvent.run(Timer.java:243) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:771) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:741) at velox.ib.N.dispatchEvent(SourceFile:73) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Sometimes I can open it, but the exception comes later typically when build is selected. I did not get the exception with the hello_world.py example

library: python-api-0.0.3.jar python version: 3.10.8 (older version same issue) bookmap: 7.3.0 build 42

related issue: https://github.com/skylot/jadx/issues/1476

nyckyta commented 1 year ago

Hello.

Thank you for the report. I believe I had this issue previously. Try the version from this link. It points to the latest version of the addon. I believe this version should work just fine.

Btw, I updated link in the doc. I see that it pointed to an old version. Thank you for the reminding.

nyckyta commented 1 year ago

I will close it, let me know if you have any other issue.