Papilio loader: Null-pointer


Recommended Posts

For some reason I can no longer use papilio loader. I get this:

 

com.sun.java.swing.plaf.windows.WindowsLookAndFeel
-- listing properties --
java.runtime.name=Java(TM) SE Runtime Environment
sun.boot.library.path=C:\Program Files (x86)\Java\jre1.8.0_...
java.vm.version=25.111-b14
java.vm.vendor=Oracle Corporation
java.vendor.url=http://java.oracle.com/
path.separator=;
java.vm.name=Java HotSpot(TM) Client VM
file.encoding.pkg=sun.io
user.script=
user.country=US
sun.java.launcher=SUN_STANDARD
sun.os.patch.level=Service Pack 1
java.vm.specification.name=Java Virtual Machine Specification
user.dir=C:\Program Files (x86)\Gadget Factory...
java.runtime.version=1.8.0_111-b14
java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment
java.endorsed.dirs=C:\Program Files (x86)\Java\jre1.8.0_...
os.arch=x86
java.io.tmpdir=C:\Users\Carlos\AppData\Local\Temp\
line.separator=

java.vm.specification.vendor=Oracle Corporation
user.variant=
os.name=Windows 7
sun.jnu.encoding=Cp1252
java.library.path=C:\ProgramData\Oracle\Java\javapath;C...
sun.awt.enableExtraMouseButtons=true
java.specification.name=Java Platform API Specification
java.class.version=52.0
sun.management.compiler=HotSpot Client Compiler
os.version=6.1
user.home=C:\Users\Carlos
user.timezone=
java.awt.printerjob=sun.awt.windows.WPrinterJob
file.encoding=Cp1252
java.specification.version=1.8
user.name=Carlos
java.class.path=papilio-loader.jar
java.vm.specification.version=1.8
sun.arch.data.model=32
java.home=C:\Program Files (x86)\Java\jre1.8.0_111
sun.java.command=papilio-loader.jar
java.specification.vendor=Oracle Corporation
user.language=en
awt.toolkit=sun.awt.windows.WToolkit
java.vm.info=mixed mode

java.version=1.8.0_111
java.ext.dirs=C:\Program Files (x86)\Java\jre1.8.0_...
sun.boot.class.path=C:\Program Files (x86)\Java\jre1.8.0_...
sun.stderr.encoding=cp437
java.vendor=Oracle Corporation
file.separator=\
java.vendor.url.bug=http://bugreport.sun.com/bugreport/
sun.cpu.endian=little
sun.io.unicode.encoding=UnicodeLittle
sun.stdout.encoding=cp437
sun.desktop=windows
sun.cpu.isalist=pentium_pro+mmx pentium_pro pentium+m...
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at net.gadgetfactory.papilio.loader.TargetPanel.PopulateLastFiles(Target
Panel.java:442)
        at net.gadgetfactory.papilio.loader.PapilioLoader.PopulateProject(Papili
oLoader.java:1068)
        at net.gadgetfactory.papilio.loader.PapilioLoader.<init>(PapilioLoader.j
ava:358)
        at net.gadgetfactory.papilio.loader.PapilioLoader$1.run(PapilioLoader.ja
va:180)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$500(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$JavaSecurityAccessImpl.doIntersectionP
rivilege(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)
 

Link to comment
Share on other sites

Any ideas on this? I can use the command line (papilio-prog.exe) but it is way less convenient than the GUI. Thanks!

This is the culprit. I don't know enough Java to fix this myself, though.

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at net.gadgetfactory.papilio.loader.TargetPanel.PopulateLastFiles(TargetPanel.java:442)

 

Link to comment
Share on other sites

  • 2 weeks later...

@cmantunes

were you in simple mode or something and the UI crashed at one time?

 

 

@Jack, as you know, i really dont like JAVA, and am really rubbish in it, but

in :: TargetPanel.java

looks like the problem could be in 

    public void StoreLastFiles(Properties settings) {
        settings.setProperty("LastBitFile", txtQBitFile.getText().trim());
        if (!bSimpleMode){
            settings.setProperty("LastBmmFile", txtQBmmFile.getText().trim());
            settings.setProperty("LastHexFile", txtQHexFile.getText().trim());
        }
    }


you could try instead of

 

    public void PopulateLastFiles(String lastBitFile, String lastBmmFile, String lastHexFile) {
        txtQBitFile.setText(lastBitFile);
        txtQBmmFile.setText(lastBmmFile);
        txtQHexFile.setText(lastHexFile);
    }


    


to

    public void PopulateLastFiles(String lastBitFile, String lastBmmFile, String lastHexFile) {
        txtQBitFile.setText(lastBitFile);
        if (!bSimpleMode){
            txtQBmmFile.setText(lastBmmFile);
            txtQHexFile.setText(lastHexFile);
        } else {
            /*  not sure what safe defaults would be */
            txtQBmmFile.setText(" ");
            txtQHexFile.setText(" ");
        }
    }


OR

 

    public void PopulateLastFiles(String lastBitFile, String lastBmmFile, String lastHexFile) {
        if (lastBitFile) {
            txtQBitFile.setText(lastBitFile);
        } else {
            txtQBitFile.setText(" ");    /*  not sure what safe defaults would be */
        }
        if (lastBmmFile) {
            txtQBmmFile.setText(lastBmmFile);
        } else {
            txtQBmmFile.setText(" ");    /*  not sure what safe defaults would be */
        }

        if (lastHexFile) {
            txtQHexFile.setText(lastHexFile);
        } else {
            txtQHexFile.setText(" ");    /*  not sure what safe defaults would be */
        }
    }

 

 

You could probably even just not do the } else { part and just 

if (blah) { txtBlah.setText(blah); }  

OR

you could patch StoreLastFiles to always write defaults regardless of bSimpleMode

not sure whats the better option....
 

Link to comment
Share on other sites

  • 2 weeks later...
  • 8 months later...
On 11/21/2016 at 7:16 PM, Jack Gassett said:

That would be nice. :) Maybe he will be able to reply again. Things are still pretty hectic here...

Jack.

If got to same trouble in Windows (usually nothing happens when you try to run papilio-loader) go to c:\Users\..user_name..\AppData\Roaming\ and delete papilio-loader content preference file. Don't forget to end Java bin processes  in Task Manager before running papilio-loader again.

Link to comment
Share on other sites

  • 7 months later...

Hello. I just wanted to note that this is still an issue, and not easily googleable. It'd be nice if a fix could be implemented :)

I had to help a friend get the loader to run again.

Friend is running:
Latest windows 10

ISE 14.7 webpack for windows 7, with dll fix to work on windows 10.


We opened CMD, entered the directory of papilio loader, ran:
 

java -jar papilio-loader.jar "programmer/bscan_spi_xc6slx9.bit"

 

This opened papilio loader as it should. Then we opened preferences, and unchecked the "load last bitfile" option, and now it works as expected.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.