I was hoping someone can point me in the right direction regarding an issue I am having with the message "Error creating window handle". I know this usually points to a memory leak problem with the code, however this only happens on a single machine. If the code was the issue, I would be expecting it to happen on other machines as well.
I have other machines that this application runs on that do not run into this problem. I have tried reproducing in on my development machine and other machines in the office. Neither has been successful. I have tried watching the memory in Task Manager on the offending machine and it does not skyrocket up before it throws the error.
The offending machine is running Windows XP Professional SP3. Any ideas on how to proceed would be great.
Thanks
I have just had the same problem in two different applications. For us, the problem was triggered by setting the Windows theme to "Windows Classic" rather than "Windows XP Style". The control that fails is a System.Windows.Forms.ListBox inside a Developer Express XtraLayout container, and our fix is to replace it with a DevExpress.XtraEditors.ListBoxControl.
Related
I have embarcadero radstudio xe8 on a windows 10 machine. Everything was working perfectly till about 2weeks ago. Everytime I try to start Delphi xe8 I get an error :"Exception EOSError in module rtl220.bpl at 00050A4D.System Error. Code 111. The file name is too long. " I tried reinstalling a couple of times and I even tried installing appmethod but I still get the same error.
What can be the problem?
I've had the same issue today. I've traced it to a GetAdaptersInfo() call, and it turned out that for some reason (VirtualBox is my main suspect) I've had over 50 network adapters registered on my system. Removing all of them fixed the issue.
There is not enough info in your question in order to tell what exactly is wrong. Try using Process Monitor in order to check what files Delphi is trying to access. It will also show the errors of these file operations.
as they uri2x tell you the problem is that RAD Studio having issue with many network adapters registered more than 20 will not work properly you will have problem with debbuging and run project and you may find many cmd.exe process running in your system
delete duplicate and non needed network adapters registered on "Control Panel\Network and Internet\Network Connections"
that will fix your problem
This may be of help. I had a similar problem, error code 5 Access is denied. This turned out to related to a thread started to test an internet connection on an embedded panel (using BeginThread). If the user exits the form (which is testing the internet connection) immediately after displaying the form, the AV occurs.
On my development PC, the internet connection test was successful...and so fast I never saw the problem! After struggling for several hours, I finally tracked it down to this thread and reproduced it by disconnecting my network cable.
The solution was straightforward: When exiting the form (eg. in the FormDestroy event) ensure the thread is definitely not running before continuing.
I have an XE8 project that (is supposed to) access an Interbase server running on the same machine. A few days ago it was working fine, but has developed the problem that if I attempted to set the Connected property of a TIBDatabase component to True, either in the IDE or in code at run-time, I get the error:
Connection rejected by remote interface
Attempting to connect to the server using the IBConsole utility also produces this error.
I've cleared as much of Interbase as I can find from the machine & its registry and re-installed it but the problem persists. Googling the message text finds a modest number of things, but I've tried the few suggested solutions to no useful effect.
Btw, the PortQry utility confirms that port 3050 is open and that the gds_db server is listening.
My question, obviously, is does anyone recognise this symptom and know how to fix it?
I eventually found the cause of this problem. I have an instance of the Firebird server installed on the problem machine and set up as a service, and at some point recently, its Startup Type had been changed from Disabled to Automatic and the fact that it was running was evidently causing the IB server to misbehave. Reverting it to `Disabled' caused the problem to vanish.
I imagine that it was actually the FB server that was the 'remote interface' that was rejecting the connection.
I found interesting problem with Win7/X64 machine.
For this time I haven't got problem with Delphi 6 and UAC.
The exes are working in their's place, so I can use Delphi debugger with them.
But today I got error on run the project: "Unable to create process. For this operation you need higher user level".
How can I prevent this side-effect?
What causes this?
I don't understand why the older projects are running fine, but this new isn't...
Thanks for every idea, link, information!
Additional info:
Normally I using the Delphi 6 IDE with normal starting (without SysAdmin rigths).
So it is never asking me with "really?" kind UAC questions.
And every of the older projects are usable with Delphi 6 - I can build, run, debug everything.
This problem happened with only this project, so I try to find the differences if possible to solve the problem.
I using normal directory ("c:\dev\anyproject"), others are using "c:\dev\otherproject1..2..n").
Does your application request elevation when started from Windows Explorer?
Does it have a manifest?
The name of the exe, like setup.exe, could also trigger elevation. See an outline of the Installer detection technology.
Non-elevated process can't debug elevated process.
If your application requires elevation at the start, then you would need to run the IDE elevated to be able to debug it.
Starting your IDE as an administrator should solve the problem (option in the context menu).
If not, you could always disable UAC while developing.
There is a number of limitations that needs administrator's rights.
For example: you cannot write data directly into program files directory.
I develop with Delphi 2010 in a VM, the app runs well inside the VM in any ways within the ide, alone with or without Eurekalog using mainly DevExpress grids and AidAim SQLMemtables.
When the same App is ran on the host (ie directly on windows) the eurekalog finds memory leaks on the SQLMemtable dataset component and sometimes but often enough to make it impossible to release it crashes on a simple Dataset.refresh. It is very hard to debug because in the debug environemnt it works.
Anyone would have any idea what is going on, I am at loss of ideas here
Thank you for your help
Regards
Philippe Watel
Your external dependencies (dlls) differ on both machines? Also consider using Delphi's remote debugger and log more details to find out more details about your problem.
I'm having an interesting problem implementing a global keyboard hook.
I wrote a dll which is used to set the hook and then an application (Delphi) which loads the dll and processes the results of the hook. This was done this afternoon on my PC at work and after some testing I figured it was working 100%.
I've just tested the same app and dll here at home and I'm not getting any errors, but the application does not appear to be getting any data either.
Both machines are WinXP, although my work machine is SP2 and this one is SP3.
Has there been some change in the Win32 API which would cause this to malfunction, or could the problem be related to some A/V / Spyware / MS Update that has been released recently?
I'm hoping somebody here will know of an obvious reason that this may happen before I spend hours debugging.
Thanks!
Actually some A/Vs don't like homemade hooks. I've got the same problem with my mouse hooker on some machines, and it doesn't depend on service pack version.
Yeah, I could. I haven't installed Delphi on this machine, but I think I might have to. I'm going for the low hanging fruit here. If there's an obvious answer, there's no need to go through all the trouble of debugging and hoping to find what might be the problem.
My first suspicion is that there's been a change in the API somewhere.
As I mentioned, this app works absolutely perfectly on my work machine.
Do you have a debugger on your home computer? Do you receive any messages via the hook at all?
Can it be that some other application is hooking, and don't pass the message on down the hook-chain?
BTW: I love virtual machines for this kind of testing. Keep a clean XP install. Install SP2, and test your application. Roll back to clean install again, and install SP3. Try your application again. This way you will know if its SP3, since there is nothing else to mess things up. I like to keep a set of snapshots around with different configurations.
Which kind of hook are you using? I once used the WH_CBT-type and encountered problems when certain other applications where running. One case I could trace back to Trillian, which seems to do also some kind of hooking (and maybe screws up).
Apart from that I am currently working on an application that uses the WH_KEYBOARD-hook and this works on SP2 and SP3 equally well. The MSDN also doesn't mention any service-pack related changes.
What you can do to trace the bug on your home machine:
make sure to check all result values of all system api calls (and use GetLastError in case of error)
provide some kind of debug output in case of error (e.g. as message box or to a text file)
optional: log some status messages so you know whats going on internally
One alternative is to use a low level keyboardhook. (Just a different param to SetWindowsHookEx). The hook is processed in the message loop of the registering thread, and thus does not need to inject a dll everywhere. And for some odd reason VirusScanners/Firewalls interfere much less with it. They often silently block dllinjection or normal keyboardhooks. Also removes the need to share the hHook across processes if you want it to work in older windows versions.
And if you abuse a keyboardhook to implement global hotkeys(Have seen that a lot) use RegisterHotkey/http://msdn.microsoft.com/en-us/library/ms646309.aspx) instead.