[1.1.1] ADBScreen: capture in landscape mode does not work - fixed in 1.1.2 (2017-04-28) --- find() does not seem to work though in landscape

Bug #1686355 reported by RaiMan
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
Fix Released
Undecided
RaiMan

Bug Description

still under test: find() does not seem to work in landscape

************** fix information

Tested on my Nexus 7 (6.0.1) with 1200x1920.
In portrait mode I get a portrait image (1200x1920) and in landscape mode I now get a landscape image (1920x1200) showing up, as it is on the screen.

Everything (that works ;-) should now work as expected in both portrait and landscape (tested a click in both modes).

-------------------------------------------------------------------

Hi, Sir, first of all, thanks for developing this amazing SikuliX !

    I get an error when I try to control my android phone by SikuliX-java. These are my codes:

 public class Test {
 public static void main(String[] args) throws FindFailed {
  System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
  ADBScreen android=new ADBScreen();
   android.click("imgs/5.png");
 }
}

When the android screen is vertical, the codes work fine. But when screen is horizontal, below error happens:

[error] ADBDevice: captureDeviceScreenMat: width or height differ from device values
Exception in thread "main" java.lang.NullPointerException: Attempt to dereference null cv::Mat
 at org.sikuli.natives.VisionProxyJNI.FindInput_setSource__SWIG_1(Native Method)
 at org.sikuli.natives.FindInput.setSource(FindInput.java:81)
 at org.sikuli.script.Finder.setScreenImage(Finder.java:164)
 at org.sikuli.script.Finder.initScreenFinder(Finder.java:131)
 at org.sikuli.script.Finder.<init>(Finder.java:113)
 at org.sikuli.script.Region.doCheckLastSeenAndCreateFinder(Region.java:3015)
 at org.sikuli.script.Region.checkLastSeenAndCreateFinder(Region.java:2971)
 at org.sikuli.script.Region.doFind(Region.java:2900)
 at org.sikuli.script.Region.access$500(Region.java:29)
 at org.sikuli.script.Region$RepeatableFind.run(Region.java:3144)
 at org.sikuli.script.Region$Repeatable.repeat(Region.java:3100)
 at org.sikuli.script.Region.wait(Region.java:2733)
 at org.sikuli.script.Region.find(Region.java:2336)
 at org.sikuli.script.Region.getLocationFromTarget(Region.java:3213)
 at org.sikuli.script.Region.click(Region.java:3698)
 at org.sikuli.script.Region.click(Region.java:3683)
 at Test.main(Test.java:12)

    My android version is 4.4.4, I heard about it works fine on android 6.x. My question is : is there any solution for android v4.x?

RaiMan (raimund-hocke)
Changed in sikuli:
status: New → Fix Committed
importance: Undecided → Critical
assignee: nobody → RaiMan (raimund-hocke)
RaiMan (raimund-hocke)
Changed in sikuli:
milestone: none → 1.1.2
description: updated
RaiMan (raimund-hocke)
summary: [1.1.1] ADBScreen: capture in landscape mode does not work - fixed in
- 1.1.2 (2017-04-27)
+ 1.1.2 (2017-04-28)
RaiMan (raimund-hocke)
summary: [1.1.1] ADBScreen: capture in landscape mode does not work - fixed in
- 1.1.2 (2017-04-28)
+ 1.1.2 (2017-04-28) --- find() does not seem to work though in landscape
Changed in sikuli:
importance: Critical → High
description: updated
RaiMan (raimund-hocke)
Changed in sikuli:
status: Fix Committed → Fix Released
importance: High → Undecided
milestone: 1.1.2 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.