Jabref: Accentuation is not working ~^'`" (eg. ã ô é à ü)

Created on 20 Jul 2017  ·  34Comments  ·  Source: JabRef/jabref

OS: Xubuntu 17.04
Computer keyboard map: Brazilian ABNT2
Java version:
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-0ubuntu1.17.04.1-b11)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)

JabRef version: JabRef-4.0-dev--snapshot--2017-07-19--master--2f12fecfb.jar

I can't insert (only) these accentuated character (comma separated) : ~, ^, `, ', "
Because of this, I can't make these letters: à, á, ã, â, ô, ó, ò, é, ê, ü, etc.
I can't insert these on Fields or Biblatex source tabs;
(Edit to reduce ambiguity) Inserting others special characters works ok: $, %, &, *, (, º

entry-editor waiting-for-customer-feedback bug 🐛

All 34 comments

I've tried this with the current master branch on Win7. Everything works as expected, I can enter whatever characters I wish.

Is anyone able to reproduce this?

Maybe related to this compose key stuff?

Am 20.07.2017 9:56 vorm. schrieb "Jörg Lenhard" notifications@github.com:

I've tried this with the current master branch on Win7. Everything works
as expected, I can enter whatever characters I wish.

Is anyone able to reproduce this?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/JabRef/jabref/issues/3028#issuecomment-316626765, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AATi5FGJ-mZRKZhkfcYuFIj1BUNrFC2pks5sPwgcgaJpZM4Odg7R
.

On JabRef 3.8.2 at the same system I don't face this problem.

Cannot confirm for:
JabRef 4.0-dev--snapshot--2017-07-19--master--2f12fecfb
Windows 10 10.0 amd64
Java 1.8.0_141

Tested on another computer with a different keyboard. Its a Chromebook with GalliumOS (Ubuntu 16.04) and openjdk version "1.8.0_131". The same problem.

Can confirm on my Ubuntu 16.04 VM with oracle jdk 131, language setting en_gb m
Seems to be related to all kind of javafx fields inside swing, entering the text in pure Swing works.

@kafran Could you check the event log, if you get the same error as I?

Edit//The only workaround I actually see is to type the characters elsewhere and copy&paste them inside the form.

Opening: /home/osboxes/test
Opening: /home/osboxes/Documents/JABREFTEMP/references.bib
Uncaught exception Occurred in Thread[AWT-EventQueue-0,6,main]

java.lang.NullPointerException
    at javafx.embed.swing.JFXPanel.sendInputMethodEventToFX(JFXPanel.java:647)
    at javafx.embed.swing.JFXPanel.processInputMethodEvent(JFXPanel.java:635)
    at java.awt.Component.processEvent(Component.java:6315)
    at java.awt.Container.processEvent(Container.java:2236)
    at java.awt.Component.dispatchEventImpl(Component.java:4889)
    at java.awt.Container.dispatchEventImpl(Container.java:2294)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.awt.EventQueue$4.run(EventQueue.java:729)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

It seems that there have been problems like this for linux before: https://bugs.openjdk.java.net/browse/JDK-8123617

If this is down to the system environment (as the log from @Siedlerchr seems to indicate, there's only system classes in the stack trace) then I don't know what we can do from the side of JabRef.

I will try if I can reproduce this on a minimal application

On 4.0-beta1 this doesn't exist.

Yes, its the same bug. We should close this one and keep the other one. Sorry, I searched to see if someone already posted about this and didn't find anything. Thanks.

Okay, I tested it with a small MWE and it's definitely a bug of javafx/swing integration framework side,
Will test again with the latest jdk version and then file a bug report.
MWE to reproduce:
https://gist.github.com/Siedlerchr/26e168867b108ccb9ea1152874f3cc91

Okay, I have submitted a bug report to Oracle. Unfortunately we can't do anything at the moment and just wait for a solution. A workaround is to type the characters elsewhere and copy/paste them into the textfield.

@Siedlerchr Thank you very much for your effort! Do you have a link to the report, so that we can track it here?

Also, does it make sense to submit a bug report to OpenJDK as well (since the issue occurs there too)?

Edit//:
Once the submitted report is reviewed and moved across to the JDK Project in the Java Bug System (JBS), you will receive a bug reference number which resembles JDK-XXXXXXX. You can search for the bug using either JDK ID or Keywords through either http://bugs.java.com/ or https://bugs.openjdk.java.net.

Am 21.07.2017 5:36 nachm. schrieb "Jörg Lenhard" notifications@github.com:

@Siedlerchr https://github.com/siedlerchr Thank you very much for your
effort! Do you have a link to the report, so that we can track it here?

Also, does it make sense to submit a bug report to OpenJDK as well (since
the issue occurs there too)?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/JabRef/jabref/issues/3028#issuecomment-317034072, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AATi5CwGstoyUrYjB0chr3NnzehPDktQks5sQMV5gaJpZM4Odg7R
.

Just confirming that I have this problem too, using IBUS and m17n under Linux Mint

JabRef 4.0-dev--snapshot--2017-07-19--master--2f12fecfb
Linux 4.8.0-58-generic amd64
Java 1.8.0_131

I just got the notification that the reported bug is now official listed under this number:
https://bugs.openjdk.java.net/browse/JDK-8185792

Good job @Siedlerchr

Their report indicates that this also fails in the current JDK 9. Let's see (hope) that they take action.

I know that this is a Java issue, not Jabref, but I want to say here, loud and clear, that I cannot use JabRef 4 for real work if this isn't fixed. I type bibliographical data in several languages that all use accented text. I'm going to have to stay with JabRef 3 until this is fixed. It's a great pity.

Is there any way that the buggy Java code can be circumvented in the JabRef 4 release?

Best,
Dominik

Very soon, there should be a way to run JabRef 4 without this issue, since the bug has just been resolved in openJDK. See https://bugs.openjdk.java.net/browse/JDK-8185792

It's great that they have already repaired it in OpenJDK! I don't know about their release plans, but maybe there's a possibility to install a beta JDK that includes the fix? Maybe someone with more knowledge about OpenJDK can enlighten us here?

From what I see is that this is currently only fixed for OpenJDK 10. I think we need to wait for a backport to OpenJDK 9 and/or 8. I doubt it will be included in 8, as the jdk9 is on the way to it's final release.

But I still find it complicated to get an overview how these openjdk and openjfx projects correlate...

In the meanwhile we can create our own JFXPanel that incorporates this fix by overriding:
````java
@Override
protected void processInputMethodEvent(InputMethodEvent e) {
if (e.getID() == InputMethodEvent.INPUT_METHOD_TEXT_CHANGED)
sendInputMethodEventToFX(e);
}
super.processInputMethodEvent(e);
}

private void sendInputMethodEventToFX(InputMethodEvent e) {
    String t = InputMethodSupport.getTextForEvent(e);

    int insertionIndex = 0;
    if (e.getCaret() != null) {
        insertionIndex = e.getCaret().getInsertionIndex();
    }

    scenePeer.inputMethodEvent(
            javafx.scene.input.InputMethodEvent.INPUT_METHOD_TEXT_CHANGED,
            InputMethodSupport.inputMethodEventComposed(t, e.getCommittedCharacterCount()),
            t.substring(0, e.getCommittedCharacterCount()),
            insertionIndex);
}

````
(source: http://hg.openjdk.java.net/openjfx/10-dev/rt/file/ef0ec553083f/modules/javafx.swing/src/main/java/javafx/embed/swing/JFXPanel.java)

I don't like these OS-specific hacks, but since the impact is rather big, we could go for such a solution. Maybe we could even check that the custom JFXPanel is only used when the OS is Linux?

I would implement this, but I don't have a Linux system available, so I can't test it. Could someone of our Linux users do this?

I can take a look at this. We have somewhere a switch for OS.LINUX

We think we have a working solution. Could the Linux users @mlep @wujastyk @kafran here please try out the build available at http://builds.jabref.org/customjfxpanel/ and report if it solves the problem?

Works for me!

Linux Mint Debian Edition "Betsy"
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
javafx.runtime.version=8.0.66
javafx.runtime.build=b17

It is not working on "{} BibTeX source" tab only.

Thanks.

Yeah, I could confirm the source tab thing. No idea actually.

JabRef 4.0-dev--snapshot--2017-08-21--master--d46fd5c84
Linux 4.11.0-14-generic amd64
Java 1.8.0_144

Yes, using IBUS and m17n, I can now type accented characters, such as āīūṣṭḍṃḥśñṅ . I could also type in Devanāgarī देवनागरी। Typing feels a bit ponderous, like each character is being considered briefly. But it works! Thank you.

Like @kafran and @Siedlerchr, I could not type accented chars into the "{} biblatex source" tab.

Thanks, @lenhard !

Still a problem with the biblatex source editor, but I think this is sth we should maybe report to the controlsfx guys. @tobiasdiez As far as I remember you have an acc at the fxcontrol bug tracker, right?

Probably our hack does not work for the source tab because it does not use a normal text box but a rich text box from RichTextFX (not from controlsfx).
Since the hack is hopefully no longer needed with #3684, I would not investigate more energy here (or let somebody else waste their time fixing it).

Does this still happen in the latest master?

Works for me (expect in the source tab, as previously reported).

JabRef 4.4-dev--snapshot--2018-06-12--master--db9e4e5a7
Linux 3.11-2-amd64 amd64
Java 1.8.0_152

Thanks for the feedback, seems like it is already reported at RichtTextFX: https://github.com/FXMisc/RichTextFX/issues/280

Seems like the underlying issue is a jdk bug and fixed in jdk10. Not sure about that imho. But as all other fields work and only the source tab not, I would vote to close this as it's only a very minor thing. And copy and paste still works.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aytekinar picture aytekinar  ·  57Comments

tobiasdiez picture tobiasdiez  ·  36Comments

LyzardKing picture LyzardKing  ·  62Comments

nswitte picture nswitte  ·  39Comments

kingwarrick picture kingwarrick  ·  32Comments