PeterH

Stack dump trying to access circuit for BitCoin_Miner example

6 posts in this topic

I've run several examples now but one that I can't get to work is the Papilio_DUO_BitCoin_Miner example. When I try to load, view or edit the circuit associated with this sketch I get a stack trace in the IDE message area, for example:

Exception in thread "AWT-EventQueue-0" java.lang.StringIndexOutOfBoundsException: String index out of range: -1214	at java.lang.String.substring(Unknown Source)	at processing.app.EditorToolbar.getKeyWord(EditorToolbar.java:520)	at processing.app.EditorToolbar.getLibraryFile(EditorToolbar.java:461)	at processing.app.EditorToolbar.mousePressed(EditorToolbar.java:417)	at java.awt.Component.processMouseEvent(Unknown Source)	at javax.swing.JComponent.processMouseEvent(Unknown Source)	at java.awt.Component.processEvent(Unknown Source)	at java.awt.Container.processEvent(Unknown Source)	at java.awt.Component.dispatchEventImpl(Unknown Source)	at java.awt.Container.dispatchEventImpl(Unknown Source)	at java.awt.Component.dispatchEvent(Unknown Source)	at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)	at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)	at java.awt.Container.dispatchEventImpl(Unknown Source)	at java.awt.Window.dispatchEventImpl(Unknown Source)	at java.awt.Component.dispatchEvent(Unknown Source)	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)	at java.awt.EventQueue.access$200(Unknown Source)	at java.awt.EventQueue$3.run(Unknown Source)	at java.awt.EventQueue$3.run(Unknown Source)	at java.security.AccessController.doPrivileged(Native Method)	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)	at java.awt.EventQueue$4.run(Unknown Source)	at java.awt.EventQueue$4.run(Unknown Source)	at java.security.AccessController.doPrivileged(Native Method)	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)	at java.awt.EventQueue.dispatchEvent(Unknown Source)	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)	at java.awt.EventDispatchThread.run(Unknown Source)

There is a library named BitCoin_Miner containing a circuit subdirectory, and as far as I can see this is what the #define circuit BitCoin_Miner declaration is intended to reference, but for some reason it's not working.

 

I have confirmed that in other examples, if a non-existent circuit is referenced the IDE handles that gracefully. However, for the Papilio_DUO_BitCoin_Miner example, if I change the sketch to reference a non-existent circuit this still throws an exception. I suspect there's something wrong with the structure of the Papilio_DUO_BitCoin_Miner example which is breaking the IDE's circuit-processing logic.

 

Has anyone alse managed to open this example in the IDE and Load, View or Edit the circuit?

Share this post


Link to post
Share on other sites

Hey PeterH,

 

It's looking for a newline, just put an extra line after the #define circuit line and it should work. I'll make a fix for this bug in the next release.

 

Jack.

Share this post


Link to post
Share on other sites

I too am trying to get this example to work.  It seems there are several Python files that are necessary that I can't seem to locate.  Is there a target version of Python that I should be using that have these libraries?  Or, are these Python libraries available anywhere for me to add to the project?

Thanks to all who can answer

Share this post


Link to post
Share on other sites

I found the files.  They didn't copy over to the sketch folder automatically.  They needed to be manually copied over from the Designlab folder and installed.  It is also useful to make note that Python 2.7 is required.  Version 3.6 didn't work, i installed 2.7.14 and it worked nicely.

 

 

Share this post


Link to post
Share on other sites

This type of project would be a great candidate to get setup with Docker/Codenvy so all the files are in place and ready to go for people...

Jack.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now