LibraryOfCongress / bagger

The Bagger application packages data files according to the BagIt specification.
Other
120 stars 19 forks source link

Unexplained error message #53

Closed jamiepb closed 6 years ago

jamiepb commented 6 years ago

Hello,

I have run into an error multiple times over the past few days trying to save a bag. I get through the steps of creating a bag, hitting save as and filling in the location, but then when I try to save I get the error "The application experienced an unexpected bug, due to a programming error. The application is possibly in an inconsistent state. It is recommended to reboot the application. The exact bug is: Please report this bug." I am using Bagger 2.8.1 on Windows 7 Enterprise. The first few times it happened I had an older version of Bagger on my computer too and I wonder if that may have something to do with it? Log and screenshot attached.

Thank you.

Jamie Bagger_error_log_04272018.txt bagger_error_04272018

johnscancella commented 6 years ago

Hi Jamie,

Thanks for submitting this. Unfortunately I don't have enough information to recreate the issue, which means that I can't fix the issue. Could you please include all steps that you are doing? Thanks!

jo1525085251 commented 6 years ago

I got the same too, until I made sure that, when using the "Save Bag As" dialog box (i.e. after I hit Browse in the "Save Bag" dialog box), I typed a name for the bag itself. image

That made the "Save Bag" dialog "Save in:" field get populated and resulted in a successful save.

image

When I looked at the error and the java code SaveBagHandler line 264 -

java.lang.NullPointerException: null
        at gov.loc.repository.bagger.ui.handlers.SaveBagHandler.save(SaveBagHand
ler.java:264) ~[bagger-2.8.1.jar:na]

it seems that the line 264 "bag.setName(file.getName());" tries to set the bag name with a NULL and hence errors (I am guessing a bit - I haven't single stepped through the code). So if you don't put a bagname in to the dialog box as I mentioned above, you get an error.

Hope that helps

Jo

PS - thus solely filling in the location manually (i.e. filling in the "Save in:" field, without going through the Browse button to populate it) appears not to work. If that is the case, we could ask for it to be greyed out/read only? Just an idea.

jamiepb commented 6 years ago

Jo,

Thank you for the suggestion. That appears to have been the problem. In in the past I must not have paid much attention to whether I was typing in the "Save in" field or the "Save Bag As" window, but I followed your directions to type in the "Save Bag As" window and was successful. I think it would be helpful to make it clear to users that they should click the "Browse" button and not just fill in the "Save in" field. I will be sure to clarify this step in my institution's documentation!

Jamie

johnscancella commented 6 years ago

@jamiepb and @jo1525085251 I still can't reproduce your error since you have yet to give me step by step instructions. I tried to just select a folder but it forces me to fill in the name of the bag.

@jo1525085251 as for your suggestion that is a bug and has been submitted as https://github.com/LibraryOfCongress/bagger/issues/54

jo1525085251 commented 6 years ago

Sorry - I didn't check until just now and I should have put in "step by step" instructions. Looking further you seemed to have done this already in bug https://github.com/LibraryOfCongress/bagger/issues/54 so I guess you don't want me to do this now? (Happy to if you want - but basically I did what you did in bug https://github.com/LibraryOfCongress/bagger/issues/54 - just let me know).

And, for completeness, this was the case in Rhel Linux 7.5, openjdk version "1.8.0_161", Bagger 2.8.1 and Windows 10 64bit Enterprise, Java 1.8.0_171-b11, Bagger 2.8.1.

Cheers

Jo