#170 Caret not visible on retina display

Major
closed-fixed
nobody
NetBeans (62)
5
2014-09-30
2012-09-08
Anonymous
No

System information:
Mac os x 10.8.1
Java-version: 1.6.0_35 (Package: Java for OS X 2012-005)
Netbeans 7.2 (php)

The caret is not visible in navigation mode, when entering insert-mode the caret is visible. Tested by reinstalling netbeans and enabled jvi for netbeans as the only plugins besides the default,

Discussion

1 2 > >> (Page 1 of 2)
  • Ernie Rael
    Ernie Rael
    2012-09-08

    > navigation mode
    I assume you are talking about what is technically known as "normal mode"

    Could you try starting NetBeans with a clean userdir? The --userdir option on command line, see netbeans.conf for more info.

    First I've heard of this one, I don't have a Mac. Have you changed the blink rate?

     

  • Anonymous
    2012-09-09

    • summary: No caret in navigation mode --> Caret not visible
     
    Last edit: Anonymous 2014-10-13

  • Anonymous
    2012-09-09

    Yes, it is in navigation mode. but actually I have been incorrect in the description, the caret is missing in normal and insert mode.

    I did try to start netbeans in a clean userdir, where i installed the jvi plugins, except for the two 7.0.1 version specific patches. The result was the same no caret.

    I have used jvi for netbeans several years, the last 18 months on mac os x, no problem before upgrading to the latest java version, and apple makes it very hard to downgrade packages, so it is difficult to try with a older java version.

    The caret blink rate was the default 300 ms, trying to change it via the configuration did not make it appear. If I disable the jvi plugin the caret shows up, and it has the blink rate configured in the settings.

    Also I noticed that another java based editor phpstorm where i tried to installed a similar plugin ideavim has a similar problem, here the caret is only visible in insert mode, so im guessing that it has something to do with the java version, but I have no idea on how to pinpoint the exact reason.

     
  • Ernie Rael
    Ernie Rael
    2012-09-09

    For another data point,k you can download standalone jvi source
    hg clone http://jvi.hg.sourceforge.net:8000/hgroot/jvi/jvi
    and do "ant run". This should bring up a JFrame with a standalone/debug jVi running in it. It would be interesting to see if this standalone version has a caret.

    Another editor & plugin having the same problem is pretty weird.

     

  • Anonymous
    2012-09-09

    tested the standalone jvi, and the caret is missing here to.. Can the standalone version provide additional information about what is going on in some way?

    It is a little strange that the same is happening in another editor, im not sure if it is is helpful in any way, but since they are both java based i thought it would be a little relevant.

     
    Last edit: Anonymous 2014-10-09
  • Ernie Rael
    Ernie Rael
    2012-09-09

    The standalone version is easier to work with since you can debug it without debugging all of NetBeans. Open the project with NetBeans and get some info. For standalone:

    class SwingCaret extends DefaultCaret
    (DefaultCaret is swing's and this is installed into the JEditorPane by SwingFactory) SwingCaret delegates all the painting to:

    class SwingPaintCaret
    at line 106 you could put something like
    System.err.println("rect=" + r + ", width=" + blockWidth)
    The cursor is actually drawn at line 153 by
    g.fillRect(r.x, r.y, r.width, r.height);

     

  • Anonymous
    2012-09-10

    Ok, i tried it and got some results. the blockWidth was not defined in 106, so i did the debug print in line 153.
    top left corner: rect=java.awt.Rectangle[x=0,y=0,width=8,height=14], width=8
    bottom left (of the window): rect=java.awt.Rectangle[x=0,y=420,width=8,height=14], width=8
    bottom left (scrolled to the bottom): rect=java.awt.Rectangle[x=0,y=2184,width=8,height=14], width=8

    A thing to mention is that the mac I have is the new retina model, where pixels position is a little different, the screen has a native resolution of 2880 x 1800 but everything is scaled. also after navigating in the jvi standalone app, i noticed some minor black rectangles, that might be the actual caret, but the position where they are drawn is off, as shown in this screenshot: http://cl.ly/image/450u2f1U0727

     
    Last edit: Anonymous 2014-09-27

  • Anonymous
    2012-09-10

    follow up, after sending I realised that the best way to se if the retina display was causing this problem was to move the jvi window to my secondary display (i did not have this connected when i posted the error) and here the caret is drawn correctly, so the retina is the issue..

     

  • Anonymous
    2012-09-10

    • summary: Caret not visible --> Caret not visible on retina display
     
    Last edit: Anonymous 2014-10-08
  • Ernie Rael
    Ernie Rael
    2012-09-10

    This seems to be discussing the problem:
    http://youtrack.jetbrains.com/issue/IDEA-87500
    In one of the comments: "appears to break the IdeaVIM plugin ... cursor ends up minimized and draws off and to the left".

    There may be something I need to do in jVi. According to the following, there will be a NetBeans 7.2.1 which is supposed to work better, but it may or may not fix this caret issue.
    --- http://netbeans.org/bugzilla/show_bug.cgi?id=215141 Netbeans on a Retina Macbook is very blurry

    Do you have a NetBeans login? This should probably be filed in the NetBeans bug data base; they probably understand things better than I. If you can't file it, my ID is "err" so you can cc me. If you want me to file it, then I'd like to cc you.

     

  • Anonymous
    2012-09-10

    Yes, some of it is similar, tried the setting for highres capability just to se if that helped, but it made no difference.
    I think it would be easiest just to wait until the 7.2.1 version and see if it solves anything, if not i will fill in an issue to netbeans, and cc you on it, i think you have a better chance then me figuring out if it is relevant for jvi or not.

     

  • Anonymous
    2012-09-11

    Cool, thanks. I will be looking forward for any updates or fixes for this!

     
    Last edit: Anonymous 2014-10-16
  • Ernie Rael
    Ernie Rael
    2012-09-11

    Have you added yourself to the NB bug cc list? If questions come up...

     

  • Anonymous
    2012-09-14

    I have added myself to the cc just now

     
    Last edit: Anonymous 2014-10-13
  • Ernie Rael
    Ernie Rael
    2012-10-05

    I saw your comment on NetBeans bug. To verify, this was in NetBeans and not standalone?

     
  • Ernie Rael
    Ernie Rael
    2012-10-05

    And the regular NetBeans editor caret works ok?

     

  • Anonymous
    2012-10-11

    Yes, it was in netbeans, and the normal caret is displayed correctly

     
  • As I noted in http://netbeans.org/bugzilla/show_bug.cgi?id=218087 you could also possibly run the IDE with

    -J-Dorg.netbeans.modules.editor.lib2.view.FontInfo.level=FINE
    -J-Dorg.netbeans.editor.BaseCaret.level=FINE

    to show font sizes being used by view hierarchy and
    at the line containing "updateCaretBounds" there should be caret bounds computed.

     

  • Anonymous
    2012-11-16

    Is there any other thoughts on this? I'm on java 6 with Netbeans 7.2.1 and 7.3 beta and the caret is still missing.

     
    Last edit: Anonymous 2014-11-27
  • Ernie Rael
    Ernie Rael
    2012-11-16

    I don't have access to a Retina...

    Some additional debug info might help. In comment "Date: 2012-11-16 15:18:04 PST" the NetBeans developer responsible for this area suggested turning on some stuff.

    If you can provide that info, maybe only with a tiny file (a few short lines), that might give some insight. Probably posting the results to the NetBeans bug would be best.

    If more info is needed after that, I can add some debug info the jVi and send you the module to try.

     

  • Anonymous
    2012-11-18

    Hope this helps:
    FINE [org.netbeans.editor.BaseCaret]: Installing to org.openide.text.QuietEditorPane@381702ff
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: no change, old=null
    FINE [org.netbeans.editor.BaseCaret]: Deinstalling from org.openide.text.QuietEditorPane@381702ff
    FINE [org.netbeans.editor.BaseCaret]: Installing to org.openide.text.QuietEditorPane@381702ff
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: no change, old=null
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: no change, old=null
    FINE [org.netbeans.editor.BaseCaret]: setDot: offset=359
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: no change, old=null
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: old=null, new=java.awt.Rectangle[x=48,y=168,width=10,height=14], offset=359
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: no change, old=java.awt.Rectangle[x=48,y=168,width=10,height=14]
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: old=java.awt.Rectangle[x=48,y=168,width=10,height=14], new=java.awt.Rectangle[x=48,y=168,width=10,height=14], offset=359
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: no change, old=java.awt.Rectangle[x=48,y=168,width=10,height=14]
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: old=java.awt.Rectangle[x=48,y=168,width=10,height=14], new=java.awt.Rectangle[x=48,y=168,width=10,height=14], offset=359
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: no change, old=java.awt.Rectangle[x=48,y=168,width=10,height=14]
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: old=java.awt.Rectangle[x=48,y=168,width=10,height=14], new=java.awt.Rectangle[x=48,y=168,width=10,height=14], offset=359
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: no change, old=java.awt.Rectangle[x=48,y=168,width=10,height=14]
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: old=java.awt.Rectangle[x=48,y=168,width=10,height=14], new=java.awt.Rectangle[x=48,y=168,width=10,height=14], offset=359
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: no change, old=java.awt.Rectangle[x=48,y=168,width=10,height=14]
    FINE [org.netbeans.editor.BaseCaret]: setDot: offset=271
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: old=java.awt.Rectangle[x=48,y=168,width=10,height=14], new=java.awt.Rectangle[x=120,y=98,width=8,height=14], offset=271
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: no change, old=java.awt.Rectangle[x=120,y=98,width=8,height=14]
    FINE [org.netbeans.editor.BaseCaret]: moveDot: offset=271
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: old=java.awt.Rectangle[x=120,y=98,width=8,height=14], new=java.awt.Rectangle[x=120,y=98,width=8,height=14], offset=271
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: no change, old=java.awt.Rectangle[x=120,y=98,width=8,height=14]
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: old=java.awt.Rectangle[x=120,y=98,width=8,height=14], new=java.awt.Rectangle[x=120,y=98,width=8,height=14], offset=271
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: no change, old=java.awt.Rectangle[x=120,y=98,width=8,height=14]
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: old=java.awt.Rectangle[x=120,y=98,width=8,height=14], new=java.awt.Rectangle[x=120,y=98,width=8,height=14], offset=271
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: no change, old=java.awt.Rectangle[x=120,y=98,width=8,height=14]
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: old=java.awt.Rectangle[x=120,y=98,width=8,height=14], new=java.awt.Rectangle[x=120,y=98,width=8,height=14], offset=271
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: no change, old=java.awt.Rectangle[x=120,y=98,width=8,height=14]
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: old=java.awt.Rectangle[x=120,y=98,width=8,height=14], new=java.awt.Rectangle[x=120,y=98,width=8,height=14], offset=271
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: no change, old=java.awt.Rectangle[x=120,y=98,width=8,height=14]
    FINE [org.netbeans.editor.BaseCaret]: setDot: offset=298
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: old=java.awt.Rectangle[x=120,y=98,width=8,height=14], new=java.awt.Rectangle[x=80,y=112,width=10,height=14], offset=298
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: no change, old=java.awt.Rectangle[x=80,y=112,width=10,height=14]
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: old=java.awt.Rectangle[x=80,y=112,width=10,height=14], new=java.awt.Rectangle[x=80,y=112,width=10,height=14], offset=298
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: no change, old=java.awt.Rectangle[x=80,y=112,width=10,height=14]
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: old=java.awt.Rectangle[x=80,y=112,width=10,height=14], new=java.awt.Rectangle[x=80,y=112,width=10,height=14], offset=298
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: no change, old=java.awt.Rectangle[x=80,y=112,width=10,height=14]
    -Dorg.netbeans.modules.editor.lib2.view.FontInfo.level=FINE
    -Dorg.netbeans.editor.BaseCaret.level=FINE
    FINE [org.netbeans.editor.BaseCaret]: setDot: offset=309
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: old=java.awt.Rectangle[x=80,y=112,width=10,height=14], new=java.awt.Rectangle[x=72,y=126,width=10,height=14], offset=309
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: no change, old=java.awt.Rectangle[x=72,y=126,width=10,height=14]
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: old=java.awt.Rectangle[x=72,y=126,width=10,height=14], new=java.awt.Rectangle[x=72,y=126,width=10,height=14], offset=309
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: no change, old=java.awt.Rectangle[x=72,y=126,width=10,height=14]
    FINE [org.netbeans.editor.BaseCaret]: setDot: offset=326
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: old=java.awt.Rectangle[x=72,y=126,width=10,height=14], new=java.awt.Rectangle[x=120,y=140,width=8,height=14], offset=326
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: no change, old=java.awt.Rectangle[x=120,y=140,width=8,height=14]
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: old=java.awt.Rectangle[x=120,y=140,width=8,height=14], new=java.awt.Rectangle[x=120,y=140,width=8,height=14], offset=326
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: no change, old=java.awt.Rectangle[x=120,y=140,width=8,height=14]
    FINE [org.netbeans.editor.BaseCaret]: setDot: offset=309
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: old=java.awt.Rectangle[x=120,y=140,width=8,height=14], new=java.awt.Rectangle[x=72,y=126,width=10,height=14], offset=309
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: no change, old=java.awt.Rectangle[x=72,y=126,width=10,height=14]
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: old=java.awt.Rectangle[x=72,y=126,width=10,height=14], new=java.awt.Rectangle[x=72,y=126,width=10,height=14], offset=309
    FINE [org.netbeans.editor.BaseCaret]: updateCaretBounds: no change, old=java.awt.Rectangle[x=72,y=126,width=10,height=14]

     
    Last edit: Anonymous 2014-10-21

  • Anonymous
    2012-11-21

    Every version of NetBeans I try from 7.0.1 to the latest development build don't work

     
    Last edit: Anonymous 2014-11-27
  • Ernie Rael
    Ernie Rael
    2012-11-22

    See NB bug with patch jVi to gather additional debug info

     
  • Ernie Rael
    Ernie Rael
    2013-03-04

    Adding option "Mac Retina Cursor Xor Bug" in PLATFORM category in next release.
    Menu>Tools>Options>jViConfig>Platform.

     
1 2 > >> (Page 1 of 2)