nvdweem / intellij-sqlserver-backup-restore

Plugin for Intellij that allows backing up and restoring databases in SQL Server
MIT License
14 stars 3 forks source link

java.lang.NullPointerException when trying to open the dialog to select the .bak file to be restored #48

Open sandynicot opened 6 days ago

sandynicot commented 6 days ago

Describe the bug: A java.lang.NullPointerException is thrown when trying to open the dialog to select the .bak file to be restored

Steps to reproduce: Right click on the DB -> Backup and Restore -> Restore. It does not show the dialog to select the DB file to be restored and throws an exception

Expected behavior: Right click on the DB -> Backup and Restore -> Restore. It should show the dialog to select the DB file to be restored

Additional context: Datagrip v2024.3 SQL Server Backup and Restore v1.0.7

Exception thrown

java.lang.NullPointerException
    at java.base/java.util.Objects.requireNonNull(Objects.java:233)
    at java.base/java.util.ImmutableCollections$SetN.contains(ImmutableCollections.java:944)
    at java.base/java.util.AbstractCollection.containsAll(AbstractCollection.java:311)
    at com.intellij.openapi.fileChooser.ex.FileChooserDialogImpl.selectInTree(FileChooserDialogImpl.java:620)
    at com.intellij.openapi.fileChooser.ex.FileChooserDialogImpl.choose(FileChooserDialogImpl.java:123)
    at dev.niels.sqlbackuprestore.ui.filedialog.FileDialog.loadFile(FileDialog.java:75)
    at dev.niels.sqlbackuprestore.ui.filedialog.FileDialog.choose(FileDialog.java:61)
    at dev.niels.sqlbackuprestore.ui.filedialog.FileDialog.chooseFiles(FileDialog.java:42)
    at dev.niels.sqlbackuprestore.action.Restore.lambda$actionPerformed$0(Restore.java:69)
    at dev.niels.sqlbackuprestore.action.Restore.lambda$invokeAndWait$12(Restore.java:172)
    at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:236)
    at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:25)
    at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:198)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runIntendedWriteActionOnCurrentThread$lambda$2(AnyThreadWriteThreadingSupport.kt:217)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:128)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runIntendedWriteActionOnCurrentThread(AnyThreadWriteThreadingSupport.kt:216)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:842)
    at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:421)
    at com.intellij.util.concurrency.ChildContext$runInChildContext$1.invoke(propagation.kt:101)
    at com.intellij.util.concurrency.ChildContext$runInChildContext$1.invoke(propagation.kt:101)
    at com.intellij.util.concurrency.ChildContext.runInChildContext(propagation.kt:107)
    at com.intellij.util.concurrency.ChildContext.runInChildContext(propagation.kt:101)
    at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:27)
    at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:117)
    at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:43)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:781)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:728)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:750)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:675)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:573)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18$lambda$17$lambda$16$lambda$15(IdeEventQueue.kt:355)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:857)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18$lambda$17$lambda$16(IdeEventQueue.kt:354)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$2$lambda$1(IdeEventQueue.kt:1045)
    at com.intellij.openapi.application.WriteIntentReadAction.lambda$run$0(WriteIntentReadAction.java:24)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:128)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteIntentReadAction(ApplicationImpl.java:916)
    at com.intellij.openapi.application.WriteIntentReadAction.compute(WriteIntentReadAction.java:55)
    at com.intellij.openapi.application.WriteIntentReadAction.run(WriteIntentReadAction.java:23)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$2(IdeEventQueue.kt:1045)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$3(IdeEventQueue.kt:1054)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:109)
    at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1054)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18(IdeEventQueue.kt:349)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:395)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
nvdweem commented 5 days ago

A new version was released and almost immediately approved. Can you check if the v1.0.8 fixes your issue?

sandynicot commented 4 days ago

It worked after the update to v1.0.8. Thank you very much

On Wed, Nov 20, 2024 at 3:21 PM Niels van de Weem @.***> wrote:

A new version was released and almost immediately approved. Can you check if the v1.0.8 fixes your issue?

— Reply to this email directly, view it on GitHub https://github.com/nvdweem/intellij-sqlserver-backup-restore/issues/48#issuecomment-2489472294, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGKDRKUUBDUZZT7VSSDVIYT2BTVLXAVCNFSM6AAAAABSDEMNY6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOBZGQ3TEMRZGQ . You are receiving this because you are subscribed to this thread.Message ID: @.*** .com>