Category Archives: Error

Syntaxerror: unexpected end of JSON input [How to Solve]

Onload executes only once
SetData stores data in the page cache
if the data is undefined, you may need that = this. After the curly braces, the of these changes
e in the event function is an event, which refers to the event of this operation
options are objects.

If it is written like this, an error will be reported: syntax error: unexpected end of JSON input

At this time, do not use the arrow function!

So there is no error!

Qt Error: Debug Assertion Failed [How to Solve]

Purpose

I want to batch write controls into a layout. Qlabel and QWidget have about 20. It’s too hard to write line by line.

Qt Debug Assertion Failed! Error reporting reason

It is estimated that it is a wild pointer or a memory leak, because I often have the problem of memory access out of bounds when I use an array. As shown in the figure:

My error code

    QVBoxLayout* layout = new QVBoxLayout;//new creates a layout
    QLabel* labels = new QLabel[3];// here new an array of three QLabels;
    QStringList qstrList;
    qstrList<<u8 "Event list" << u8 "Assessment criteria" <<u8 "Subject list";//three strings
    for(int i = 0; i<3;i++){
        labels[i].setText(qstrList.at(i));//QLabel set text
        //---- set Qss----
        //---- set the font ----
    }
    for(int i = 0;i<3;i++){
        layout->addWidget(&labels[i]);//add QLabel to the layouts
    }

If it can be displayed, an error will be reported on the X of the closed window at the point, as shown in the figure:


My labels variable is not a member variable, which does not involve the problem of destruct before closing the window. If you change release to close the window, the word program abnormal end will also appear.

My solution

I’m used to using C + + arrays before. It’s better to replace QT batch setting components with containers such as qvector and qlist. Resolved Code:

QVBoxLayout* layout = new QVBoxLayout;//new has a layter
QVector<QLabel*> labels(3);//1. Now I know I have to use three so I limited it to three to prevent memory copies. You can also try the QList container 
//2. The type in the container can't be a component, only a pointer to a component.


    QStringList qstrList;
    qstrList<<u8 "EventList" << u8 "Assessment Criteria" <<u8 "SubjectList";//three strings
    for(int i = 0; i<3;i++){
        QLabel* label = new QLabel(qstrList.at(i));
        //---- set Qss----
        //---- set the font ----
    labels.append(label);
    }
    for(int i = 0;i<labels.size();i++){
        layout->addWidget(labels.at(i));
    }

Close the window again and there will be no error. I think the previous error report is the cause of the layout. I saw qtcreate warn me not to use the new control array.

[Solved] Unity package Error: CommandInvokationFailure: Gradle build failed.

CommandInvokationFailure: Gradle build failed.
F:/Program Files/Unity/2017.4.31f/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\OpenJDK\Windows\bin\java.exe -classpath “F:\Program Files\Unity\2017.4.31f\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.6.0.jar” org.gradle.launcher.GradleMain “-Dorg.gradle.jvmargs=-Xmx4096m” “assembleRelease”

 

Solution:

if there is where in the error message: followed by garbled characters, it means that the path is wrong, and neither the project nor the signature can be in English.

Manifest merger failed with multiple errors, see logs [How to Solve]

Today, when accessing an Android SDK, I reported a problem of manifest merge failed with multiple errors, see logs. Google said that this problem often occurs when introducing a third-party SDK. In fact, it is a dependency conflict
you can see the specific error information above the error, as shown below

it indicates that there is a com.tencent.mid conflict. Just exclude

[Solved] Tensorflow Error: failed to create cublas handle: CUBLAS_STATUS_ALLOC_FAILED

Tensorflow failed to create cublas handle: cublas_ STATUS_ ALLOC_ FAILED

Foreword problem description problem solving reference link

preface

After many days of in-depth learning, I finally learned to use GPU. I was very happy, but I chatted with my classmates and learned that my 1660ti running in-depth learning is nothing. Dunton doesn’t hold any hope. It’s good to use notebooks for learning. If you really run in-depth learning, you have to use laboratory computers. Alas, there’s still no money

Problem description

An error occurred while using GPU

2021-11-09 20:43:26.114720: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_100.dll
2021-11-09 20:43:26.386261: E tensorflow/stream_executor/cuda/cuda_blas.cc:238] failed to create cublas handle: CUBLAS_STATUS_ALLOC_FAILED
2021-11-09 20:43:26.386617: E tensorflow/stream_executor/cuda/cuda_blas.cc:238] failed to create cublas handle: CUBLAS_STATUS_ALLOC_FAILED
2021-11-09 20:43:26.386735: W tensorflow/stream_executor/stream.cc:1919] attempting to perform BLAS operation using StreamExecutor without BLAS support
Traceback (most recent call last):
  File "first.py", line 30, in <module>
    gpu_time = timeit.timeit(gpu_run,number=10)
  File "D:\Anaconda\Anaconda3\envs\tensorflow2_0_0_gpu\lib\timeit.py", line 233, in timeit
    return Timer(stmt, setup, timer, globals).timeit(number)
  File "D:\Anaconda\Anaconda3\envs\tensorflow2_0_0_gpu\lib\timeit.py", line 177, in timeit
    timing = self.inner(it, self.timer)
  File "<timeit-src>", line 6, in inner
  File "first.py", line 21, in gpu_run
    c = tf.matmul(gpu_a,gpu_b)
  File "D:\Anaconda\Anaconda3\envs\tensorflow2_0_0_gpu\lib\site-packages\tensorflow_core\python\util\dispatch.py", line 180, in wrapper
    return target(*args, **kwargs)
  File "D:\Anaconda\Anaconda3\envs\tensorflow2_0_0_gpu\lib\site-packages\tensorflow_core\python\ops\math_ops.py", line 2765, in matmul
    a, b, transpose_a=transpose_a, transpose_b=transpose_b, name=name)
  File "D:\Anaconda\Anaconda3\envs\tensorflow2_0_0_gpu\lib\site-packages\tensorflow_core\python\ops\gen_math_ops.py", line 6126, in mat_mul
    _six.raise_from(_core._status_to_exception(e.code, message), None)
  File "<string>", line 3, in raise_from
tensorflow.python.framework.errors_impl.InternalError: Blas GEMM launch failed : a.shape=(10000, 1000), b.shape=(1000, 2000), m=10000, n=2000, k=1000 [Op:MatMul] name: MatMul/

I was in a hurry to find out the reason. I didn’t have enough video memory, and the GPU didn’t run full

Solution:

There are two main reasons
1. The versions of cudnn and CUDA and tensorflow are not applicable, but mine are based on the tutorial and confirmed several times to ensure that they are OK. This excludes the shortage of GPU video memory. It can be solved through the method on the official website: t because ensorflow 2.0 supports two GPU computing methods:
(1) dynamically allocate video memory
(2) set hard video memory (for example, only 1g video memory can be used, and others can play games
set the mode to (1) dynamic allocation, and the code is;

import tensorflow as tf

gpus = tf.config.experimental.list_physical_devices(device_type='GPU')
tf.config.experimental.set_memory_growth(gpus[0], True)

QT Error: Failed to create vertex shader [Three Methods to Fix]

As in the question, qt6 runs the quick program. If this error occurs, you only need to set the value of the environment variable QT_QUICK_BACKEND to “software”.
there are three methods:

Solution:

Method 1: add this environment variable to the system environment variable, as shown in the figure below

This method is applicable to the global
right-click this computer icon -> Attribute -> Advanced system settings -> Environment variable – > New

after setting, you need to restart the IDE and rebuild the project
note: this method is not recommended, otherwise running the program on a computer without setting this environment variable may fail

Method 2: by setting environment variables in QT program

This method is applicable to a single program
set the environment variables applicable to this program in the main function

qputenv("QT_QUICK_BACKEND","software");

Method 3: directly set the scenegraphbacken

This method applies to a single program

#include <QQuickWindow>
QQuickWindow::setSceneGraphBackend("software");

[Solved] Error: failed to create deliver client: orderer client failed to connect to orderer.example.com:7050

Error: failed to create deliver client: orderer client failed to connect to orderer.example.com:7050: failed to create new connection: context deadline exceeded
!!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========Solution: stop the network first
./byfn.sh -m down
Then enter: sudo vim /etc/resolv.conf
Then open the fabric-samples/first-network/base/docker-compose-base.yaml file
Add each environment:
– GODEBUG=netdns=go

[Solved] Pre requisite check “checksystemcommandavailable” failed

[oracle@db1 ~]$ /u01/app/oracle/product/11.2.0/db_1/OPatch/opatch apply -oh /u01/app/oracle/product/11.2.0/db_1  -local /soft/22646198/22502456
Oracle Interim patch installer version 11.2.0.3.29
Copyright (c) 2021, Oracle Corporation. all rights reserved.


Oracle home directory: /u01/app/oracle/product/11.2.0/db_1
Main product list: /u01/app/oraInventory
    From: /u01/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version: 11.2.0.3.29
OUI version: 11.2.0.4.0
Log file location:/u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2021-11-05_08-58-35AM_1.log

Verifying environment and performing prerequisite checks...
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
UtilSession Failed: 
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Log file location: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2021-11-05_08-58-35AM_1.log

OPatch failed with error code 73

Installation package:

yum install -y psmisc

Problem solving

[Solved] TF2.4 Error: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize

First, check whether the CUDA version and cudnn version are aligned.

Version number view:

Note that CUDA indicates the minimum compatibility. For example, version 2.4 and above 11.0 are OK. My side is 11.5, and there is no problem

The error on my side is caused by insufficient video memory

For the error of insufficient video memory, add the following code.

import tensorflow as tf
config = tf.compat.v1.ConfigProto()
config.gpu_options.allow_growth = True
session = tf.compat.v1.InteractiveSession(config=config)

MAC-XXL_JOB Error: Failed to create parent directories for [/data/applogs/xxl-job/xxl-job-admin.log

MAC-XXL_ Job learning pit stepping record

Source download address startup error

Source download address

①. GitHub: https://github.com/xuxueli/xxl-job
②. code cloud: https://gitee.com/xuxueli0323/xxl-job

Startup error

The error information is as follows:

10:39:42,324 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[file] - Failed to create parent directories for [/data/applogs/xxl-job/xxl-job-admin.log]
10:39:42,324 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[file] - openFile(/data/applogs/xxl-job/xxl-job-admin.log,true) call failed. java.io.FileNotFoundException: /data/applogs/xxl-job/xxl-job-admin.log (No such file or directory)
	at java.io.FileNotFoundException: /data/applogs/xxl-job/xxl-job-admin.log (No such file or directory)
	at 	at java.io.FileOutputStream.open0(Native Method)
	at 	at java.io.FileOutputStream.open(FileOutputStream.java:270)
	at 	at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
	at 	at ch.qos.logback.core.recovery.ResilientFileOutputStream.<init>(ResilientFileOutputStream.java:26)
	at 	at ch.qos.logback.core.FileAppender.openFile(FileAppender.java:204)
	at 	at ch.qos.logback.core.FileAppender.start(FileAppender.java:127)
	at 	at ch.qos.logback.core.rolling.RollingFileAppender.start(RollingFileAppender.java:100)
	at 	at ch.qos.logback.core.joran.action.AppenderAction.end(AppenderAction.java:90)
	at 	at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:309)
	at 	at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:193)
	at 	at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:179)
	at 	at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:62)
	at 	at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165)
	at 	at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152)
	at 	at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110)
	at 	at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
	at 	at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
	at 	at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
	at 	at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
	at 	at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
	at 	at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
	at 	at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
	at 	at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:417)
	at 	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:362)
	at 	at org.apache.commons.logging.LogAdapter$Slf4jAdapter.createLocationAwareLog(LogAdapter.java:130)
	at 	at org.apache.commons.logging.LogAdapter.createLog(LogAdapter.java:91)
	at 	at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:67)
	at 	at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:59)
	at 	at org.springframework.boot.SpringApplication.<clinit>(SpringApplication.java:206)
	at 	at com.xxl.job.admin.XxlJobAdminApplication.main(XxlJobAdminApplication.java:13)
10:39:42,324 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
10:39:42,324 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [console] to Logger[ROOT]
10:39:42,324 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [file] to Logger[ROOT]
10:39:42,325 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
10:39:42,325 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@6e06451e - Registering current configuration as safe fallback point

Logging system failed to initialize using configuration from 'null'
java.lang.IllegalStateException: Logback configuration error detected: 
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[file] - Failed to create parent directories for [/data/applogs/xxl-job/xxl-job-admin.log]
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[file] - openFile(/data/applogs/xxl-job/xxl-job-admin.log,true) call failed. java.io.FileNotFoundException: /data/applogs/xxl-job/xxl-job-admin.log (No such file or directory)
	at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:179)
	at org.springframework.boot.logging.logback.LogbackLoggingSystem.reinitialize(LogbackLoggingSystem.java:232)
	at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(AbstractLoggingSystem.java:73)
	at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:60)
	at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:132)
	at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:312)
	at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:281)
	at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:239)
	at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:216)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:131)
	at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:82)
	at org.springframework.boot.SpringApplicationRunListeners.lambda$environmentPrepared$2(SpringApplicationRunListeners.java:63)
	at java.util.ArrayList.forEach(ArrayList.java:1259)
	at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:117)
	at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:111)
	at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:62)
	at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:375)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:333)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1340)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1329)
	at com.xxl.job.admin.XxlJobAdminApplication.main(XxlJobAdminApplication.java:13)

This means that the initialization log file is not created due to insufficient permissions! Then the online solution is the same as

but when I operate, I suddenly prompt that the parent directory has only read-only permission. What the hell

zhaoxiaofeng@zhaoxiaofengdeMacBook-Pro ~ % cd /
zhaoxiaofeng@zhaoxiaofengdeMacBook-Pro/% pwd     
/
zhaoxiaofeng@zhaoxiaofengdeMacBook-Pro/% sudo mkdir data
Password:
mkdir: data: Read-only file system
zhaoxiaofeng@zhaoxiaofengdeMacBook-Pro/% 

Then there is another search. Sure enough, it is the same to start SPI, etc., but the system restart will fail, so this can not essentially solve the problem. Later, in the comments of netizens, it was found that only adding “.” before recording log path can solve the problem. As follows:
will make complaints about /data/applogs/xxl-job/xxl-job-admin.log when ./data/applogs/xxl-job/xxl-job-admin.log
is replaced by ./data/applogs/xxl-job/xxl-job-admin.log
. Only copy and carry
I can’t help but sigh that I have commented on Daniel since ancient times

[Solved] Docker: Error response from daemon: driver failed programming external connectivity on endpoint mysq

docker: Error response from daemon: driver failed programming external connectivity on endpoint mysql (3d8d89f260c9258467f589d4d7d0c27e33ab72d732d1115d1eb42d708606edc4):
So far, the container is occupied

# docker ps -a
CONTAINER ID   IMAGE       COMMAND                  CREATED              STATUS    PORTS     NAMES
a57959032cc9   mysql:5.7   "docker-entrypoint.s…"   About a minute ago   Created             mysql
# docker rm a57959032cc9
a57959032cc9

Error starting userland proxy: listen tcp4 0.0.0.0:3306: bind: address already in use.
the following is the occupied port number

# netstat -tanlp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      948/sshd            
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      9217/mysqld         
tcp        0      0 172.18.7.111:39412      100.100.45.106:443      TIME_WAIT   -                   
tcp        0      0 172.18.7.111:22         58.100.92.78:9024       ESTABLISHED 6899/sshd: root@pts 

See for yourself which is occupied, and then delete it with kill + port number