JSCS process timeout in Webstorm - webstorm

I often get the following error in Webstorm when working with a .jscs file.
JSCS: JSCS process timeout
What does that mean?
Normally, if my Javascript code fails the style checks, I get error marks and it is shown what is not correct. But this behaviour looks like a deeper problem...

Nothing special. JSCS is run as external process from WebStorm. If WebStorm doesn't receive response from this process for more than 10 sec (may happen if the read access to file is blocked, for example), this error occurs. process will be restarted on next file change

Related

CLIPS system halted and not continuing to execute

I am integrating CLIPS expert system following APG docs, Thanks for the great docs, I am successful at integrating CLIPS to my C++ project, My Application runs continuously and feed the Facts to CLIPS system using EnvAssert method and invoke EnvRun, everything works fine until i receive this error.
[PRNTUTIL7] Attempt to divide by zero in / function.
[DRIVE1] This error occurred in the join network
Problem resides in associated join
Of pattern #1 in rule RULE-1
[PRCCODE4] Execution halted during the actions of defrule RULE-2.
Once i receive this error, further Assert is working but Run seems not working, but i am sure there are definite matching rules are available but still no rules are fired on next Run.
I understood the error and i can fix it, but i cannot understand the behavior. So i tested it in CLIPS console, there when the error was reported consecutive Run seems working as i expected, but not in case of my application, i want to know the underlying difference.
Ref pseudo-code of Application :
<code to create and initialize CLIPS environment>
EnvReset()
While(true)
{
<my code to get facts>
EnvAsset(Fact)
EnvRun(-1)
<my code to receive the generated result facts>
}
Note: I dont call RESET before every RUN.
Fixes for resetting the error flags for API calls have been checked into the subversion repository on sourceforge: https://sourceforge.net/p/clipsrules/code/HEAD/tree/branches/

Starting with codeblocks, building a Hello world does not work (Permission denied)

If I have just run CodeBlocks, I can build and run the Hello world and I the prompt shows and everything is fine. I close it, change what is written, and this message appears:
ld.exe||cannot open output file bin\Debug\HellowWorld.exe Permission denied|
I need to do way more difficults programs than a helloworld, and I've seen in several webs this problem addressed, but nothing works:
http://forums.codeblocks.org/index.php/topic,15047.30.html[1]
ld.exe: cannot open output file ... : Permission denied
After much reading, I understand it has something to do with how the program handles memory. It's something like, if it thinks there's still a process in execution, it does not let me build it again. But I do close it. I've tried everything: input any text so the windows closes (and it does), going to window task manager and finishing the process itself. It does not work. The kicker is that, if I let a few minutes pass, I can indeed build again and run it again. It's kinda stupid and I need help to fix this.
Even more links: The first one I don't get it. I downloaded it and checked as it's said in the wiki:
http://wiki.codeblocks.org/index.php?title=Creating_a_new_project[3]
The link:
http://www.reddit.com/r/learnprogramming/comments/1rvmhx/i_just_started_programming_and_stuck_from/[4]
I mean, I can have done wrong even that. But it does compile and build and run the first time arround...
Most likely the program is still running. Then you can't replace its executable.
If it doesn't have a visible user interface then you can forcefully terminate it via Task Manager Shift+Ctrl+Esc.
Or simpler, always build as console program, because then you can just close the program's console window.

Windows: remove() fails with error access denied ( error code 5) despite of no open handle in current process or other processes

Environment
Windows 7, Windows 2008 server
C++ program run in multithreading.
Scenario
In multithreading, we extract several files from archive containers to user defined temp directory ( say c:\temp) and delete them after processing.
But some of the files are unable to delete with error access denied.
We are using remove() API for deleting files.
Observations
This is observed in Multithreading environment only.
Confirmed that each temp file is getting processed in SINGLE thread only and that thread is thread closing it before attempting to delete it.
No handle leak is seen after running test, but some files are remaining in our temp dir.
Issue is not consistently reproducible. (Gets reproduced in 1/3 attempts). Each time different files are remaining in temp dir.
There is no permission issue as well, that means files are not read only.
Confirmed that no other processes like AntiVirus, Windows Search indexer is running. - After putting breakpoint, we can manually delete file
After calling handles.exe on culprit file (inside code as child process) immediately after remove failure, it output is "No matching handles found"
Workaround
Reattempting remove after 10 miliseconds is WORKING.
Instead of workaround, we are looking for proper fix, but we are unable to figure out why we are unable to remove such temp file despite of no open handles in any process?

How do I start an external process using Qt?

FINAL EDIT: The code I've written below works, so disregard everything I've written. It seems that when I copied my input text file to the build directory, the file was somehow corrupted in process, which caused my external executable "prog" to break. Sorry for wasting your time and thanks to all of you who tried to help!
I've just started messing around with Qt and have a project called test_tiny. In the build folder of my project (where executable test_tiny is located), I have moved another little C++ executable called "prog" which reads from a file, does its thing, and outputs to a different file. The input file is also in the build directory.
I also have a window with a couple of text boxes and a few buttons. I would like to run my external program "prog" by pressing one of these buttons. This is what I've got so far:
void MainWindow::load2() {
QProcess *process = new QProcess(this);
process->start("./prog");
qDebug() << process->exitCode();
ui->textBrowser_2->clear();
ui->textBrowser_2->insertPlainText(read(":/File/out.txt"));
}
The second part works just fine - it reads from the out.txt file and loads it into the text browser. However, my process doesn't seem to run, and exitCode() always returns zero (I have changed it to 100 in "prog").
From what I've understood, the QProcess' working directory (unless otherwise specified) is set to its build folder, so calling process->start("./prog"); should work, but it doesn't. I've also tried calling it by referencing a QResource as well as giving the full path, but to no avail.
Any help would be appreciated, thanks!
I'm using Qt Creator 2.81 based on Qt 5.1.1 running on x64 Ubuntu 12.04.
EDIT: I forgot to mention that the executable "prog" only parses a few lines of text and outputs them to a file, which is then read and output to a text box. The external program "prog" doesn't actually seem to run, and I've already tried using process->waitForFinished().
You must wait till the process is finished before you check the exit code. You can wait by using the finised() signal or waitForFinished(). After waitForFinished succeeds or the finished signal is emitted it is safe to check the exit code. I almost always will use the finshed signal. However you should also make sure that the process started in the first place. Using the error() signal is how I detect if there is a problem starting the process. QProcess will emit this with a code describing the error. QProcess::FailedToStart will tell you that your application did not start in the first place.
You have two problems:
Are you on the correct path? while debugging using a full path, it make life easier.
You need to call QProcess::waitForFinished(LARGE_TIME) or connect to the finished() signal before you can check the error (the app starts asynchronously).

How to close Error MessageBox generated at the start up of the device from other application using c++?

I have my application say test.exe which starts whenever i boot my mobile device.
I also kept dummy.log file at MyDevice\Windows\startup\ folder so whenevr i restart my device i see that error message box appears for dummy.log file.
I observed in the task manager that shell32 size gets increase whenever i boot my device with the above configuration.
And also observe that the shell32 size gets increase due to test.exe and whenever there is an error messagebox after booting the device.
If i close the error message box then shell32 size gets decreasing and test.exe doesnot create any problem.
Only Shell32 size gets increase in the above circumstances, in other cases it works fine.
I don't know how the error message box is linked with my test.exe application.
I debugged and checked and only option i get in my mind is to close the error message box from my application i.e. test.exe.
Edited Section:-
Could anyone let me know how to check & close the error message box from my application i.e. "test.exe"?
2nd time editing:-
Please also let me know how the error message box could be linked with my application i.e. "test.exe"? Is it anything related to timer? I am not doing anything for the outside windows in my application
Please reply thanks.
I think you can use FindWindow API and then send a WM_CLOSE
for more information read this Stackoverflow question
Get the handler to the proccess using this.
Send a mouse event /keystroke to the relvet area using this
Make the program to run on start-up using this
You can see where to send the message on the screen by using spy++ which is usually included in visual studio.