Menu

#2784 TextArea painting corruption when saving

closed-fixed
nobody
7
2009-04-02
2007-01-11
pieroxy
No

Sometimes (usually after a bit of uptime using jEdit intensively) when I save a buffer, everything in the main TextArea goes wild. That is to say the display is broken and random stuff is displayed in place of the buffer I'm currently editing.

It first scared the hell out of me (thinking my buffer was corrupted) but only the display is. If I save again, the corruption changes (other random stuff is displayed - sometimes it goes back to normal) and if I scroll down (pagedown/up) or change buffer everything is back to normal. So all in all, jEdit is still usable.

Note that the syntax highlighting is unaffected by this bug. So I see garbage with the correct syntax highlighting of the buffer underneath. It is sometimes quite ... artistic ;)

Let me know if you need any more details or if I should try something while the display is messed up to help investigation.

Sorry if it's a dupe. I can't believe I'm the only one seeing that but I couldn't find this bug in the tracker...

[message] Log: java.version=1.6.0
[message] Log: java.vm.version=1.6.0-b105
[message] Log: java.runtime.version=1.6.0-b105
[message] Log: java.vendor=Sun Microsystems Inc.
[message] Log: java.compiler=null
[message] Log: os.name=Linux
[message] Log: os.version=2.6.17-10-generic
[message] Log: os.arch=i386
[message] Log: user.home=/home/pieroxy
[message] Log: java.home=/home/pieroxy/progs/jdk1.6.0/jre
[message] Log: java.class.path=/home/pieroxy/progs/jedit/jedit.jar
[notice] jEdit: jEdit version 4.3pre8

Discussion

<< < 1 2 3 (Page 3 of 3)
  • Dale Anson

    Dale Anson - 2008-12-21

    Another candidate for the real fix.

     
  • Dale Anson

    Dale Anson - 2008-12-21

    I added a new patch that appears to fix this. I think my previous patch to SideKick masks a deeper problem. This new patch is for JEditBuffer, which is where I think the root of the problem lies.

    From email I sent to the jedit-devel list:

    "I've spent some more time looking into this, and I think the root problem is the "seg" field in JEditBuffer. This field is a Segment, which should be treated as immutable, but it is not handled that way at all. Declaring the Segment as a field and not handling the Segment as an immutable object means JEditBuffer is not reentrant, so multiple threads accessing the same Buffer may not get consistent results. So my "fix" is not a good one, it does just mask a deeper problem."

     
  • Dale Anson

    Dale Anson - 2008-12-22

    I've seen some squirrelly behaviour with both of my last patches applied. I'd recommend reverting to the current release version of SideKick and using the patch for JEditBuffer.java.

     
  • Anthony Keeley

    Anthony Keeley - 2008-12-23

    I've been using the sidekick patch and haven't seen any problems. I'll have to try out the patch for jeditbuffer whenever I get a break at work. I imagine the jeditbuffer patch will be in the next release of jEdit?

     
  • daniel hahler

    daniel hahler - 2009-03-20

    I've just had this happening with a CSS file.. not during every save, but about 20-50% of the time, some lines got garbled.
    My workaround for this issue has been always to press Ctrl-A; this marks the whole text and fixes the painting corruptions.
    When deactivating the XML plugin it did not happen again.
    Now I've applied the patch (JEditBuffer.java.diff) and this fixes it.

    Therefore I'd say it should get committed to SVN.
    If nobody steps up with another/better patch or commits this one, I think I'll do so in the next days.

    Dale, thank you for providing this fix and your investigations! Please consider committing it yourself.

     
  • daniel hahler

    daniel hahler - 2009-04-02

    Committed Dale's patch in r14888. Thanks!

    If there are still problems, please reopen this tracker item.

     
  • daniel hahler

    daniel hahler - 2009-04-02
    • status: open --> closed-fixed
     
<< < 1 2 3 (Page 3 of 3)

Log in to post a comment.

MongoDB Logo MongoDB