bordaigorl / rmview

A live viewer for reMarkable written in PyQt5
GNU General Public License v3.0
742 stars 61 forks source link

Duplicate frames close when writing on tablet #61

Closed lylethorngage closed 2 years ago

lylethorngage commented 3 years ago

I report a problem that occurred recently on rmview for rM2, although it seems to be happening also for rM1 (but not as severely).

After duplicating a frame, the duplicate is often closed by the very act of writing or tracing the pen on the tablet. The rubber tip seems to also trigger this. This does not happen very regularly: sometimes I can go on and keep writing with even more than one duplicated frames, but the frames anyway last for not more than a few minutes, before they all close due to a pen stroke.

It is very strange because it only appeared recently. Last week I could clone frames and keep writing without issues for hours. I do not remember updating anything on my machine, and this happened before the problematic update to rM 2.6.

I take advantage of this to suggest that upgrading the frame-cloning feature to target a bipartite or tripartite window would be very useful. For example one could select to have rmview show a number of windows (labeled by an index) at all times. When cloning a new frame the user could then direct the frame to window number j. Just an idea.

Thanks!

bordaigorl commented 3 years ago

Hi, I cannot really reproduce the issue, but the only thing I could think could go wrong is that there is some unwanted sharing of the image buffers. Could you try replacing the cloneViewer function at src/rmview/rmview.py line 342 with the following code:

  def cloneViewer(self):
    img = self.viewer.image()
    img = QPixmap.fromImage(img)
    img.detach()
    v = QtImageViewer()
    v.setImage(img)
    v.show()

To try it out you will need to reinstall rmview with pip install .. If you are unsure what this all means let me know (including what installation method and OS you used) and I'll try to help.

vale981 commented 3 years ago

It's happening to me too on the Rm2. The closing does not seem to be deterministic...

bordaigorl commented 3 years ago

Have you tried the devel branch? the above mentioned commit 50137db could be a solution to this...

vale981 commented 3 years ago

yes, it is still happening

vale981 commented 3 years ago

but way less frequently

vale981 commented 3 years ago

Ok cool, it did not happen for a long while now.

bordaigorl commented 3 years ago

@vale981 could you tell me which OS and RM2 firmware version you are using? Also: which installation method for rmview are you using? Can you share the non-private bits of your configuration? (You can obtain that by running rmview -v)

vale981 commented 3 years ago

Installation through nixpkgs and through cloned git repo.

The issue just reappeared: After not touching the tablet for a while, the cloned frames disappear upon writing on the tablet.

vale981 commented 3 years ago

nvm, fixed it PR incoming

bordaigorl commented 3 years ago

@vale981 great to hear!!! Very curious to see what the bug was