Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
kafran opened this issue Jul 20, 2017 · 34 comments
Closed

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

kafran opened this issue Jul 20, 2017 · 34 comments
Assignees
Labels
component: entry-editor [outdated] type: bug Confirmed bugs or reports that are very likely to be bugs status: waiting-for-feedback The submitter or other users need to provide more information about the issue

Comments

@kafran
Copy link

kafran commented Jul 20, 2017

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: $, %, &, *, (, º

@lenhard
Copy link
Member

lenhard commented Jul 20, 2017

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?

@lenhard lenhard added the status: waiting-for-feedback The submitter or other users need to provide more information about the issue label Jul 20, 2017
@Siedlerchr
Copy link
Member

Siedlerchr commented Jul 20, 2017 via email

@kafran
Copy link
Author

kafran commented Jul 20, 2017

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

@AEgit
Copy link

AEgit commented Jul 20, 2017

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

@kafran
Copy link
Author

kafran commented Jul 20, 2017

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.

@Siedlerchr
Copy link
Member

Siedlerchr commented Jul 20, 2017

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)

@Siedlerchr Siedlerchr added platform: linux [outdated] type: bug Confirmed bugs or reports that are very likely to be bugs labels Jul 20, 2017
@lenhard
Copy link
Member

lenhard commented Jul 20, 2017

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.

@Siedlerchr
Copy link
Member

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

@kafran
Copy link
Author

kafran commented Jul 20, 2017

On 4.0-beta1 this doesn't exist.

@kafran
Copy link
Author

kafran commented Jul 20, 2017

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.

@Siedlerchr
Copy link
Member

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

@Siedlerchr
Copy link
Member

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.

@lenhard
Copy link
Member

lenhard commented Jul 21, 2017

@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)?

@Siedlerchr
Copy link
Member

Siedlerchr commented Jul 21, 2017 via email

@lenhard lenhard removed the status: waiting-for-feedback The submitter or other users need to provide more information about the issue label Jul 24, 2017
@wujastyk
Copy link

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

@Siedlerchr
Copy link
Member

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

@lenhard
Copy link
Member

lenhard commented Aug 3, 2017

Good job @Siedlerchr

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

@wujastyk
Copy link

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

@mlep
Copy link
Contributor

mlep commented Aug 17, 2017

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

@lenhard
Copy link
Member

lenhard commented Aug 17, 2017

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?

@Siedlerchr
Copy link
Member

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...

@tobiasdiez
Copy link
Member

In the meanwhile we can create our own JFXPanel that incorporates this fix by overriding:

    @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)

@lenhard
Copy link
Member

lenhard commented Aug 17, 2017

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?

@Siedlerchr
Copy link
Member

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

@lenhard
Copy link
Member

lenhard commented Aug 21, 2017

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?

@mlep
Copy link
Contributor

mlep commented Aug 21, 2017

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

@kafran
Copy link
Author

kafran commented Aug 21, 2017

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

Thanks.

@lenhard lenhard mentioned this issue Aug 21, 2017
6 tasks
@Siedlerchr
Copy link
Member

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

@wujastyk
Copy link

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 !

@Siedlerchr
Copy link
Member

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?

@tobiasdiez
Copy link
Member

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).

@Siedlerchr
Copy link
Member

Does this still happen in the latest master?

@Siedlerchr Siedlerchr added the status: waiting-for-feedback The submitter or other users need to provide more information about the issue label Jun 12, 2018
@mlep
Copy link
Contributor

mlep commented Jun 12, 2018

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

@Siedlerchr
Copy link
Member

Siedlerchr commented Jun 12, 2018

Thanks for the feedback, seems like it is already reported at RichtTextFX: FXMisc/RichTextFX#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: entry-editor [outdated] type: bug Confirmed bugs or reports that are very likely to be bugs status: waiting-for-feedback The submitter or other users need to provide more information about the issue
Projects
None yet
Development

No branches or pull requests

7 participants