diff crashes when scrolling through a file

Bug #571767 reported by bwolfsohn
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
QBzr
Incomplete
Undecided
Unassigned

Bug Description

bzr: ERROR: bzrlib.errors.ReadOnlyError: A write attempt was made in a read only transaction on LockableFiles(lock, file:///C:/cus16w/.bzr/branch/)

Traceback (most recent call last):
  File "C:/Program Files/Bazaar/plugins\qbzr\lib\encoding_selector.py", line 111, in _encodingChanged
  File "C:/Program Files/Bazaar/plugins\qbzr\lib\diffwindow.py", line 169, in on_left_encoding_changed
  File "C:/Program Files/Bazaar/plugins\qbzr\lib\util.py", line 565, in get_set_encoding
  File "bzrlib\config.pyo", line 741, in set_user_option
  File "bzrlib\config.pyo", line 1008, in set_option
  File "bzrlib\branch.pyo", line 2144, in lock_write
  File "bzrlib\lockable_files.pyo", line 188, in lock_write
ReadOnlyError: A write attempt was made in a read only transaction on LockableFiles(lock, file:///C:/cus16w/.bzr/branch/)

bzr 2.1.1 on python 2.5.4 (win32)
arguments: ['C:\\Program Files\\Bazaar\\bzr.exe', '--command=diff', '--file=C:\\cus16w\\auc\\lotwl.prg']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Program Files\Bazaar\plugins\bzrtools [2.1.0]
  explorer C:\Program Files\Bazaar\plugins\explorer [1.0.1]
  launchpad C:\Program Files\Bazaar\plugins\launchpad [2.1.1]
  netrc_credential_store C:\Program Files\Bazaar\plugins\netrc_credential_store [2.1.1]
  news_merge C:\Program Files\Bazaar\plugins\news_merge [2.1.1]
  qbzr C:\Program Files\Bazaar\plugins\qbzr [0.18.4]
  rebase C:\Program Files\Bazaar\plugins\rebase [0.5.5]
  upload C:\Program Files\Bazaar\plugins\upload [1.0.0dev]
  xmloutput C:\Program Files\Bazaar\plugins\xmloutput [0.8.7.dev]

Running under windows XP. Just installed 2.1.1 yesterday. Also getting occasional error 9 file description errors.

Revision history for this message
Alexander Belchenko (bialix) wrote :

> Just installed 2.1.1 yesterday. Also getting occasional error 9 file description errors.

Please, file a separate bug report about error 9.

Changed in qbzr:
status: New → Incomplete
Revision history for this message
Alexander Belchenko (bialix) wrote :

Can you provide more details on how you get this bug, please?

I think you're looking on diff between 2 revisions and accidentally changing encoding. Anyway, it's no clear for me yet. So I need from you information in required steps to reproduce it.

Revision history for this message
Wayne Werner (srilyk) wrote :

I got the same bug with the same traceback.

I'm 90% sure that's exactly what happened for me - accidentally changed encoding. I was scrolling up and down the file and I think my mouse went over the encoding and that's when the error popped up.

I think I've pinpointed the error:

1) Edit some files in a branch

2) Click "Diff" on the main toolbar

3) Put your mouse over the encoding and scroll up and down rapidly with the mouse wheel

4) error should pop up.

My guess as to what's happening is that when you change the encoding it tries to modify the file. And if you change the file encoding again, before it's finished modifying, it will throw the error.

A simple fix might be in whatever callback is fired on the encoding change. Just check to see if the file is locked, and then you could either discard the event and change it back to the previous encoding, or "freeze" the event until the file is no longer locked.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers