Webcam disabled by AVG antivirus - c++

I am creating a program with Qt on Windows using OpenCV.
When I launch the program, sometimes, the webcam won't start. cam.open(0) returns 1 (open succesfull) but the frames are empty. I spent many hours on this and I finally pinpoint the problem to "AVG Protection". About 50% of the time I launched the program, I was receiving empty frames. With AVG uninstalled, it works 100% of the time.
I guess AVG was sometimes detecting my program as malicious or something. I tried adding the program in the AVG exceptions but it did not change anything.
Could I do something programatically to prevent this ?
Thank you very much,
Alex

The same problem here for us. Some days ago customers started to report that our application does not receive video data from the camera anymore.
There are no errors or any exceptions raised.
Yesterday, I have reproduced this issue on a laptop with AVG installed. From what I can find from logs, the camera can be found and started by the application, but it does not receive any frames from it. Namely, presentFrame() method from dscamerasession.cpp is not being called back anymore by Windows process, as it used to before.
There is a question at AVG support:
https://support.avg.com/answers#!/feedtype=SINGLE_QUESTION_DETAIL&dc=All&criteria=ALLQUESTIONS&id=906b0000000DlgTAAS
Their answer is:
Please follow the instructions to change the Firewall settings to check the status : Open AVG Zen -> Internet Security -> Click on Menu in the top right corner -> Settings -> Components -> Firewall -> Customize -> Network Profiles -> Change the networks from Public to Private (If it is in Private, change it to Public).
Then check whether you are able to access it without any issues

Related

WAMP Server not turning green every time I restart my Surface

I've been using WAMP server for a few of my school projects however I have had a lot of trouble with it staying green. I am pretty sure its an internal issue but I'm not really sure how to figure out what exactly is happening. The main problem I experience is that it installs fine and runs. However, whenever I restart my laptop it will not turn green. It stays orange and says 1 of 2 services running. I tried the methods I saw online however it does not even let me right-click it to see what isn't running or to restart the services. I've had to reinstall it about five times to keep using it and it's getting extremely annoying. I think it has to do with mySQL not starting properly but then why do I not get the option to right click?
check if you have any previous installations ( for example : mysql,MariaDB ..ect ) and open task manager and see the proccess of mysql ( open the properties ) if the path isn't from the wamp mysql then desactivate it / kill the process.
here's FAQ Link that helped me alot in the past , you may find it usefull

How to understand and debug from a VirtualBox log file?

I have followed this tutorial for developing an operating system. I am using Windows 10 as my host sytem and used wsl for compiling. But my VM fails as soon as I enable interrupts.
This is the log file of the VM that is output, but I cannot understand it. I am pretty naive with VirtualBox. Can someone explain any possible error you see?
Here is the code of the Os. I just have changed the structure I believe. Rest code in execution point of view is same as shown in video series.
That is a lot of log to scroll through and it's hard to be sure on the face of it that just looking at that would be able to tell us what about your startup code (not visible to us as part of the question) would trigger it. However, I can speak to some general strategies about approaching a log file like this.
We can see some general state transitions in there. The log ends with:
00:00:15.712045 Changing the VM state from 'DESTROYING' to 'TERMINATED'
So I can go back through and look at where the first instance of DESTROYING showed up, which was:
00:00:15.698320 Changing the VM state from 'POWERING_OFF' to 'OFF'
00:00:15.701802 Changing the VM state from 'OFF' to 'DESTROYING'
Following the same process backwards to POWERING_OFF, I see:
00:00:08.577363 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
00:00:14.342287 ERROR [COM]: aRC=VBOX_E_INVALID_VM_STATE (0x80bb0002) aIID={872da645-4a9b-1727-bee2-5585105b9eed} aComponent={ConsoleWrap} aText={Invalid machine state GuruMeditation when checking if the guest entered the ACPI mode)}, preserve=false aResultDetail=0
00:00:15.643579 GUI: Request for close-action to power VM off.
00:00:15.643599 GUI: Passing request to power VM off from machine-logic to UI session.
00:00:15.643606 GUI: Powering VM down on UI session power off request...
00:00:15.644257 Console: Machine state changed to 'Stopping'
00:00:15.644763 Console::powerDown(): A request to power off the VM has been issued (mMachineState=Stopping, InUninit=0)
00:00:15.645075 Changing the VM state from 'GURU_MEDITATION' to 'POWERING_OFF'
That error line at the top of that block may point to something searchable that would turn up other instances of people having the same or a similar problem. If you scroll up a bit, you can also see that something VGA-related was happening right before the error, which may help narrow it down if it's directly related to the error, or may be another step to backtrack through on the way to the real issue.

Why is build time of local application affected by network?

Build time of XPages application containing several JARs, Java sources and ~50 XP/CC elements takes about minute to build on server via WAN. I have replicated application to local, build time dropped to ~10s.
Since few days ago build of local application is extremely slow, about 2-5 minutes. After some experiments there is workaround: to disable TCP port in location document - it drops build times to just few seconds. Even tho it works, it does not help much - testing requires user to be authenticated, so I need to replicate design changes to remote or local server - and that means to change location (online/offline) every time.
UPDATE 2013-04-04: I have duplicated my current location document and removed home and directory servers. To my surprise, with this location build times went back to few seconds - with TCP port enabled so replication is possible. Bigger surprise was the fact, that returning home/directory servers back to new location did not reproduce the problem - in fact they do not affect performance. I know it because I have renamed current location document and everything went to normal. From my understanding, "something" in client configuration was connected to location name. Thanks to Simon's tips I will investigate further.
The question is still open: I am looking for some (eclipse) preference controlling this behavior - unintended communication with server during build of local application.
Solution:
Teamstudio CIAO hooks into designer and checks for every update of design element. Seems to be lack of code optimization to me: it checks whether currently built design element (every single one, one by one) should be controlled in CIAO config database.
This explains why the problem was solved by renaming of location document. I was disappointed yesterday, when performance problems started again. Fortunately, I recalled CIAO setup to that location document about that time. CIAO uses teamstudio.ini file in DATA directory to configure what CIAO configuration database is used for every location document. Look for entry:
CIAOConfigDb[location name]=server name;CIAO\CIAOConfig.nsf
For development on local replicas with connection to server (for replication or local server), use location document with CIAO disabled.
This works only with property ForceConfigLocation=0.
Not a solution (yet!), but may help in the investigation. I'll update further if you post results later.
Debug instructions.
Add the following to the shortcut that launches the Designer client.
-RPARAMS -console -debug -separateSysLogFiles -consoleLog
Start the designer client. This will also open up the OSGi console.
Reproduce the issue. While it is still in progress in the OSGi console type the following:
dump threads
Do this three times, with a small amount of time between completion of each dump. Once done open the three heap dumps (in the IBM_TECHNICAL_SUPPORT folder) in the Heap Dump Analyser.
It will show you what threads are consistent through all three dumps. Take a look at those and look for package names/calls which may appear to be a functional area. Once you have that then you can try adding the debug for the related class.
For example: Let's say you notice "com.ibm.designer.domino.ui.commons." in the thread, then you would edit the rcpinstall.properties file. It will be in:
<Notes Install>\Data\workspace\.config\rcpinstall.properties
and you would add (start with FINE, then FINEST if nothing):
com.ibm.designer.domino.ui.commons.level=FINE
Now when you restart the designer client it will generate debug output in the workspace\logs folder for that package. You need to then go through the trace logs looking for the time when the delay occurred and see if it makes any references to related design elements.
Other open applications may get built at the same time (which looks like a bug top me). Be sure to close all other applications and the server based replica. Open applications have their icon showing in the application list and they stay open even if you close and reopen the Designer. In Designer 9 right click application and select "Close Application". In 8.5 you need to use Package Exprorer for closing.
Another good way is to use Working Sets. Only applications in open Working Set will be built (AFAIK). Have a Working Set with this one app only (and the app only in this Working Set).
update 1
If these don't help I would delete/rename bookmark.nsf, Cache.NDK and desktop8.ndk. Then open just this one app and see what happens.
update 2
Check that there are no referenced projects. Right click the application and select "Project Properties". From there "Project Referencies" and make sure no check boxes are checked.
update 3
Based on your update I would check the item names starting with $ in location document. Sometimes there are saved IP addresses etc. which could cause this problem. All those items can be removed.
If possible (and if You are not using it yet) try to use version 9 of the Domino designer (You do not have to use Domino 9 to do that - it works fine with Domino 8.5.3).
For our projects build times went down to only few seconds from few minutes. I guess that they finally noticed at IBM that the build process used to heavily relay on connection to server and done something with it.
With new designer You don't event have to replicate to local. You can directly work on Your local server.

Marmalade SDK Simulator error: Couldn't initialize Direct Draw

I have been working with marmalade for some weeks. But since today my simulator is not working anymore. I always get "error: Couldn't initialize Direct Draw" when i launch the simulator.
I tried uninstalling marmalade and restarting pc but nothing is helping.
Anyone has an idea what this can be, or things I can try?
Error message can be seen:
PC specs if this might help:
- Acer Aspire notebook
- Windows 7 Home Premium SP1 64bit
- Intel i5 2410M
- 6GB RAM
- AMD HD 6650M 1GB
For anyone who may come across this, the same thing happened to me just yesterday. I started getting the "Couldn't initialize Direct Draw" on startup after having made a few changes under Preferences -> Display.
I fixed it by going to C:\Users\{user}\AppData\Roaming\Marmalade\ and deleting (or renaming) the preferences.icf file. This isn't removed after an uninstall, so if you find yourself in this situation, this seems to be the only way to reset everything.
Good luck!
A couple of things to try.
First, try running your program from inside Visual C++ by pressing and holding F5. This will cause the simulator to start but won't start executing your program, which might then give you a chance to change the settings in the simulator.
Failing that, if you look in the data directory you should find a file called development.icf which is the current simulator settings. Try deleting this and running again which will cause the simulator to revert to its default settings.

QTP+VM: Why is the Click command not executed when I'm not conncted to the VM via Remote Desktop?

I'm using QTP 10 together with VMWare to test a Siebel Application.
I'm executing the following code to click on a Save button.
Browser("Siebel").Dialog("Filedownload").WinButton("Save").Click
The code works perfectly fine when I'm connected to the VM via Remote Desktop.
On the other side, when I'm starting the QTP test through the scheduler, without having a Remote Desktop connection, the code above fails without any error message. The WinButton is simply not clicked.
Any idea?
Just to add from my experience.
In some companies I worked for I couldn't change screensaver or standby settings due to security policy. A PC was bringing up screensaver during long synchronization periods (like generating really big report), and execution was broken.
To avoid that I created simple "Anti Sleep" function that slightly "moves" mouse every 5 minutes.
http://automation-beyond.com/2009/08/18/anti-sleep-function/
Private Const SleepTime_Max = 300 ‘ 5 minutes
Public Function AntiSleep()
Dim iter
Dim objTimer
Dim objDeviceReplay
Dim intTimeElapsed
Set objTimer = MercuryTimers(“AntiSleep”)
intTimeElapsed = CInt(objTimer.ElapsedTime/1000)
If intTimeElapsed = 0 Then
MercuryTimers(“AntiSleep”).Start
Exit Function
End If
If intTimeElapsed < SleepTime_Max Then
Exit Function
End If
Set objDeviceReplay = CreateObject(“Mercury.DeviceReplay”)
For iter = 100 To 110
objDeviceReplay.MouseMove iter,300
Next
MercuryTimers(“AntiSleep”).Start
Set objDeviceReplay = Nothing
End Function
Example of using it in a custom synchronization function:
http://automation-beyond.com/2009/08/20/gui-object-synchronization-custom-function/
Thank you,
Albert Gareev
QTP can't interact with a locked desktop, that's why it'll only work for you when logged in interactively either locally or over RDP. It's a well known limitation of QTP, most automation engineers go through this pain at some point. :)
To be more specific, it can't interact with Win32 objects (can't think of a better way of putting it), so it'll interact with basic browser controls on a locked desktop no problem, but browser popups and Windows applications can't be interacted with in those circumstances.
I strongly recommend (if your system policy allows) that you install something like UltraVNC or another VNC variant to interact with your remote machines. That way you can leave the remote machine's desktop logged on and active at all times. Since it's a VM that shouldn't cause you any major security problems either. Make sure you turn off any screen savers and don't auto-lock the desktop too. QTP should work just fine for you if you do that.