Skip to content

NegativeArraySizeException when editing and saving a @Reference entry #8231

@AlbertJBurton

Description

@AlbertJBurton

JabRef version

5.3 (latest release)

Operating system

Windows

Details on version and operating system

Microsoft Windows 10 Enterprise

Checked with the latest development build

  • 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. Create a bib file with the single entry listed below.
  2. Edit any field (e.g. add NY to the location field).
  3. Click the save library button or menu item.
  4. Get the unhandled exception listed in the log file.

@reference{Broecker1984,
title = {International Center of Photography},
subtitle = {Encyclopedia of Photography},
editor = {Broecker, William L.},
date = {1984},
eprint = {305515791},
eprinttype = {scribd},
isbn = {0-517-55271-X},
keywords = {g:photography, p:positive, c:silver, m:albumen, c:pigment, m:carbon, g:reference, c:encyclopedia},
location = {New York},
pagetotal = {678},
publisher = {Crown},
}

NOTE: Changing the entry type to @book resolves the issue and the bib entry can be edited and the library saved without problems.

Appendix

...

Log File

java.lang.NegativeArraySizeException: -1
at java.base/java.lang.AbstractStringBuilder.(Unknown Source)
at java.base/java.lang.StringBuilder.(Unknown Source)
at [email protected]/org.jabref.model.strings.StringUtil.repeat(Unknown Source)
at [email protected]/org.jabref.model.strings.StringUtil.repeatSpaces(Unknown Source)
at [email protected]/org.jabref.logic.bibtex.BibEntryWriter.getFormattedFieldName(Unknown Source)
at [email protected]/org.jabref.logic.bibtex.BibEntryWriter.writeField(Unknown Source)
at [email protected]/org.jabref.logic.bibtex.BibEntryWriter.writeRequiredFieldsFirstRemainingFieldsSecond(Unknown Source)
at [email protected]/org.jabref.logic.bibtex.BibEntryWriter.write(Unknown Source)
at [email protected]/org.jabref.logic.exporter.BibtexDatabaseWriter.writeEntry(Unknown Source)
at [email protected]/org.jabref.logic.exporter.BibDatabaseWriter.savePartOfDatabase(Unknown Source)
at [email protected]/org.jabref.logic.exporter.BibDatabaseWriter.saveDatabase(Unknown Source)
at [email protected]/org.jabref.gui.exporter.SaveDatabaseAction.saveDatabase(Unknown Source)
at [email protected]/org.jabref.gui.exporter.SaveDatabaseAction.save(Unknown Source)
at [email protected]/org.jabref.gui.exporter.SaveDatabaseAction.save(Unknown Source)
at [email protected]/org.jabref.gui.exporter.SaveDatabaseAction.save(Unknown Source)
at [email protected]/org.jabref.gui.exporter.SaveAction.execute(Unknown Source)
at [email protected]/org.jabref.gui.actions.JabRefAction.lambda$new$3(Unknown Source)
at [email protected]/org.controlsfx.control.action.Action.handle(Unknown Source)
at [email protected]/org.controlsfx.control.action.Action.handle(Unknown Source)
at [email protected]/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
at [email protected]/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
at [email protected]/javafx.event.Event.fireEvent(Unknown Source)
at [email protected]/javafx.scene.Node.fireEvent(Unknown Source)
at [email protected]/javafx.scene.control.Button.fire(Unknown Source)
at [email protected]/com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(Unknown Source)
at [email protected]/com.sun.javafx.scene.control.inputmap.InputMap.handle(Unknown Source)
at [email protected]/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
at [email protected]/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
at [email protected]/javafx.event.Event.fireEvent(Unknown Source)
at [email protected]/javafx.scene.Scene$MouseHandler.process(Unknown Source)
at [email protected]/javafx.scene.Scene.processMouseEvent(Unknown Source)
at [email protected]/javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(Unknown Source)
at [email protected]/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source)
at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source)
at [email protected]/com.sun.glass.ui.View.handleMouseEvent(Unknown Source)
at [email protected]/com.sun.glass.ui.View.notifyMouse(Unknown Source)
at [email protected]/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at [email protected]/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions