A co-worker of mine had downloaded a vb example project a while back to see how to make a call or two, he discovered it today again, and noticed that while sitting in the IDE the time/date is updating automatically when the entire project is not even running.
How does this work, we looked around for code but can't find anything giving it away.
Any ideas?
No enough info, really, but is it possible the time and date are part of a user control sited on the main form? In the IDE, user controls operate in a hybrid mode where their code can be running when the app itself is not.
I can't think of any other scenario where if the IDE is truly stopped, any code can be running.
The StatusBar control in Windows Common Controls can automatically display the current date and time. It updates its display even in design mode.
If you have ever developed controls yourself, you might have experienced an AHA! moment when you realised that your control code is running when the control is being used at design time in the IDE.
Related
I'm using version 14.03.
Anytime I open UFT, Cortana, or even Windows Shell Experience Host if I remove Cortana, starts being very slow and CPU hungry. It stays that way until I log off or reboot. Cortana is the process that handles the start menu and searches so it's very noticeable when it is slower.
the installation guide mentions that Cortana should be disabled during UFT install, which I tried. It seemed to have fixed the issue at first, Cortana stayed responsive for a while after I opened UFT but it ended up going back to being slow later on. Now, after a reboot, it reverted back to the old behaviour of being slow as soon as UFT is launched
Another thing worth noting is that as soon as I uninstall UFT, Cortana works well again (no reboot).
What could be causing this?
I'd suggest moving this subject to https://superuser.com/ community.
It indeed sounds like a real conflict between Unified Functional Testing and Cortana. not sure that you, as an end-user, can solve it.
First, I'd suggest the obvious - contact support of both companies, and update to the latest versions.
Second, try to collect as much information as you can:
Process Monitor - filter by the relevant processes (Cortana process name is SearchUI.exe, but I don't know about UTF).
Microsoft Event Viewer - try to seek for events in the exact time of the issue.
Mostly I am just sad I guess. Yesterday I finished an iPhone app in Xcode 10.2.1, loaded it onto my phone (it works nearly perfectly), and shut down Xcode. The app is on my phone and working, but when I opened the Xcode again the code (viewcontroller, AppDelegate, and storyboards) have no data. To be clear, the folders and files are still there, but the code/data is not. I did not have time back up the finished version. Is it possible to retrieve these from my phone? Or is there some other place to look to find it? Or am I stuck rewriting it (there are some iterations so it is not starting over completely, but it still sucks).
thanks
Is it possible to retrieve these from my phone?
No, your phone contains only the compiled object code; it won't have any source code.
Or is there some other place to look to find it?
It's hard to imagine how the code could have simply disappeared, so one would think it's probably there somewhere. I wouldn't think that you could compile an app without saving the code, and if you saved your work then it certainly shouldn't just be gone. If you can remember even just a part of a phrase from the missing file(s), you can search your machine for files containing it. Use Spotlight or even just grep for that.
If you're unable to recover the file(s), then rewrite it as soon as you can while it's still fresh in your mind. And use the experience as a lesson. In the future you should do both of the following:
back up regularly: Use a backup system that works automatically. Apple's Time Machine works very well for this... all you need to do is plug in your backup disk and let the machine do it's thing.
use revision control: There are a lot of options here, of course, but git is free and private Github accounts are also free, so you can save your work remotely. If you don't know how to use revision control, learn -- it's an essential development skill.
I have known for a while that VB6 is trouble, but what can I do - I have a legacy system to maintain and it still being developed here and there.
And I had the weirdest thing ever happen to me with VB6 just now.
Compiled a new version of our application. Tested it - it worked.
Deployed to a client production site. Application keeps crashing! When? When the user clicks anywhere inside a DHTMLEdit control that we have in a specific window. Or sometimes even on the window that contains it.
Now, I've had this before and the solution was always very cryptic. So I tried the following: incremented the project's revision number by 1, recompiled, and guess what?
Works perfectly.
I cannot show code because we are talking about 50,000 lines of code here, and there is no specific code called when clicking the DHTMLEdit control, the form, whatever.
I'm just wondering if anyone else had encountered this oddity.
The VB6 compiler is not a deterministic compiler and does not produce anything near consistent output. IOW, while fixing your bug is not by design, the fact that it can produce such behavior is.
But even in deterministic compilers, making a small change can sometimes "fix" (aka hide) bugs that are triggered by memory alignments, or variable initialition
We have a legacy VB6 app, which is critical to our business. We're working on re-writing it in .NET, but that's going to take a long time.
Over the last few years, this old VB6 app has had problems with third party controls that we purchased about 10 years ago, when we wrote the VB6 app. These problems are getting progressively worse. For example, the application will suddenly crash. When it does I'll check the user's event log to see what happened, and almost all cases one of the third party controls failed, and took the application down with it. Sometimes this causes the user to lose data.
We've done the best we can to mitigate this and that's helped tremendously, but haven't been able to prevent all cases of these failures. A few years ago, when this problem first started to show itself, I did some investigation into why these crashes were occurring and I remember some people saying that some of these problems were due to the service pack we had our application at. Our VB6 app is currently at service pack 5. I learned that Microsoft had come out with service pack 6, for VB6, and asked about that, back then, and people advised me to not upgrade to SP6 for VB6 due to incompatibility issues with our third party controls, so we've left things alone.
However, now these crashes are occurring more frequently. It's occurred to us that perhaps the issue is some recent updates to Windows may have already moved VB6 to SP6. Or, perhaps the advice I was given years ago about leaving our application at SP5 for VB6 was wrong. In any case, we need to find out if we can move our application to SP6 for VB6, and thereby hopefully reduce, if not eliminate, the number of fatal crashes these old third party controls are giving us.
Here's the list of third party controls that our application is currently using. Does anyone know if these controls will work with VB6 SP6?
Crystal ActiveX Report Viewer Library 11.5
Crystal Reports ActiveX Designer Design and Runtime Library 11.5
Crystal Reports ActiveX Designer Run Time Library 11.5
WSpell Spelling Checker Control version 1.0
Sheridan Data Widgets 3.0 A (in particular their Data
Grid, Data Combo and Data DropDown controls. It is these controls
which are at the root of all of our app's fatal crashes.)
I've used WSpell with VB6 SP6. Crystal was always pretty tightly in bed with Microsoft so I would expect that those work. Sheridan, well, I can't help you there.
That said... why ask? Just test it. You can always roll back if it doesn't work, right?
I can't give any advice about the Sheridan controls but we are using Crystal ActiveX Report Viewer and Runtime Library 10.0 with our VB6 app (using SP6) and this has no crashing issues.
We have multiple VB6 apps using Sheridan Data Widgets 3.1, mainly the grid but the dropdown a bit these days too. Everything ran fine on Vista and 7 but once a few people upgraded to 10 (we ignored/avoided 8) problems emerged quickly.
Loading the grid started making the app crash, but it was strange. I could call the load function (it populated the grid) when initially displaying information, and it was fine. Other functions would change the data and reload the grid, and most worked except for one. Nothing special or different about it, but the grid took a special dislike to it. What was annoying was if I threw in a MsgBox every time before a line was added to the grid (we use AddItem mode) the silly thing didn't crash.
Had a similar problem once with the grids, found I had to divert focus to a new form that appears for less than a second. Might be something to do with how the grid draws? Or judging by the function that causes it to crash when no others do, perhaps certain sequences of events cause the crashes.
Looking at the event log on Win10 it's telling me the faulting module name is USER32.dll, exception code alternates between 0xc0000005 and 0xc000041d.
I am having to use a 3rd party ActiveX DLL in my VB6 application. However, now that I've included the DLL in the references and used it in code, every time I quit my app, it also quits VB6.
I don't see anything in the logs or event viewer that would suggest why this is happening.
Is there anyway to prevent this?
Btw, I have contacted the vendor, but they are focused on their .NET products, it seems.
You may not be using the component correctly by missing specific initialization or termination calls, which has the affect of bringing down VBIDE. This usually happens when the third-party component or your application make Win32 calls.
I have had a few applications that I ran them through the debugger, they always terminated VBIDE. Yet, running the Release or Debug versions normally, resulted in the applications working just fine.
Try switching DEP off for VB6.exe only or altogether.
Also, this might be a license checking issue i.e. registry permissions -- try running VB6 IDE as Administrator (right click->Run as Admin)
I'm not a VB6 programmer by trade. I just mess around with the stuff. I have heard of this scenario referred to as sub-classing. Run a search on pscode.com. They have code and tutorial examples about how to prevent it. Good luck.
Ouch. I feel your pain.
Can you switch to a .Net component, and use it from VB6 via interop? I.e. write a COM-visible wrapper in VB.Net?
Just to close this question out... After spending significant time trying various things I ended up writing code that unloaded the control, paused for 5 seconds and then quit app. That seemed to do the trick.