Author Archives: Robins

IDEA springboot can recognize POM files, but suddenly it can’t reference mven dependencies. Strange things, inexplicable solutions

Foreword: today I open idea 2020.3 and find that all the spring boot projects can’t find all the dependencies. These projects were started normally yesterday

then I subconsciously thought that my Maven settings were wrong, but I checked and found that there was no problem with Maven configuration, and idea also recognized the pom.xml file. After reloading Maven dependencies several times, it still couldn’t work. Emmmmm, I think it may be caused by idea cache, right?The entire project was reloaded, but still not. Then I went to Baidu. There were not many solutions on Baidu and what I did above. I put on a mask of pain. I’m just a rookie. How can I meet this kind of thing?T.T.


Suddenly, I noticed that the red dot of idea event log was flashing, and I click to see

It said that there was something wrong with my plug-in, emmmmm. I don’t know why it suddenly went wrong, so I unloaded the plug-in, restarted the idea, and returned to normal. My God, what’s the situation?

Log content of event log

2021-07-08 09:44:26,967 [  59955]  ERROR - penapi.project.DumbServiceImpl - IntelliJ IDEA 2020.3.2  Build #IU-203.7148.57 
2021-07-08 09:44:26,967 [  59955]  ERROR - penapi.project.DumbServiceImpl - JDK: 11.0.9.1; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o. 
2021-07-08 09:44:26,967 [  59955]  ERROR - penapi.project.DumbServiceImpl - OS: Windows 10 
2021-07-08 09:44:26,968 [  59956]  ERROR - penapi.project.DumbServiceImpl - Plugin to blame: RestfulToolkit version: 2.0.9 
2021-07-08 09:44:26,968 [  59956]  ERROR - penapi.project.DumbServiceImpl - Last Action:  
2021-07-08 09:44:27,072 [  60060]  ERROR - penapi.project.DumbServiceImpl - Error executing task com.intellij.util.DisposeAwareRunnable@51a99ed3 
java.lang.NoClassDefFoundError: Could not initialize class com.zhaow.restful.common.ToolkitIcons
	at com.zhaow.restful.navigator.RestServicesNavigator.initToolWindow(RestServicesNavigator.java:118)
	at com.zhaow.restful.navigator.RestServicesNavigator.lambda$initComponent$0(RestServicesNavigator.java:105)
	at com.intellij.util.DisposeAwareRunnable.run(DisposeAwareRunnable.java:72)
	at com.intellij.openapi.project.DumbServiceImpl.doRun(DumbServiceImpl.java:399)
	at com.intellij.openapi.project.DumbServiceImpl.updateFinished(DumbServiceImpl.java:391)
	at com.intellij.openapi.project.TrackedEdtActivityService$TrackedEdtActivity.run(TrackedEdtActivityService.java:100)
	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:216)
	at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:24)
	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:199)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:822)
	at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:324)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:85)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:134)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:47)
	at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:190)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:976)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:843)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:454)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:773)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:453)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:822)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:501)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
2021-07-08 09:44:27,072 [  60060]  ERROR - penapi.project.DumbServiceImpl - IntelliJ IDEA 2020.3.2  Build #IU-203.7148.57 
2021-07-08 09:44:27,072 [  60060]  ERROR - penapi.project.DumbServiceImpl - JDK: 11.0.9.1; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o. 
2021-07-08 09:44:27,073 [  60061]  ERROR - penapi.project.DumbServiceImpl - OS: Windows 10 
2021-07-08 09:44:27,073 [  60061]  ERROR - penapi.project.DumbServiceImpl - Plugin to blame: RestfulToolkit version: 2.0.9 
2021-07-08 09:44:27,073 [  60061]  ERROR - penapi.project.DumbServiceImpl - Last Action:  
2021-07-08 09:44:34,619 [  67607]   INFO - dea.updater.SdkComponentSource - File C:\Users\cuiliangyun\.android\repositories.cfg could not be loaded. 
2021-07-08 09:44:34,628 [  67616]   INFO - dea.updater.SdkComponentSource - Downloading https://dl.google.com/android/repository/addons_list-3.xml 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 7月 08, 2021 9:44:35 上午 net.sourceforge.pmd.lang.rule.AbstractRuleChainVisitor visitAll 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 警告: Exception applying rule PackageNamingRule on file D:/我的/我的项目/myproject-sso/src/main/java/com/example/sso/SsoApplication.java, continuing with next rule 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - java.lang.RuntimeException: org.jaxen.UnresolvableException: No Such Function matches 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at net.sourceforge.pmd.lang.rule.xpath.JaxenXPathRuleQuery.evaluate(JaxenXPathRuleQuery.java:73) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at net.sourceforge.pmd.lang.rule.XPathRule.evaluate(XPathRule.java:114) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at net.sourceforge.pmd.lang.java.rule.JavaRuleChainVisitor.visit(JavaRuleChainVisitor.java:42) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at net.sourceforge.pmd.lang.rule.AbstractRuleChainVisitor.visitAll(AbstractRuleChainVisitor.java:96) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at net.sourceforge.pmd.RuleChain.apply(RuleChain.java:67) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at net.sourceforge.pmd.RuleSets.apply(RuleSets.java:140) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.alibaba.p3c.idea.pmd.SourceCodeProcessor.processSource(SourceCodeProcessor.kt:220) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.alibaba.p3c.idea.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.kt:65) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.alibaba.p3c.idea.pmd.AliPmdProcessor.processFile(AliPmdProcessor.kt:75) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.alibaba.p3c.idea.inspection.AliPmdInspectionInvoker.doInvoke(AliPmdInspectionInvoker.kt:62) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.alibaba.p3c.idea.inspection.AliPmdInspectionInvoker$Companion.invokeInspection(AliPmdInspectionInvoker.kt:125) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.alibaba.p3c.idea.inspection.AliPmdInspection.checkFile(AliPmdInspection.kt:71) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at PackageNamingRuleInspection.checkFile(DelegatePmdInspection.kt:47) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.codeInspection.LocalInspectionTool$1.visitFile(LocalInspectionTool.java:145) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.psi.impl.source.PsiJavaFileBaseImpl.accept(PsiJavaFileBaseImpl.java:475) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:66) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.codeInspection.InspectionEngine.createVisitorAndAcceptElements(InspectionEngine.java:57) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.runToolOnElements(LocalInspectionsPass.java:298) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$3(LocalInspectionsPass.java:267) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:156) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:148) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$4(LocalInspectionsPass.java:266) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:127) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:116) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$5(LocalInspectionsPass.java:266) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:136) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1132) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:92) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:104) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:83) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:172) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:183) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:83) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.concurrency.JobLauncherImpl.invokeConcurrentlyUnderProgress(JobLauncherImpl.java:61) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.concurrency.JobLauncher.invokeConcurrentlyUnderProgress(JobLauncher.java:48) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.visitPriorityElementsAndInit(LocalInspectionsPass.java:270) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.inspect(LocalInspectionsPass.java:193) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.collectInformationWithProgress(LocalInspectionsPass.java:115) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:84) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:56) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:400) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1137) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:393) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:392) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:368) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:172) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:183) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:366) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:188) 
2021-07-08 09:44:35,022 [  68010]   INFO -                         STDERR - 	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) 
2021-07-08 09:44:35,023 [  68011]   INFO -                         STDERR - 	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020) 
2021-07-08 09:44:35,023 [  68011]   INFO -                         STDERR - 	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656) 
2021-07-08 09:44:35,023 [  68011]   INFO -                         STDERR - 	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594) 
2021-07-08 09:44:35,023 [  68011]   INFO -                         STDERR - 	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183) 
2021-07-08 09:44:35,023 [  68011]   INFO -                         STDERR - Caused by: org.jaxen.UnresolvableException: No Such Function matches 
2021-07-08 09:44:35,023 [  68011]   INFO -                         STDERR - 	at org.jaxen.SimpleFunctionContext.getFunction(SimpleFunctionContext.java:127) 
2021-07-08 09:44:35,023 [  68011]   INFO -                         STDERR - 	at org.jaxen.ContextSupport.getFunction(ContextSupport.java:242) 
2021-07-08 09:44:35,023 [  68011]   INFO -                         STDERR - 	at org.jaxen.Context.getFunction(Context.java:216) 
2021-07-08 09:44:35,023 [  68011]   INFO -                         STDERR - 	at org.jaxen.expr.DefaultFunctionCallExpr.evaluate(DefaultFunctionCallExpr.java:176) 
2021-07-08 09:44:35,023 [  68011]   INFO -                         STDERR - 	at org.jaxen.expr.DefaultFunctionCallExpr.evaluateParams(DefaultFunctionCallExpr.java:195) 
2021-07-08 09:44:35,023 [  68011]   INFO -                         STDERR - 	at org.jaxen.expr.DefaultFunctionCallExpr.evaluate(DefaultFunctionCallExpr.java:179) 
2021-07-08 09:44:35,023 [  68011]   INFO -                         STDERR - 	at org.jaxen.expr.DefaultPredicate.evaluate(DefaultPredicate.java:95) 
2021-07-08 09:44:35,023 [  68011]   INFO -                         STDERR - 	at org.jaxen.expr.PredicateSet.applyPredicate(PredicateSet.java:269) 
2021-07-08 09:44:35,023 [  68011]   INFO -                         STDERR - 	at org.jaxen.expr.PredicateSet.evaluatePredicates(PredicateSet.java:244) 
2021-07-08 09:44:35,023 [  68011]   INFO -                         STDERR - 	at org.jaxen.expr.DefaultNameStep.evaluate(DefaultNameStep.java:215) 
2021-07-08 09:44:35,023 [  68011]   INFO -                         STDERR - 	at org.jaxen.expr.DefaultLocationPath.evaluate(DefaultLocationPath.java:140) 
2021-07-08 09:44:35,023 [  68011]   INFO -                         STDERR - 	at org.jaxen.expr.DefaultXPathExpr.asList(DefaultXPathExpr.java:102) 
2021-07-08 09:44:35,023 [  68011]   INFO -                         STDERR - 	at org.jaxen.BaseXPath.selectNodesForContext(BaseXPath.java:677) 
2021-07-08 09:44:35,023 [  68011]   INFO -                         STDERR - 	at org.jaxen.BaseXPath.selectNodes(BaseXPath.java:216) 
2021-07-08 09:44:35,023 [  68011]   INFO -                         STDERR - 	at net.sourceforge.pmd.lang.rule.xpath.JaxenXPathRuleQuery.evaluate(JaxenXPathRuleQuery.java:69) 
2021-07-08 09:44:35,023 [  68011]   INFO -                         STDERR - 	... 60 more 
2021-07-08 09:44:35,023 [  68011]   INFO -                         STDERR -  

Solution: uninstall the error reporting plug-in, restart idea, and it will return to normal
I’m a rookie, and I don’t understand why this is OK?

[How to Solve] RuntimeError: CUDA out of memory.

Problem description

Runtimeerror: CUDA out of memory. Tried to allocate 1.26 gib (GPU 0; 6.00 GiB total capacity; 557.81 MiB already allocated; 2.74 GiB free; 1.36 gib reserved in total by pytorch)

Solution:

GPU cache is not enough
you can reduce the size of batch size properly
if it works properly
1. Restart the computer
restart the computer and close the occupied GPU process, which is a solution
2. Kill process
input

nvidia-smi

View the process

and enter

kill -9 PID

[Solved] OpenGL PowerVR SDK Compiling Error: Could NOT find X11 (missing: X11_X11_INCLUDE_PATH X11_X11_LIB)

Project scenario:

Compiling powervr SDK

Problem Description:

In the process of cmake powervr SDK, the error message is as follows:

CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find X11 (missing: X11_X11_INCLUDE_PATH X11_X11_LIB)
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.16/Modules/FindX11.cmake:366 (find_package_handle_standard_args)
  framework/PVRShell/CMakeLists.txt:92 (find_package)


-- Configuring incomplete, errors occurred!
See also "/mnt/f/CG21S/Native_SDK-R21.1-v5.7/build/CMakeFiles/CMakeOutput.log".
See also "/mnt/f/CG21S/Native_SDK-R21.1-v5.7/build/CMakeFiles/CMakeError.log

Cause analysis:

Search for could not find X11 (missing: X11)_ X11_ INCLUDE_ PATH X11_ X11_ The following blog posts were obtained:
in this study, we found that https://blog.csdn.net/quantum7/article/details/93484972
Indicates that xtest. H is missing

Solution:

After testing, the following codes are valid:

sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev

[Solved] Leetcode Error: AddressSanitizer: SEGV on unknown address 0x55eb765425b8 (pc 0x55eb76542b86 bp 0x7ffd1bd2

Hi, I’ve come back to the article ᕕ (ᐛ) ᕗ
recently, I’m brushing leetcode, and there’s an error report about stack

 AddressSanitizer:DEADLYSIGNAL
=================================================================
==42==ERROR: AddressSanitizer: SEGV on unknown address 0x55eb765425b8 (pc 0x55eb76542b86 bp 0x7ffd1bd27d50 sp 0x7ffd1bd27d00 T0)
==42==The signal is caused by a WRITE memory access.
    #2 0x7fe2bd0fe0b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
AddressSanitizer can not provide additional info.
==42==ABORTING

My code is as follows



bool isValid(char * s){
    bool answer;
    int i=0;
    char tem;
    stack S=creatstack;  //Something is wrong here, it should be a function but I forgot to add the brackets
    while(s[i]!='\0'){
        if(s[i]=='('||s[i]=='['||s[i]=='{') push(s[i],S);
        else{
            tem=pop(S);
            if((tem=='('&&s[i]==')')||(tem=='['&&s[i]==']')||(tem=='{'&&s[i]=='}')) ;
            else return false;
        }
        i++;
    }
    return true;
}

Change to

stack S=creatstack();

After that, the problem was solved

Can’t read property ‘push’ of undefined [How to Solve]

Can read property ‘push’ of undefined in Vue.

Please check pages. JSON and   Is there a path you filled in in router/index.js.

In router/index.js   The path in the file must correspond to the address in pages.json, and must be preceded by the/symbol

{		
        path: '/pages/index',
		name: 'index',	
},

Page. JSON file

{
            "path" : "pages/index locaton",
            "style" :                                                                                    

            
        }

There is no/sign in front of the path here.

Can be used in the page, the method is not unique( (not recommended)

this.$Router.push({
					name: 'name',
				});
this.$Router.push({path:'/name'});

Use of $watch in Vue (solve rangeerror: maximum call stack size exceeded)

Problems encountered:

In a requirement, the change of a form needs a function of history recording. Because the form is very large (it is to edit an article), it is impossible to be specific to a certain attribute, so the method of watch monitoring is adopted, and {deep: true} is set. However, when previewing, I encountered the error of rangeerror: maximum call stack size exceeded . After some investigation, I found that it was caused by watch monitoring, and then I didn’t know what the problem was.

Even if nothing is written in the business code, a simple console.log will not work. As long as deep: true is set, an error will be reported, which is a headache. I didn’t find a similar case on the Internet. I thought again: since the error lies in the watch, can I dynamically monitor and cancel monitoring ?I found the answer on the official website https://cn.vuejs.org/v2/api/#vm -watch

Basic use of $watch (refer to the official website)

VM. $watch (exporfn, callback, [options]) the return value is a {function} unwatch , which returns a function to cancel the observation, which is used to stop the trigger callback option: deep, deep listening option: immediate, whether to execute once immediately

// Key Path
vm.$watch('a.b.c', function (newVal, oldVal) {
  // Do something
})

// function
var unwatch = vm.$watch(
  function () {
    // The expression `this.a + this.b` is called every time a different result is reached
    // the handler function will be called.
    // This is like listening for an undefined computed property
    return this.a + this.b
  },
  function (newVal, oldVal) {
    // Do something
  }
)

// Cancel the listener

unwatch()

My solution, for reference

// Call setWatchChapters when created, call removeWatchChapters in other cases, depending on the business case
export default {
	...
	data () {
		return {
			unWatchChapters: null
		}
	},
	created(){
		this.setWatchChapters()
	},
	methods:{
		setWatchChapters () { // Setting up a listener for chapters
			if (!this.unWatchChapters) { // prevent setting listeners more than once
				setTimeout(() => { // There are still some bugs, so use setTimeout to add to the event queue
					this.unWatchChapters = this.$watch('report.chapters', () => {
						// do something
					}, { deep: true })
				}, 0)
			}
    	},
    	removeWatchChapters () { // Unlisten to chapters
			if (this.unWatchChapters) {
				this.unWatchChapters()
				this.unWatchChapters = null
			}
		}
	}
}

IText The document has no pages [How to Solve]

Problem Description:

com.itextpdf.text.ExceptionConverter: The document has no pages.
Caused by: java.io.IOException: The document has no pages.

Problem analysis:

1. When using the template to export PDF file, the template is not read to generate content because there is no data.

public void getTemplatePDF(HttpServletResponse response) {
        try {
            // Template Path
            String templatePath = "doc/Template.pdf";
            ServletOutputStream os = null;
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
            PdfStamper stamper = null;
            PdfReader reader = null;// Read pdf Template 
            Document doc = null;
            response.setContentType("multipart/form-data");
            response.setHeader("Content-Disposition", "attachment;fileName=测试.pdf");
            os = response.getOutputStream();// Output Stream
            doc = new Document();
            PdfCopy copy = new PdfCopy(doc, os);
            doc.open();
            List<String> resultList = new ArrayList<>();
            for (int i = 0; i < resultList.size(); i++) {
                reader = new PdfReader(templatePath);
                bos = new ByteArrayOutputStream();
                stamper = new PdfStamper(reader, bos);
                AcroFields form = stamper.getAcroFields();
                // Add Chinese fonts to the form. The system font is used here. If not set, Chinese may not be displayed (use the font in iTextAsian.jar)
                BaseFont bf = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.EMBEDDED);
                form.addSubstitutionFont(bf);
                // If false then the generated PDF file can also be edited, must be set to true
                stamper.setFormFlattening(true);
                stamper.close();
                reader.close();
                PdfImportedPage importPage = copy.getImportedPage(new PdfReader(bos.toByteArray()), 1);
                copy.addPage(importPage);
            }
            doc.close();
            try {
                os.flush();
                os.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
            try {
                bos.flush();
                bos.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

Solution: generate default content when there is no data.

public void getTemplatePDF(HttpServletResponse response) {
        try {
            // Template Path
            String templatePath = "doc/Template.pdf";
            ServletOutputStream os = null;
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
            PdfStamper stamper = null;
            PdfReader reader = null;// Read pdf Template 
            Document doc = null;
            response.setContentType("multipart/form-data");
            response.setHeader("Content-Disposition", "attachment;fileName=测试.pdf");
            os = response.getOutputStream();// Output Stream
            doc = new Document();
            PdfCopy copy = new PdfCopy(doc, os);
            doc.open();
            List<String> resultList = new ArrayList<>();
            for (int i = 0; i < resultList.size(); i++) {
                reader = new PdfReader(templatePath);
                bos = new ByteArrayOutputStream();
                stamper = new PdfStamper(reader, bos);
                AcroFields form = stamper.getAcroFields();
                // Add Chinese fonts to the form. The system font is used here. If you don't set it, Chinese may not be displayed (use the font in iTextAsian.jar)
                BaseFont bf = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.EMBEDDED);
                form.addSubstitutionFont(bf);
                // if false then the generated PDF file can also be edited, must be set to true
                stamper.setFormFlattening(true);
                stamper.close();
                reader.close();
                PdfImportedPage importPage = copy.getImportedPage(new PdfReader(bos.toByteArray()), 1);
                copy.addPage(importPage);
            }
            // no data case
            if (resultList == null || resultList.size() <= 0) {
                reader = new PdfReader(templatePath);
                bos = new ByteArrayOutputStream();
                stamper = new PdfStamper(reader, bos);
                AcroFields form = stamper.getAcroFields();
                // add Chinese fonts to the form here using the system font. Not set, Chinese may not be able to display (using iTextAsian.jar in the font)
                BaseFont bf = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.EMBEDDED);
                form.addSubstitutionFont(bf);
                // If false then the generated PDF file can also be edited, must be set to true
                stamper.setFormFlattening(true);
                stamper.close();
                reader.close();
                PdfImportedPage importPage = copy.getImportedPage(new PdfReader(bos.toByteArray()), 1);
                copy.addPage(importPage);
            }
            doc.close();
            try {
                os.flush();
                os.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
            try {
                bos.flush();
                bos.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

[Solved] TypeError: Converting circular structure to JSON – JSON.stringify

When using the json.stringify method to convert a string, an error typeerror: converting circular structure to JSON will be reported

Reason: there is a circular reference to itself in the object;

For example:

let test = { a: 1, b: 2 };
test.c = test; // Circular references
JSON.stringify(test); // report an error

Solution:
the following JSON_ STR is the converted String of JSON. Stringify

var cache = [];
var json_str = JSON.stringify(json_data, function(key, value) {
    if (typeof value === 'object' && value !== null) {
        if (cache.indexOf(value) !== -1) {
            return;
        }
        cache.push(value);
    }
    return value;
});
cache = null;	//release cache

[Solved] From pip._internal import cmdoptions ImportError: cannot import name SourceDistribution

Background of the problem

When changing 32-bit Python to 64 bit, this problem suddenly appeared. I was so confused that PIP list PIP install couldn’t be used. I made a mistake

Solution:
first execute the command: Python - M ensurepip -- default PIP
Download get-pip.py at https://bootstrap.pypa.io/get-pip.py After entering, it is directly code, so you need to create a new get-pip.py file, copy and paste it, and finally enter the directory where the get-pip.py file is located from the command line CMD, Execute command: Python get pip. Py
note that permission error may be reported when executing this step. At this time, Python get pip. Py -- user should be executed
Let’s go on

How to enter the directory where the get-pip.py file is located, you can follow the steps below in general windows

      1. search for CMD in the lower left corner, enter the drive letter where the file is located, for example, my get pip.py file is in

D: , then enter CMD, enter D: and then copy the directory of the file, paste enter, my file is D: + enter
Postscript

After checking, it seems to say that PIP version 20. Has this problem, but PIP version 21. Is gone. Maybe there is a bug in the previous version

Iterator calling next method: Stopiteration [How to Solve]

Solution:

When using next() to access an iterator that has been iterated, there will be such an error: stopiteration
the solution is to give a default value: next (ITER, default) , which will be output after the iteration is completed
suppose that the original writing method of the loop is:

a = next(iter_test) # Iteration completion will report an error StopIteration
print(a)

Change to:

a = next(iter_test,None)
if a is not None:
	print(a)

Problem analysis

The following code will report an error:

iter_list = iter([1, 2, 3, 4])

for i in range(10):
    print(next(iter_list))

Error will be reported after outputting 1234, which can be changed to:

iter_list = iter([1, 2, 3, 4])

for i in range(10):
    a = next(iter_list, None)
    if a is not None:
        print(a)

This will output: 1 2 3 4