skylarmt / android-xserver

Automatically exported from code.google.com/p/android-xserver
0 stars 0 forks source link

BadLength (poly request too large or internal Xlib length error) #8

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
  1. Start android-xserver on emulator
  2. run "export DISPLAY=127.0.0.1:0". WM will use android-xserver
  3. run "adb forward tcp:6000 tcp:6000". Adb forward to a-xserver
  4. run a window manager. For example, wmaker (WindowMaker).

What is the expected output? 
  No errors for X_PutImage code.

What do you see instead?
  /usr/lib/WindowMaker/WindowMaker warning: internal X error: BadLength   (poly request too large or internal Xlib length error)
    Request code: 72 X_PutImage
    Request minor code: 0
    Resource ID: 0x0
    Error serial: 1622

What version of the product are you using? On what operating system?
  Git version. OS: Linux

Please provide any additional information below.
  Error was generated for Drawable.processPutImage on 

    if (bytesRemaining != n + pad) {
      io.readSkip(bytesRemaining);

    // I changed resource ID to another value to find this line.

      ErrorCode.write(client, ErrorCode.Length, RequestCode.PutImage, 0); 
      return false;
    }

Original issue reported on code.google.com by jfrank1...@gmail.com on 16 Apr 2012 at 5:43

GoogleCodeExporter commented 8 years ago
I think this commit fixed that problem:

http://code.google.com/r/commsmegatron-android-xserver/source/detail?r=7c312d683
a9bf01cfb6948424a223bcd0576c252

Original comment by comms.me...@gmail.com on 30 May 2012 at 4:53

GoogleCodeExporter commented 8 years ago
No, this commit did not solve.
The problem is with transparent pictures.
In that case the client sends:
1: The image data bgr
2: The shape mask
3: Again the image data bgr
Problem is the shape mask, it is not handled in Drawable.java,
at least not the case that format=2 and depth=1 and
bytesRemaining=(width+1)/2*height + pad

Attached are 2 patch files to implement it.

Original comment by michael....@googlemail.com on 20 Aug 2013 at 2:38

Attachments: