NullPointerException when searchHighlight is turned on
See original GitHub issue—Workaround—
in Java:
// put at the very beginning
final Screen screen = new Screen()
screen.initScreen(screen)
as a workaround until the fix is released in 2.0.2 (already available in 2.1.0 nightly)
Or in Python:
Debug.highlightOn()
SCREEN.initScreen(SCREEN)
click("1576699165720.png")
respective
Debug.highlightOn()
scr = Screen()
scr.initScreen(scr)
scr.click("1576699165720.png")
System:
- macOS 10.14
- intellij bundled java 11
- sikulixapi version 2.0.1
When using the java API and setting Debug.highlightOn()
sikulix crashes on the first click/wait call.
Call stack:
java.lang.NullPointerException
at org.sikuli.script.Region.runFinder(Region.java:2900)
at org.sikuli.script.Region.doFind(Region.java:2841)
at org.sikuli.script.Region.access$300(Region.java:23)
at org.sikuli.script.Region$RepeatableFind.run(Region.java:3122)
at org.sikuli.script.Region$Repeatable.repeat(Region.java:3073)
at org.sikuli.script.Region.wait(Region.java:2258)
[My personal stack left out]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:230)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:58)
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
NullPointerException when trying to use Fast Highlighter
I'm new to ElasticSearch. I'm using 0.18.2. I have a 1 node cluster, my index has 2 shards and 1 replica. I have...
Read more >How to Fix and Avoid NullPointerException in Java - Rollbar
NullPointerException in Java occurs when a variable is accessed which is not pointing to any object and refers to nothing or null.
Read more >java - What is a NullPointerException, and how do I fix it?
The NullPointerException (NPE) typically occurs when you declare a variable but did not create an object and assign it to the variable before...
Read more >Java NullPointerException - Detect, Fix, and Best Practices
NullPointerException is raised in an application when we are trying to do some operation on null where an object is required. Some of...
Read more >How to Handle NullPointerException in Java - freeCodeCamp
The idea is that, when you expect a value to be null , its better to put a null check on that variable....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Will hopefully land in 2.0.2.
Or in Python:
respective