← Back to team overview

sikuli-driver team mailing list archive

Re: [Bug 1224863] Re: Null pointer exception raised at click function call

 

Hi,
Thank you for your quick response.
Indeed, the problem happens when we try to click outside the screen.
At the moment, i just catch the exception and the problem is solved.
Best regards
Pierre Dumas

> Date: Fri, 13 Sep 2013 10:17:30 +0000
> From: rmhdevelop@xxxxxx
> To: pierreduma@xxxxxxxxxx
> Subject: [Bug 1224863] Re: Null pointer exception raised at click function call
> 
> Thanks for finding and evaluating:
> 
> The Region class is totally revised in this aspect and strictly
> according to the Java Rectangle rules.
> 
> ... means the Region
> Region(SCREEN.w, SCREEN.h, 1, 1)
> 
> is one pixel below and one pixel right to the bottom right corner of the
> primary screen and hence outside any screen if there is no screen at
> this coordinates.
> 
> A Region must have a width and height both > 0, otherwise it is undefined (the message though for a top left corner on a screen is misleading). 
> *** I will fix this the way, that I will produce a sensible error message and as a convenience set the attribute being 0 to 1.
> 
> What is inconvenient, that the click on a Region/Location outside any screen leads to a null pointer exception. 
> *** I will change this to an exception with a better message.  
> 
> ** Summary changed:
> 
> - Null pointer exception raised at click function call
> + [1.0.1] click() on Region/Location outside screen gives Null pointer exception --- should be more explanatory
> 
> -- 
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1224863
> 
> Title:
>   [1.0.1] click() on Region/Location outside screen gives Null pointer
>   exception --- should be more explanatory
> 
> Status in Sikuli:
>   New
> 
> Bug description:
>   1 - Version of SIKULI : X-1.0.1
>   2 - Operating system : Windows XP Pro SP3
>   3 - Procedure to reproduce the bug: The Null Pointer Exception was raised in this line of my code
> 
>         self.clickFunction_dict[action.lower()](reg)
> 
>   where:
>         self.clickFunction_dict = {"left" : click, "right" : rightClick, "double" : doubleClick}
>         action = "left"
>         reg is a region object created before.
> 
>   This function has worked many thousands times before to crash
>   yesterday.
> 
>   4 - I recently passed to SIKULI X-1.0.1. I never encountered this
>   problem with SIKULI X-1.0-rc3.
> 
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/sikuli/+bug/1224863/+subscriptions

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1224863

Title:
  [1.0.1] click() on Region/Location outside screen gives Null pointer
  exception --- should be more explanatory

Status in Sikuli:
  New

Bug description:
  1 - Version of SIKULI : X-1.0.1
  2 - Operating system : Windows XP Pro SP3
  3 - Procedure to reproduce the bug: The Null Pointer Exception was raised in this line of my code

        self.clickFunction_dict[action.lower()](reg)

  where:
        self.clickFunction_dict = {"left" : click, "right" : rightClick, "double" : doubleClick}
        action = "left"
        reg is a region object created before.

  This function has worked many thousands times before to crash
  yesterday.

  4 - I recently passed to SIKULI X-1.0.1. I never encountered this
  problem with SIKULI X-1.0-rc3.

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1224863/+subscriptions


References