How to prevent RCP exit failure? - eclipse-plugin

When I was writing a program yesterday, I failed to exit Eclipse. The UI is closed, but the console is still running (eclipsec.exe). This kind of problem is not common. I checked the error log and found no reason.
How can I avoid this kind of problem if I develop an RCP? Can I check the thread when the Display is destroyed, and force exit (System.exit) after the specified time
Is my method feasible?

Related

How to resolve error 0xc0000139

I'm developing a program on Widows10 with Qt. If I run it from the command line, it exits silently, immediately. When I try to debug it, a dialog box is displayed saying "During startup program exited with code 0xc0000139."
I know this means that Windows failed to load one or more DLLs.
How do I find which DLLs they were?
Ideally, I would prefer not to download any additional utilities beyond what is provided by Windows10 and Qt.
For what it's worth I resolved my problem.
It turned out the the program I was trying to run hadn't been rebuild since my last set of changes. I'm unsure why that was so, clearly my own error but I'm not sure what, precisely.
For the benefit of anyone coming here trying to find an answer to the question at the top of the page, if you have cygwin or another Unix-alike on your system, ldd is a good program with which to start looking through the sharable images you link to.

Is it possible to show errors in silent install in windows

I have a created an installer using WiXStandardBootstrapperApplication. The intention is to run it silently and I do that using the /quiet flag and it runs silently just fine. The way it runs is, as soon as I enter the command on the command prompt the control returns to the command prompt instantly and the installation happens at the background. So if there are any errors or even in the case of Success, I don't know whether it completed fine or for what reason it failed. In linux, I can run a command silently and the console will show the progress of what are the things that it is doing. Can I do something similar in Windows? I initiate the command and the logs are displayed on the console or at the very least a Success or Failure message is shown on the console window before it stops the execution.
I am aware about the messages being logged in the log file but wanted something to come on the console itself. Thanks for your help in advance.
The point of /quiet switch is to have a silent installer. That contradicts the requirement to show any UI. If the installer encounters any errors, it will return exit code other then 0. Details about the failure are in setup logs.
WiX does not do any console logging.

Codeception won't run any tests. Fails with no errors, quits before running any tests

I go to run an acceptance test, but it only outputs
Codeception PHP Testing Framework v2.0.12
Powered by PHPUnit 4.5.1 by Sebastian Bergmann and contributors.
Then it quits with out any error message. No tests run, no error message.
Browser tests were working fine, and only acceptance tests were broken.
I have all ready solved the problem, but I want to create a record for next time I or any one else runs into this problem.
If you codeception is quitting without any errors or fail messages, it means that there is an error in your code somewhere. I found the error in me Acceptance Helper file, where I had a duplicate of a function. Functions can not have the same name in php, so everything fails. But codeception does not output any error messages.
In order to solve this problem, you need to look through your Helper functions to find a syntax error, or it could be in your actual tests.
The reason it fails is codeception hits an error in the php code, and dies, not throwing any errors. Leaving you confused and frustrated. Now you can find this question and get back to doing what you're doing.
YAY!
There is a syntax error somewhere in your testing code, find it and get rid of it, and it will work. I'd bet the error is in the AcceptanceHelper.php or Browser or what ever suit won't run tests.
If you're seeing this behaviour (codeception quits without any error messages) there is likely a fatal PHP error happening somewhere, but it's not necessarily in your own code or in your codeception generated files.
Depending on your PHP configuration, these errors should show up in an error log, even if they're not output to the console.
For example, if you're using MAMP on Mac, the error log is here by default: /Applications/MAMP/logs/php_error.log
Clear the PHP error log, run your (non-working) test, and check the log again. It should give more insight.
In my case, it was a matter of running codeception 4 on Laravel 5.5, and hence missing classes from the symfony/service-contracts package. Installing this package with composer moved past the "invisible" problem (though I ultimately had to downgrade to composer 3, since there doesn't seem to be a compatible set of symfony/Laravel 5.5/composer 4 packages).

InvalidOperationException was unhandled in VB.NET when debugging

Dear fellow programmers,
Most of the time the debug works but in some moments when I try to debug this error shows: http://s11.postimg.org/ezs58e4lv/screen.png
http://postimg.org/image/406xwse6n/
What I do most of the time is that I just close that error and re-debug it. But I want to ask if that error will affect my published application and when that error comes to the scene, will the solution is the user will just close my app and restart it again? Seems inconvenient.
How can I fix this error?

stop installation if detect process is running

I want to check if a process is running before installing a new add-in using the advance installer. To make that, in custom Actions, I select detect process and put the process that I want to stop. With that I get AI_PROCESS_STATE Running or Stopped. But now I don't know what to do to stop the installation if it is Running or at least show a message telling that is necessary to close it before continue.
There are options like display message box but if I put them they always appear. I don't know how to make them appear only when AI_PROCESS_STATE has the value Running.
There are several problems here:
The general way to do this is to call a custom action Dll that looks for the process, and sets an installer property if the process is running, then you can fail the install with a type 19 custom action and your own error message. Running a process doesn't give you a good way to return a value into the install so you can show an error message.
However, getting the list of processes requires elevation, and by default you're not elevated at the start of the install.
Are you sure you're not inventing a problem? Why should the user shut down the process? The user-friendly approach is to register your add-in and tell the user they may need to restart the app before their new add-in will show up.