Access Violation opening a project

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #38122
    BionicWave
    Participant

    Hello all together,

    i discovered a problem working on one of my bigger projects.

    I use AlphaControls 2019 v14.13 b1071 on Delphi 7.1 Enterprise.

    Description of the error circumstances:

    – None of the forms inside the project are automatically generated. Only the main form.

    – BEFORE the main form is starting up, by calling Application.Run(), i manually create a hidden form which includes the

    TsSkinManager.

    – When i open the project and the hidden form is NOT in the list of forms to be opened up on loading the project in the IDE, i will

    get an access violation like this one:

    “Access Violation at address 1067CFEC in Modul acntD7_R.bpl. Reading from Address 000079E8.”

    – With that error on opening the project i only see the sourcecode of forms. I am not able to get delphi to show me the actual window.

    This means i can not work with the project.

    – When I then rearrange the project, so that ONLY the hidden form with the SkinManager is opened up on loading the project, there is no

    error message and i can open any form without problems.

    I use the hidden form as the central place for the only SkinManager in the project. Every other TForm references this hidden TForm.

    This form is created in the sourcecode of the project like this:

    fHiddenMain := TfHiddenMain.Create(nil);

    After that i create a LoginForm in the same way.

    When login is successfull i do:

    Application.Initialize;

    Application.CreateForm(TfMain, fMain);

    Application.Run;

    Is this a known problem? Am i doing something obviously wrong here?

    Thanks for reading.

    Bio

    #58948
    Support
    Keymaster

    Hello!

    I think, “Application.Initialize;” must be placed before creating of any forms.

    Also, try to change a type of hidden form to TDataModule. This type is specially intended for such purposes, for placing of invisible components, TTimer, TImageList, etc…

    Can you repeat the error in separate demo, which may be debugged?

    #58949
    BionicWave
    Participant
    'Support' wrote:

    I think, “Application.Initialize;” must be placed before creating of any forms.

    I will try that out. Thank you.

    'Support' wrote:

    Also, try to change a type of hidden form to TDataModule. This type is specially intended for such purposes, for placing of invisible components, TTimer, TImageList, etc…

    I tried that too, but TsSkinManager can not be placed on a TDataModule. So…

    'Support' wrote:

    Can you repeat the error in separate demo, which may be debugged?

    This problem only seems to become relevant, when you developed a project for a longer time, since i worked on that project for nearly a year now and never had that problem

    until recently.

    I also switched back to version 14.11. This reduced the exception messages to almost none.

    I blame these exceptions to a good degree on my rather old Delphi version, but it seems that the combination of my Delphi version and the 14.11 version of your components

    seem to work better on a Win10 installation.

    I already tried to test the error with an empty project, but had no success.

    So as long as it works, i have to finish the project first, as you may understand.

    I will message here again if i run into another “major problem” state and will exmamine this effect a bit deeper.

    Thanks for your help.

    #58951
    Stephane Senecal
    Participant

    I tried to put a TsSkinManager in a TDataModule and it works quite well.

    The only thing special I noticed, is that you must open the DataModule unit in the IDE for controls to be skinned at design.

    Note that auto-create does not mean auto-show. Only the main form will be shown automatically, unless Application.ShowMainForm = False.

    Set DataModules to be auto-created before Forms.

    Stephane Senecal
    CIS Group
    Delphi programmer since 2001

    #58960
    Support
    Keymaster

    TsSkinManager may be placed to the TDataModule without any problems and it's a good way.

    The TsSkinManager component is not visible.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.