Link to home
Start Free TrialLog in
Avatar of Kristian
Kristian

asked on

D7, IDE Bug / Issue

I am running D7, Update Patch 1 has been installed.
i am about 10 months into a project, and suddenly (over the last couple of weeks)
i keep getting a error kick in.

now this error is 3 fold.

there is 1 that when i run Delphi it causes an access violation. then removes some items from my forms (ie the the TPopupMenu's will be removed, but the declorations are still in my dfm and in the pas file. its just gone from the ide..)

then i can close delphi, re open, and no access violations...

then i open the form again, and the same the TPopupmenus dissappear, (oh and on closing the form it always asks if i want to remove decloration xxxMN for all of the items in the popup. as like i said the declorations are all there.

then after closing the form (without saving) and open again its all fine....(aaaaaagh).

ok thats kind of 1 and 2.

the 3rd scenario, is sometimes when i open a form i can do (stuff), then on closing the form it lkeeps trying to redirect links, saying things like, (this is from memory) cannot find link for control xxxED, remove or redirect link?
then the redirect option lists all open forms. i just select remove link, and all seems fine.

now there are no accross unit links.

and once again if i dont save then open again its usually fine.

what is going on?
has anyone else had these problems.
have i done something totally obscure in my code thats causing problems (doubtfull)
is this a bug in delphi?

now i know thats about 200 questions, but you get the jist...

oh and if anyone says reinstall Delphi, we get the same issue on a different machine too.

Any help gratefully recieved.
Cheers in advance
Kristian.
Avatar of Wim ten Brink
Wim ten Brink
Flag of Netherlands image

It seems as if you've uninstalled some Package of Delphi, either on purpose or accidentally. Did you ever get a message in Delphi saying "Package XXX cannot be found. Reload it again during next startup?" or something similar? If so, and you answered with NO then you have deleted a package from Delphi!
Or there could be some conflict within your Delphi packages/library. But missing components seem to be related to missing packages in general. If you get such an error then never save your unit or else the DFM of this unit will be damaged too!

About the links, this could be a bug in the related component. I had something similar with some component that sometimes would just fill in all the events it had with random (but existing) event handlers. And I would detect this error only on compilation because those events had the wrong parameters. A real nasty bug which, as it turned out, was related to an inappropiate way to clear some memory within the component.

If you ask me, it seems to me that you might have installed a new component/package and this one is causing lots of troubles... Am I right?
Avatar of Kristian
Kristian

ASKER

Well im not getting the 'Delphi packages/library Loaded etc' message, even after the access violation
(which does only happen very occasionaly (6 times maybe tops) the package is still actually loaded. its only that
like i said TPopupMenu (standard menu's component) is visually missing, all DFM and Declorations are in place.
and like you said, sometimes the first time you realise is actually on compilation.

i do have a package that we have created, its got a bunch of components in.
sometimes these link problems are with my components, sometimes not..

and as you mentioned it, i also have had odd events dissapearing too suddenly.
( i actually resorted to setting the main clulprets at formcreate just to ensure they stayed set, not nice i know but you know )

i have wondered if there is a memory problem in the package,
but the tool set is 3rd gereration, i have been very strict. and im at a loss how a memory issue in a package could have this random effect anyway...

Lastly the link of the property that is being lost from the components is the parent property (which is standard TComponent functioanllity)..
K

ASKER CERTIFIED SOLUTION
Avatar of andrewjb
andrewjb
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hmmm, im trying to think if when this all happens if its all at start up.
coz like you sugest, removing dsk, and turinging off asve form pos might get over the load up,
and then keep an eye on units while i open them and see if it haddens.
its an interesting point is the loss ONLY at startup? Hmm.

the trouble is its speradic, it does not happen all the time,
but just enough so it catches you off guard when your not paying attention.
i will try this and keep an eye on it..

K
(oh yes, all components appear on the tool pallette)
mind you i say that, i have had the odd occasion where it doesnt refresh properly, and i have to change the tab or slid the mouse over it for the graphics to appear properly though.
K
If you've got any 3rd party or self-written components, they could have bugs which doesn't half confuse the IDE.
we do have Self written components,
but im a 9 - 10 year experienced component writer(among other things). so i basically trust the components.
(and as they are 3rd generation, 99% of all evil has been long removed a longh time ago)
but obviously im not writing off the option that it could be a component bug..

i could really do with debugging the package on loadup really just to see what its doing (no chance there then).

also if it was a component bug (bar a memory issue) i would thing the problem would be more frequent, where as its only occasional.

K
u could try installing MadExcept, which will catch exceptions of Delphi IDE too. It takes full control over Delphi's exception handling

http://madshi.bei.t-online.de/madCollection.exe

Since u say that the same problem is occuring on another machine too, it might be some common component or an IDE addin thats causing these problem.
Well i left the save off for a week now, and as delphi is not openinh up all of my units, and im doing it manually, i have not had any problems since. so it was package and having forms loading at load up. for the moment i can live with that. but it is a pain, and save settings is nice to keep on.

thanks anyway to all.
K