java.lang.ArrayIndexOutOfBoundsException length=42; index=42 android.text.Layout$HorizontalMeasurementProvider.get(Layout.java:1416) - arrayindexoutofboundsexception

It feels like a bug in the system. How to solve this problem
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2600)
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2600)
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2600)
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2600)
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2600)
com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:448)
com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1829)
android.app.Activity.dispatchTouchEvent(Activity.java:3307)
androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(SourceFile:69)
com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:410)
android.view.View.dispatchPointerEvent(View.java:12016)
android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4809)
android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4623)
android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4161)
android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4214)
android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4180)
android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4307)
android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4188)
android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4364)
android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4161)
android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4214)
android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4180)
android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4188)
android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4161)
android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6682)
android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6656)
android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6617)
android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6785)
android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:187)
android.os.MessageQueue.nativePollOnce(Native Method)
android.os.MessageQueue.next(MessageQueue.java:325)
android.os.Looper.loop(Looper.java:142)
android.app.ActivityThread.main(ActivityThread.java:6501)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
It looks like a bug in the system. I don't know why. I can't find the corresponding solution. Some of them have encountered phase problems

Related

Issue with registration of java twelvemonkeys registration for Deeplearning app

I am trying to register for a servlet the following and getting an exception. The code is:
static {
IIORegistry registry = IIORegistry.getDefaultInstance();
registry.registerServiceProvider(new com.twelvemonkeys.servlet.image.IIOProviderContextListener());
registry.registerServiceProvider(new com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReaderSpi());
registry.registerServiceProvider(new com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageWriterSpi());
}
I am getting the following exception thrown. Funny thing is I only am using the read not the write.
I am using the 3.6 version of twelvemonkeys.
Thanks for any hints!
Exception in thread "main" java.lang.NoSuchMethodError: com.twelvemonkeys.imageio.util.IIOUtil.lookupProviderByName(Ljavax/imageio/spi/ServiceRegistry;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;
at com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageWriterSpi.onRegistration(JPEGImageWriterSpi.java:82)
at javax.imageio.spi.SubRegistry.registerServiceProvider(Unknown Source)
at javax.imageio.spi.ServiceRegistry.registerServiceProvider(Unknown Source)
at javax.imageio.spi.IIORegistry$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at javax.imageio.spi.IIORegistry.registerInstalledProviders(Unknown Source)
at javax.imageio.spi.IIORegistry.registerStandardSpis(Unknown Source)
at javax.imageio.spi.IIORegistry.<init>(Unknown Source)
at javax.imageio.spi.IIORegistry.getDefaultInstance(Unknown Source)
at deeplearningtest.test.<clinit>(test.java:32)
Ok, I solved the problem. I went to https://github.com/haraldk/TwelveMonkeys#manual-dependency-example and I re-downloaded all the jars mentioned in the article making sure I paid close attention to the versions to make sure 3.6 was selected since 3.6 is not shown as part of the jar name (which I liked). Once I restarted eclipse I got past that problem.
Many thanks haraldK!

Stitching - ImageJ

Hello Stackoverflow community,
I have been using the stitching algorithms several times in the past with no issues. But right now, I always get error messages in the console - even if there is nothing wrong in the log. Then, the fused image is not displayed. I tried with different image types, or different stitching methods, but all of them lead to the same type of error message. Here is an example:
[ERROR] null
java.lang.NoSuchMethodException: Could not find method net.imglib2.type.NativeType.createSuitableNativeImg(Lnet/imglib2/img/NativeImgFactory;[J)Lnet/imglib2/img/NativeImg;
There was a problem with the class net.imglib2.type.NativeType which can be found here:
/C:/Fiji.app/jars/imglib2-5.3.0.jar
java.lang.NoSuchMethodError: net.imglib2.type.NativeType.createSuitableNativeImg(Lnet/imglib2/img/NativeImgFactory;[J)Lnet/imglib2/img/NativeImg;
at net.imglib2.img.imageplus.ImagePlusImgFactory.create(ImagePlusImgFactory.java:69)
at net.imglib2.img.imageplus.ImagePlusImgFactory.create(ImagePlusImgFactory.java:64)
at net.imglib2.img.ImgFactory.create(ImgFactory.java:174)
at mpicbg.stitching.fusion.OverlayFusion.createOverlay(OverlayFusion.java:176)
at plugin.Stitching_Pairwise.fuse(Stitching_Pairwise.java:481)
at plugin.Stitching_Pairwise.performPairWiseStitching(Stitching_Pairwise.java:448)
at plugin.Stitching_Pairwise.run(Stitching_Pairwise.java:299)
at ij.IJ.runUserPlugIn(IJ.java:233)
at ij.IJ.runPlugIn(IJ.java:196)
at ij.Executer.runCommand(Executer.java:150)
at ij.Executer.run(Executer.java:68)
at java.lang.Thread.run(Thread.java:745)
at net.imglib2.img.imageplus.ImagePlusImgFactory.create(ImagePlusImgFactory.java:69)
at net.imglib2.img.imageplus.ImagePlusImgFactory.create(ImagePlusImgFactory.java:64)
at net.imglib2.img.ImgFactory.create(ImgFactory.java:174)
at mpicbg.stitching.fusion.OverlayFusion.createOverlay(OverlayFusion.java:176)
at plugin.Stitching_Pairwise.fuse(Stitching_Pairwise.java:481)
at plugin.Stitching_Pairwise.performPairWiseStitching(Stitching_Pairwise.java:448)
at plugin.Stitching_Pairwise.run(Stitching_Pairwise.java:299)
at ij.IJ.runUserPlugIn(IJ.java:233)
at ij.IJ.runPlugIn(IJ.java:196)
at ij.Executer.runCommand(Executer.java:150)
at ij.Executer.run(Executer.java:68)
at java.lang.Thread.run(Thread.java:745)
I don't know, maybe I missed something obvious, has anyone encountered the same type of issue?
Thank you very much in advance!
Joti

I tried using AppiumDriver.tap() with parameters but when it execute it throws server side error

org.openqa.selenium.WebDriverException An unknown server-side error occurred while processing the command. (WARNING: The server did not provide any stacktrace information)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:605)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
at io.appium.java_client.AppiumDriver.performTouchAction(AppiumDriver.java:297)
at io.appium.java_client.MultiTouchAction.perform(MultiTouchAction.java:74)
at io.appium.java_client.AppiumDriver.tap(AppiumDriver.java:338)
at allpages.General.swipeLeft(General.java:44)
at test.testappandroid.eVerify(testappandroid.java:152)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
at org.testng.TestNG.run(TestNG.java:1057)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Try typing adb devices into the console, is the device listed.
For anymore help please can you post your testng.xml, your test script and you grid configurations (if you are using selenium grid).
It seems like you are experiencing this issue
The developers recommend:
Make sure you are in a native view
Use mobile: tap which uses the click() method
If none of this helps it seems as if this is an open bug, keep and eye on the issue thread linked above and to get around this problem try to use the click method instead of tap.
Thanks,
Liam
I found the reason for my problem.
The error for me is because i missed to use "#Test" annotation in my code where i was using swipe function.
thanks

Interpreting Java's Post-Crash Call Stack

I am new to Java and am having troubles interpreting the call stack below (from Crashlytics). I got some questions:
Can anybody tell me which method exactly raised ArrayIndexOutOfBoundsException() the exception?
To my confusion, both com.a.data.SystemParameters.getA() and com.a.data.SystemParameters.getC() are simple one-line getter methods, they return corresponding dictionaries. How can an exception "occur" there?
I never call getA() inside getC() nor vice versa. How can that be? What kind of call stack is this? It's not really a "stack", is it?
java.lang.RuntimeException: An error occured while executing
doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:300)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
Caused by: java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
at com.a.data.SystemParameters.getA()
at com.a.data.SystemParameters.getC()
at com.a.data.SystemParameters.isOutOfDate()
at com.a.ui.activities.LoginActivity$SaveSystemParametersTask.doInBackground()
at com.a.ui.activities.LoginActivity$SaveSystemParametersTask.doInBackground()
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)

Unable to import neo4j database with blueprints

i'm trying to open a neo4j database by using blueprints implementation, but i got the following exceptions:
Neo4jGraph graph = new Neo4jGraph("/Users/pipe/Dev/neo4j-community-2.1.0-M01/data/graph.db");
this cause
Caused by: javax.faces.el.EvaluationException: java.lang.RuntimeException: Bad value '-192M' for setting 'neostore.propertystore.db.strings.mapped_memory': value does not match expression:\d+[kmgKMG]?
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:101)
... 32 more
Caused by: java.lang.RuntimeException: Bad value '-192M' for setting 'neostore.propertystore.db.strings.mapped_memory': value does not match expression:\d+[kmgKMG]?
at com.tinkerpop.blueprints.impls.neo4j.Neo4jGraph.<init>(Neo4jGraph.java:165)
at com.tinkerpop.blueprints.impls.neo4j.Neo4jGraph.<init>(Neo4jGraph.java:135)
at org.pipe.java.web.netnografica.persistenza.graphdb.DAONodo.toGraphml(DAONodo.java:204)
at org.pipe.java.web.netnografica.controllo.ControlloGenerale.esportaGraphml(ControlloGenerale.java:133)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.el.parser.AstValue.invoke(AstValue.java:278)
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:274)
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
... 33 more
Caused by: java.lang.IllegalArgumentException: Bad value '-192M' for setting 'neostore.propertystore.db.strings.mapped_memory': value does not match expression:\d+[kmgKMG]?
at org.neo4j.helpers.Settings$DefaultSetting.apply(Settings.java:782)
at org.neo4j.helpers.Settings$DefaultSetting.apply(Settings.java:702)
at org.neo4j.graphdb.factory.GraphDatabaseSetting$SettingWrapper.apply(GraphDatabaseSetting.java:215)
at org.neo4j.graphdb.factory.GraphDatabaseSetting$SettingWrapper.apply(GraphDatabaseSetting.java:189)
at org.neo4j.kernel.configuration.ConfigurationValidator.validate(ConfigurationValidator.java:50)
at org.neo4j.kernel.configuration.Config.applyChanges(Config.java:121)
at org.neo4j.kernel.InternalAbstractGraphDatabase.create(InternalAbstractGraphDatabase.java:339)
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:253)
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:106)
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:81)
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:63)
at com.tinkerpop.blueprints.impls.neo4j.Neo4jGraph.<init>(Neo4jGraph.java:155)
... 44 more
there seems to be a need to provide a properties file. Is correct?
*Edited to answer to Michael Hunger:
Well .. I changed the version of blueprints, now is 2.5.0-SNAPSHOT, but nothing changed. So i provided the configs using the map ask asked by the constructor
Map<String, String> configurazione = new HashMap<String, String>();
configurazione.put("neostore.propertystore.db.strings.mapped_memory", "250M");
configurazione.put("neostore.propertystore.db.arrays.mapped_memory", "100M");
configurazione.put("neostore.relationshipstore.db.mapped_memory", "3845M");
configurazione.put("neostore.nodestore.db.mapped_memory", "350M");
configurazione.put("neostore.propertystore.db.mapped_memory", "350M");
configurazione.put("neostore.nodestore.db.mapped_memory", "769M");
Neo4j2Graph grafo = new Neo4j2Graph("/Users/pipe/Dev/neo4j-community-2.1.0-M01/data/graph.db", configurazione);
Now the exception is changed, and i really don't know what is wrong.. I linked in paste bin to report the complete stack.
http://pastebin.com/XpipSysp
at last a NoSuchMethodError is thrown. What am I missing?
Thanks a lot.
Which blueprints version are you using?
Blueprints 2.5-SNAPSHOT is compatible with Neo4j 2.0.0.
Please note there is a separate module for Neo4j 2.0 called blueprints-neo4j2
And the classes are called Neo4j2Graph Neo4j2Vertex etc.
You should also be able to provide config to the Neo4j2Graph.

Resources