nicho92 / MtgDesktopCompanion

Cards manager for magic the gathering
Apache License 2.0
165 stars 35 forks source link

imported card via Manual Plugin crashed stock view #239

Closed shithead closed 2 years ago

shithead commented 2 years ago

Configuration

Describe the bug I had import circa 4k different cards into MtgCompanion as Stock via Manuale Plugin. I got NB cards and Card name, if i try to open Stock view i get

2022-09-27 13:53:13 ERROR org.magic.gui.StockPanelGUI$8 102 - error
java.util.concurrent.ExecutionException: java.lang.NullPointerException: Cannot invoke "org.magic.api.beans.MagicCard.getCurrentSet()" because "c" is null
    at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:?]
    at java.util.concurrent.FutureTask.get(FutureTask.java:191) ~[?:?]
    at javax.swing.SwingWorker.get(SwingWorker.java:613) ~[?:?]
    at org.magic.services.workers.AbstractObservableWorker.done(AbstractObservableWorker.java:81) ~[magic-api-2.36.jar:?]
    at javax.swing.SwingWorker$5.run(SwingWorker.java:750) ~[?:?]
    at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:848) ~[?:?]
    at sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112) ~[?:?]
    at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:858) ~[?:?]
    at javax.swing.Timer.fireActionPerformed(Timer.java:311) ~[?:?]
    at javax.swing.Timer$DoPostEvent.run(Timer.java:243) ~[?:?]
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) ~[?:?]
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:771) ~[?:?]
    at java.awt.EventQueue$4.run(EventQueue.java:722) ~[?:?]
    at java.awt.EventQueue$4.run(EventQueue.java:716) ~[?:?]
    at java.security.AccessController.doPrivileged(AccessController.java:399) ~[?:?]
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) ~[?:?]
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:741) ~[?:?]
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) ~[?:?]
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) ~[?:?]
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) ~[?:?]
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) ~[?:?]
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) ~[?:?]
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:90) ~[?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "org.magic.api.beans.MagicCard.getCurrentSet()" because "c" is null
    at org.magic.api.beans.MagicCardStock.setProduct(MagicCardStock.java:27) ~[magic-api-2.36.jar:?]
    at org.magic.api.beans.MagicCardStock.<init>(MagicCardStock.java:15) ~[magic-api-2.36.jar:?]
    at org.magic.api.interfaces.abstracts.extra.AbstractMagicSQLDAO.readStock(AbstractMagicSQLDAO.java:2240) ~[magic-api-2.36.jar:?]
    at org.magic.api.interfaces.abstracts.extra.AbstractMagicSQLDAO.listStocks(AbstractMagicSQLDAO.java:1746) ~[magic-api-2.36.jar:?]
    at org.magic.gui.StockPanelGUI$8.doInBackground(StockPanelGUI.java:820) ~[magic-api-2.36.jar:?]
    at org.magic.gui.StockPanelGUI$8.doInBackground(StockPanelGUI.java:816) ~[magic-api-2.36.jar:?]
    at javax.swing.SwingWorker$1.call(SwingWorker.java:304) ~[?:?]
    at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
    at javax.swing.SwingWorker.run(SwingWorker.java:343) ~[?:?]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
    at java.lang.Thread.run(Thread.java:833) ~[?:?]
2022-09-27 13:53:13 ERROR org.magic.services.MTGControler 473 - error
java.util.concurrent.ExecutionException: java.lang.NullPointerException: Cannot invoke "org.magic.api.beans.MagicCard.getCurrentSet()" because "c" is null
    at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:?]
    at java.util.concurrent.FutureTask.get(FutureTask.java:191) ~[?:?]
    at javax.swing.SwingWorker.get(SwingWorker.java:613) ~[?:?]
    at org.magic.services.workers.AbstractObservableWorker.done(AbstractObservableWorker.java:81) ~[magic-api-2.36.jar:?]
    at javax.swing.SwingWorker$5.run(SwingWorker.java:750) ~[?:?]
    at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:848) ~[?:?]
    at sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112) ~[?:?]
    at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:858) ~[?:?]
    at javax.swing.Timer.fireActionPerformed(Timer.java:311) ~[?:?]
    at javax.swing.Timer$DoPostEvent.run(Timer.java:243) ~[?:?]
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) ~[?:?]
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:771) ~[?:?]
    at java.awt.EventQueue$4.run(EventQueue.java:722) ~[?:?]
    at java.awt.EventQueue$4.run(EventQueue.java:716) ~[?:?]
    at java.security.AccessController.doPrivileged(AccessController.java:399) ~[?:?]
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) ~[?:?]
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:741) ~[?:?]
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) ~[?:?]
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) ~[?:?]
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) ~[?:?]
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) ~[?:?]
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) ~[?:?]
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:90) ~[?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "org.magic.api.beans.MagicCard.getCurrentSet()" because "c" is null
    at org.magic.api.beans.MagicCardStock.setProduct(MagicCardStock.java:27) ~[magic-api-2.36.jar:?]
    at org.magic.api.beans.MagicCardStock.<init>(MagicCardStock.java:15) ~[magic-api-2.36.jar:?]
    at org.magic.api.interfaces.abstracts.extra.AbstractMagicSQLDAO.readStock(AbstractMagicSQLDAO.java:2240) ~[magic-api-2.36.jar:?]
    at org.magic.api.interfaces.abstracts.extra.AbstractMagicSQLDAO.listStocks(AbstractMagicSQLDAO.java:1746) ~[magic-api-2.36.jar:?]
    at org.magic.gui.StockPanelGUI$8.doInBackground(StockPanelGUI.java:820) ~[magic-api-2.36.jar:?]
    at org.magic.gui.StockPanelGUI$8.doInBackground(StockPanelGUI.java:816) ~[magic-api-2.36.jar:?]
    at javax.swing.SwingWorker$1.call(SwingWorker.java:304) ~[?:?]
    at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
    at javax.swing.SwingWorker.run(SwingWorker.java:343) ~[?:?]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
    at java.lang.Thread.run(Thread.java:833) ~[?:?]

It is right i never set the Edition, but it was not required.

I'm not mention why not card is incoming.