- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我收到的具体错误如下:
07-01 15:58:03.674: A/DEBUG(14660): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-01 15:58:03.674: A/DEBUG(14660): Build fingerprint: 'Zebra/MC33/MC33:7.1.2/01-01-49-NG-00-A/7:user/release-keys'
07-01 15:58:03.674: A/DEBUG(14660): Revision: '0'
07-01 15:58:03.674: A/DEBUG(14660): ABI: 'arm64'
07-01 15:58:03.674: A/DEBUG(14660): pid: 14548, tid: 14548, name: x_pick_pack_app >>> corp.cranegroup.corp.iplex_pick_pack_app <<<
07-01 15:58:03.675: A/DEBUG(14660): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x40b61c00
07-01 15:58:03.675: A/DEBUG(14660): x0 0000000000000001 x1 0000007ff08bb650 x2 0000000000000000 x3 0000000000000000
07-01 15:58:03.675: A/DEBUG(14660): x4 0000000000000000 x5 88be1f8cfe791c83 x6 0000000000000000 x7 00000000fffffff5
07-01 15:58:03.675: A/DEBUG(14660): x8 0000000040b61c00 x9 88be1f8cfe791c83 x10 88be1f8cfe791c83 x11 0000000000000007
07-01 15:58:03.675: A/DEBUG(14660): x12 0000007ff08b9c70 x13 0000007f95690600 x14 0000007ff08b9d88 x15 0000000000000000
07-01 15:58:03.675: A/DEBUG(14660): x16 0000007f9761c008 x17 0000007f97545444 x18 0000000000000000 x19 0000007f956a3000
07-01 15:58:03.675: A/DEBUG(14660): x20 0000007f956a30a8 x21 0000000000000000 x22 0000007f86940f30 x23 0000007f86940f18
07-01 15:58:03.675: A/DEBUG(14660): x24 000000000000003f x25 0000000000000003 x26 0000007ff08bb7d8 x27 000000000000003f
07-01 15:58:03.675: A/DEBUG(14660): x28 0000000000000001 x29 0000007ff08bb930 x30 0000007f96020338
07-01 15:58:03.675: A/DEBUG(14660): sp 0000007ff08bb790 pc 0000007f96020354 pstate 0000000060000000
07-01 15:58:04.147: A/DEBUG(14660): backtrace:
07-01 15:58:04.148: A/DEBUG(14660): #00 pc 0000000000018354 /system/lib64/libutils.so (_ZN7android6Looper9pollInnerEi+884)
07-01 15:58:04.148: A/DEBUG(14660): #01 pc 0000000000017f30 /system/lib64/libutils.so (_ZN7android6Looper8pollOnceEiPiS1_PPv+60)
07-01 15:58:04.148: A/DEBUG(14660): #02 pc 00000000000f2794 /system/lib64/libandroid_runtime.so (_ZN7android18NativeMessageQueue8pollOnceEP7_JNIEnvP8_jobjecti+48)
07-01 15:58:04.148: A/DEBUG(14660): #03 pc 0000000001fc3e40 /system/framework/arm64/boot-framework.oat (offset 0x1702000) (android.os.MessageQueue.nativePollOnce+140)
07-01 15:58:04.148: A/DEBUG(14660): #04 pc 0000000001fc5a60 /system/framework/arm64/boot-framework.oat (offset 0x1702000) (android.os.MessageQueue.next+236)
07-01 15:58:04.148: A/DEBUG(14660): #05 pc 0000000001fbf778 /system/framework/arm64/boot-framework.oat (offset 0x1702000) (android.os.Looper.loop+340)
07-01 15:58:04.148: A/DEBUG(14660): #06 pc 00000000017bf758 /system/framework/arm64/boot-framework.oat (offset 0x1702000) (android.app.ActivityThread.main+516)
07-01 15:58:04.148: A/DEBUG(14660): #07 pc 00000000000d2868 /system/lib64/libart.so (art_quick_invoke_static_stub+600)
07-01 15:58:04.148: A/DEBUG(14660): #08 pc 00000000000df2b0 /system/lib64/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+252)
07-01 15:58:04.148: A/DEBUG(14660): #09 pc 000000000042a784 /system/lib64/libart.so (_ZN3artL18InvokeWithArgArrayERKNS_33ScopedObjectAccessAlreadyRunnableEPNS_9ArtMethodEPNS_8ArgArrayEPNS_6JValueEPKc+108)
07-01 15:58:04.148: A/DEBUG(14660): #10 pc 000000000042c2f4 /system/lib64/libart.so (_ZN3art12InvokeMethodERKNS_33ScopedObjectAccessAlreadyRunnableEP8_jobjectS4_S4_m+1188)
07-01 15:58:04.148: A/DEBUG(14660): #11 pc 00000000003a372c /system/lib64/libart.so (_ZN3artL13Method_invokeEP7_JNIEnvP8_jobjectS3_S3_+56)
07-01 15:58:04.148: A/DEBUG(14660): #12 pc 000000000061aa58 /system/framework/arm64/boot.oat (offset 0x54e000) (java.lang.reflect.Method.invoke+180)
07-01 15:58:04.148: A/DEBUG(14660): #13 pc 0000000002696a60 /system/framework/arm64/boot-framework.oat (offset 0x1702000) (com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run+124)
07-01 15:58:04.148: A/DEBUG(14660): #14 pc 0000000002697cbc /system/framework/arm64/boot-framework.oat (offset 0x1702000) (com.android.internal.os.ZygoteInit.main+1432)
07-01 15:58:04.148: A/DEBUG(14660): #15 pc 00000000000d2868 /system/lib64/libart.so (art_quick_invoke_static_stub+600)
07-01 15:58:04.148: A/DEBUG(14660): #16 pc 00000000000df2b0 /system/lib64/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+252)
07-01 15:58:04.148: A/DEBUG(14660): #17 pc 000000000042a784 /system/lib64/libart.so (_ZN3artL18InvokeWithArgArrayERKNS_33ScopedObjectAccessAlreadyRunnableEPNS_9ArtMethodEPNS_8ArgArrayEPNS_6JValueEPKc+108)
07-01 15:58:04.148: A/DEBUG(14660): #18 pc 000000000042a3dc /system/lib64/libart.so (_ZN3art17InvokeWithVarArgsERKNS_33ScopedObjectAccessAlreadyRunnableEP8_jobjectP10_jmethodIDSt9__va_list+380)
07-01 15:58:04.148: A/DEBUG(14660): #19 pc 0000000000345048 /system/lib64/libart.so (_ZN3art3JNI21CallStaticVoidMethodVEP7_JNIEnvP7_jclassP10_jmethodIDSt9__va_list+604)
07-01 15:58:04.148: A/DEBUG(14660): #20 pc 00000000000a0794 /system/lib64/libandroid_runtime.so
07-01 15:58:04.148: A/DEBUG(14660): #21 pc 00000000000a2e84 /system/lib64/libandroid_runtime.so (_ZN7android14AndroidRuntime5startEPKcRKNS_6VectorINS_7String8EEEb+692)
07-01 15:58:04.148: A/DEBUG(14660): #22 pc 0000000000002260 /system/bin/app_process64
07-01 15:58:04.148: A/DEBUG(14660): #23 pc 000000000001a7d8 /system/lib64/libc.so (__libc_init+88)
07-01 15:58:04.148: A/DEBUG(14660): #24 pc 0000000000001ccc /system/bin/app_process64
对于我的应用程序,我没有 native 代码库作为我构建的应用程序的一部分,我的 Gradle 如下:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
defaultConfig {
applicationId "corp.cranegroup.corp.iplex_pick_pack_app"
minSdkVersion 19
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
}
}
buildToolsVersion '26.0.2'
}
dependencies {
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:25.+'
compile 'com.android.support:design:25.+'
}
我无法使用本网站上的其他答案来开始调试实际错误,无论是否是因为空引用。几乎所有关于 native 代码的其他内容似乎都是关于调试您自己编写的 native 代码,但是我需要的是查看最终被错误引用的内容,以便我可以修复我正在使用的 Java 代码。作为引用,java如下
public void goNext(View view) {
if(view != null) {
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(view.getWindowToken(),0);
}
edtInput.setText(edtInput.getText().toString().trim());
if (edtInput.getText().toString().isEmpty()){
txtError.setText("Please Enter Qty Picked Number");
} else {
// checking the network connection before starting the Activity
ConnectivityManager connMgr = (ConnectivityManager)
getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();
if (networkInfo != null && networkInfo.isConnected()) {
String qtyEntered = edtInput.getText().toString();
try{
//Check if there is a /n at the end, remove if there is one
if (qtyEntered.length() > 0 ) {
char lastCharacter = qtyEntered.charAt(qtyEntered.length() - 1);
if (lastCharacter == '\n') {
String barcode = qtyEntered.subSequence(0, qtyEntered.length() - 1).toString();
Log.d(TAG, "Barcode=" + barcode);
qtyEntered = barcode.trim();
}
}
}catch (Exception e){
e.printStackTrace();
}
Intent intent = null;
if (Integer.parseInt(qtyEntered) < Integer.parseInt(_tasks.get(_taskIndex).getQty_to_pick())){
if (confirmShortPick(qtyEntered)){
if (getYNPickMore(qtyEntered)){
try{
intent = new Intent(getApplicationContext(), ShortPickActivity.class);
intent.putExtra("qtyEntered", qtyEntered);
intent.putExtra("taskArray", _tasks);
intent.putExtra("taskIndex", _taskIndex);
intent.putExtra("curTrip", _curTrip);
//startActivity(intent);
}
catch (Exception e ){
e.printStackTrace();
}
} else {
intent = new Intent(getApplicationContext(), LocToActivity.class);
intent.putExtra("qtyEntered", qtyEntered);
intent.putExtra("taskArray", _tasks);
intent.putExtra("taskIndex", _taskIndex);
intent.putExtra("curTrip", _curTrip);
//startActivity(intent);
}
} else {
intent = new Intent(getApplicationContext(), QuantityActivity.class);
intent.putExtra("ERROR_CODE", "Warning: You Selected to Pick the Full Qty, Please Pick Full Qty from ".concat(_fromLoc));
intent.putExtra("itemScanned", _curItem);
intent.putExtra("taskArray", _tasks);
intent.putExtra("taskIndex", _taskIndex);
intent.putExtra("curTrip", _curTrip);
//startActivity(intent);
}
} else {
intent = new Intent(getApplicationContext(), LocToActivity.class);
intent.putExtra("qtyEntered", qtyEntered);
intent.putExtra("taskArray", _tasks);
intent.putExtra("taskIndex", _taskIndex);
intent.putExtra("curTrip", _curTrip);
//startActivity(intent);
}
//} else {
//txtError.setText("Please Scan the correct Location for this trip");
//}
//if (Objects.equals(itemCode.trim(), _locCode.trim())) {
//Log.d(TAG, "goNext: locCode matches");
if (intent != null) {
startActivity(intent);
}
} else {
txtError.setText("No network connection available.");
}
}
}
public boolean getYNPickMore(String qtyPicked){
final Handler handler = new Handler() {
@Override
public void handleMessage(Message mesg) {
throw new RuntimeException();
}
};
final Boolean[] result = {false};
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("Confirm Picked Qty of".concat(qtyPicked));
builder.setMessage("Do you want to pick this item from a different location?");
builder.setPositiveButton("Pick from other location", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
// Do nothing but close the dialog
result[0] = true;
handler.sendMessage(handler.obtainMessage());
}
});
builder.setNegativeButton("NO", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// Do nothing
result[0] = false;
handler.sendMessage(handler.obtainMessage());
}
});
AlertDialog alert = builder.create();
alert.show();
try{ Looper.loop(); }
catch(RuntimeException e){}
return result[0];
}
public boolean confirmShortPick(String qtyPicked) {
final Handler handler = new Handler() {
@Override
public void handleMessage(Message mesg) {
throw new RuntimeException();
}
};
final Boolean[] result = {false};
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("Confirm Picked Qty of".concat(qtyPicked));
builder.setMessage("Are you sure you want to short pick from this location?");
builder.setPositiveButton("Short Pick from here", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
// Do nothing but close the dialog
result[0] = true;
handler.sendMessage(handler.obtainMessage());
}
});
builder.setNegativeButton("NO", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// Do nothing
result[0] = false;
handler.sendMessage(handler.obtainMessage());
}
});
AlertDialog alert = builder.create();
alert.show();
try{ Looper.loop(); }
catch(RuntimeException e){}
return result[0];
}
最佳答案
好的,经过更多测试后,我发现了 answer我的问题是,主循环在任何时候处理的工作量似乎都有一个任意限制,这就是 Sigsegv 错误的原因。
因此,为了处理阻塞/非阻塞警报对话框的特定问题,我在 goNext 函数中执行了以下操作'''Java
@Override
public void goNext(View view) {
if(view != null) {
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(view.getWindowToken(),0);
}
final Handler mHandlerThread = new Handler(){
@Override
public void handleMessage(Message msg) {
super.handleMessage(msg);
if (msg.what == 400){
txtError.setText(msg.getData().getString("Error"));
} else if (msg.what == 100){
startActivity((Intent) msg.getData().getParcelable("Intent"));
}
}
};
Thread blockingThread = new Thread(new Runnable() {
@Override
public void run() {
Looper.prepare();
Message message = new Message();
Bundle bundle = new Bundle();
edtInput.setText(edtInput.getText().toString().trim());
if (edtInput.getText().toString().isEmpty()){
message.what = 400;
bundle.putString("Error","Please Enter Qty Picked Number");
message.setData(bundle);
} else {
// checking the network connection before starting the Activity
ConnectivityManager connMgr = (ConnectivityManager)
getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();
if (networkInfo != null && networkInfo.isConnected()) {
String qtyEntered = edtInput.getText().toString();
try{
//Check if there is a /n at the end, remove if there is one
if (qtyEntered.length() > 0 ) {
char lastCharacter = qtyEntered.charAt(qtyEntered.length() - 1);
if (lastCharacter == '\n') {
String barcode = qtyEntered.subSequence(0, qtyEntered.length() - 1).toString();
Log.d(TAG, "Barcode=" + barcode);
qtyEntered = barcode.trim();
}
}
}catch (Exception e){
e.printStackTrace();
}
Intent intent = null;
if (Integer.parseInt(qtyEntered) < Integer.parseInt(_tasks.get(_taskIndex).getQty_to_pick())){
if (confirmShortPick(qtyEntered)){
if (getYNPickMore(qtyEntered)){
try{
intent = new Intent(getApplicationContext(), ShortPickActivity.class);
intent.putExtra("qtyEntered", qtyEntered);
intent.putExtra("taskArray", _tasks);
intent.putExtra("taskIndex", _taskIndex);
intent.putExtra("curTrip", _curTrip);
//startActivity(intent);
}
catch (Exception e ){
e.printStackTrace();
}
} else {
intent = new Intent(getApplicationContext(), LocToActivity.class);
intent.putExtra("qtyEntered", qtyEntered);
intent.putExtra("taskArray", _tasks);
intent.putExtra("taskIndex", _taskIndex);
intent.putExtra("curTrip", _curTrip);
//startActivity(intent);
}
} else {
intent = new Intent(getApplicationContext(), QuantityActivity.class);
intent.putExtra("ERROR_CODE", "Warning: You Selected to Pick the Full Qty, Please Pick Full Qty from ".concat(_fromLoc));
intent.putExtra("itemScanned", _curItem);
intent.putExtra("taskArray", _tasks);
intent.putExtra("taskIndex", _taskIndex);
intent.putExtra("curTrip", _curTrip);
//startActivity(intent);
}
} else {
intent = new Intent(getApplicationContext(), LocToActivity.class);
intent.putExtra("qtyEntered", qtyEntered);
intent.putExtra("taskArray", _tasks);
intent.putExtra("taskIndex", _taskIndex);
intent.putExtra("curTrip", _curTrip);
//startActivity(intent);
}
//} else {
//txtError.setText("Please Scan the correct Location for this trip");
//}
//if (Objects.equals(itemCode.trim(), _locCode.trim())) {
//Log.d(TAG, "goNext: locCode matches");
if (intent != null) {
message.what = 100; //success
bundle.putParcelable("Intent",intent);
message.setData(bundle);
}
} else {
message.what = 400; //error
bundle.putString("Error","No network connection available.");
message.setData(bundle);
}
}
mHandlerThread.sendMessage(message);
}
});
blockingThread.start();
//new QuantityActivity.goNextAsynch().execute(view);
}
通过将上述内容拉入其自己的线程中,我能够阻止移动到下一个 Activity ,同时应用程序等待来自 AlertDialog 的用户输入。
关于java - 在 Android 3.0 中,当没有 native 代码库时,我无法使用 ndk-build 调试 native 代码错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56831327/
我通过 spring ioc 编写了一些 Rest 应用程序。但我无法解决这个问题。这是我的异常(exception): org.springframework.beans.factory.BeanC
我对 TestNG、Spring 框架等完全陌生,我正在尝试使用注释 @Value通过 @Configuration 访问配置文件注释。 我在这里想要实现的目标是让控制台从配置文件中写出“hi”,通过
为此工作了几个小时。我完全被难住了。 这是 CS113 的实验室。 如果用户在程序(二进制计算器)结束时选择继续,我们需要使用 goto 语句来到达程序的顶部。 但是,我们还需要释放所有分配的内存。
我正在尝试使用 ffmpeg 库构建一个小的 C 程序。但是我什至无法使用 avformat_open_input() 打开音频文件设置检查错误代码的函数后,我得到以下输出: Error code:
使用 Spring Initializer 创建一个简单的 Spring boot。我只在可用选项下选择 DevTools。 创建项目后,无需对其进行任何更改,即可正常运行程序。 现在,当我尝试在项目
所以我只是在 Mac OS X 中通过 brew 安装了 qt。但是它无法链接它。当我尝试运行 brew link qt 或 brew link --overwrite qt 我得到以下信息: ton
我在提交和 pull 时遇到了问题:在提交的 IDE 中,我看到: warning not all local changes may be shown due to an error: unable
我跑 man gcc | grep "-L" 我明白了 Usage: grep [OPTION]... PATTERN [FILE]... Try `grep --help' for more inf
我有一段代码,旨在接收任何 URL 并将其从网络上撕下来。到目前为止,它运行良好,直到有人给了它这个 URL: http://www.aspensurgical.com/static/images/a
在过去的 5 个小时里,我一直在尝试在我的服务器上设置 WireGuard,但在完成所有设置后,我无法 ping IP 或解析域。 下面是服务器配置 [Interface] Address = 10.
我正在尝试在 GitLab 中 fork 我的一个私有(private)项目,但是当我按下 fork 按钮时,我会收到以下信息: No available namespaces to fork the
我这里遇到了一些问题。我是 node.js 和 Rest API 的新手,但我正在尝试自学。我制作了 REST API,使用 MongoDB 与我的数据库进行通信,我使用 Postman 来测试我的路
下面的代码在控制台中给出以下消息: Uncaught DOMException: Failed to execute 'appendChild' on 'Node': The new child el
我正在尝试调用一个新端点来显示数据,我意识到在上一组有效的数据中,它在数据周围用一对额外的“[]”括号进行控制台,我认为这就是问题是,而新端点不会以我使用数据的方式产生它! 这是 NgFor 失败的原
我正在尝试将我的 Symfony2 应用程序部署到我的 Azure Web 应用程序,但遇到了一些麻烦。 推送到远程时,我在终端中收到以下消息 remote: Updating branch 'mas
Minikube已启动并正在运行,没有任何错误,但是我无法 curl IP。我在这里遵循:https://docs.traefik.io/user-guide/kubernetes/,似乎没有提到关闭
每当我尝试docker组成任何项目时,都会出现以下错误。 我尝试过有和没有sudo 我在这台机器上只有这个问题。我可以在Mac和Amazon WorkSpace上运行相同的容器。 (myslabs)
我正在尝试 pip install stanza 并收到此消息: ERROR: No matching distribution found for torch>=1.3.0 (from stanza
DNS 解析看起来不错,但我无法 ping 我的服务。可能是什么原因? 来自集群中的另一个 Pod: $ ping backend PING backend.default.svc.cluster.l
我正在使用Hibernate 4 + Spring MVC 4当我开始 Apache Tomcat Server 8我收到此错误: Error creating bean with name 'wel
我是一名优秀的程序员,十分优秀!