D7, IDE Bug / Issue

Posted on 2004-11-18
Last Modified: 2010-04-05
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
Question by:Kristian
    LVL 17

    Expert Comment

    by:Wim ten Brink
    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?
    LVL 1

    Author Comment

    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)..

    LVL 12

    Accepted Solution

    Try deleting the .dsk (I that the one?) file for your project. (That's the one that tells you which windows are open... sometimes helps). If not, delete the default.dsk in Delphi's directory. If not, try starting Delphi with Shift pressed, which stops it openeing any projects...

    Do all the components appear on the palette with no project open?
    LVL 1

    Author Comment

    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..

    LVL 1

    Author Comment

    (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.
    LVL 12

    Expert Comment

    If you've got any 3rd party or self-written components, they could have bugs which doesn't half confuse the IDE.
    LVL 1

    Author Comment

    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.

    LVL 6

    Expert Comment

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

    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.
    LVL 1

    Author Comment

    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.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
    In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now