Skip to content

Changing owner name crashes the application #10924

@LoayGhreeb

Description

@LoayGhreeb

JabRef version

5.12 (latest release)

Operating system

Windows

Details on version and operating system

Windows 11

Checked with the latest development build (copy version output from About dialog)

  • I made a backup of my libraries before testing the latest development version.
  • I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

  1. Go to Preferences.
  2. Navigate to the Entry tab.
  3. Try to change the owner's name.
  4. Save the changes.

image

I tried to figure out why this went wrong, and I found this line that sets filePreferences = null, I want to know why this is important?

EasyBind.listen(ownerPreferences.defaultOwnerProperty(), (obs, oldValue, newValue) -> {
put(DEFAULT_OWNER, newValue);
// trigger re-determination of userAndHost and the dependent preferences
userAndHost = null;
filePreferences = null;
internalPreferences = null;
});

During the saving process, when it saves the preferences of the External file types tab, it changes in the externalFileTypes.

filePreferences.getExternalFileTypes().clear();
filePreferences.getExternalFileTypes().addAll(saveList);

This change will trigger this listener which has filePreferences set to null.

filePreferences.getExternalFileTypes().addListener((SetChangeListener<ExternalFileType>) c ->
put(EXTERNAL_FILE_TYPES, ExternalFileTypes.toStringList(filePreferences.getExternalFileTypes())));

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions