Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • FPC Source FPC Source
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 1,404
    • Issues 1,404
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 67
    • Merge requests 67
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • FPC
  • FPCFPC
  • FPC SourceFPC Source
  • Issues
  • #26801
Closed
Open
Issue created Sep 30, 2014 by FPC Admin account@fpc_adminOwner

Library initialization support for database applications

Original Reporter info from Mantis: BigChimp
  • Reporter name: Reinier Olislagers

Description:

Currently, instantiating a class that sets up an sqldb Firebird connection in the initialization section of a unit leads to access violations. (Similar code works in a regular program, not a library)

Moving the instantiation out of the initialization section does work.

I understand initialization order is not defined but it would be nice if support were available for this.

Steps to reproduce:

See attached example.
Requirements: any Firebird server (or presumably embedded db though untested)

Steps:

  1. Please update your Firebird server details in dbinterface.pas to your
    situation (hostname etc)
  2. In businesslayer.pas, $define CRASH to see the problem.
  3. Compile library and test program and run.

Additional information:

Further points/discussion:
José Mejuto:
http://www.mail-archive.com/fpc-pascal@lists.freepascal.org/msg37746.html

Mark Morgan Lloyd:
http://www.mail-archive.com/fpc-pascal@lists.freepascal.org/msg37752.html

Mantis conversion info:

  • Mantis ID: 26801
  • OS: Windows
  • OS Build: Windows 7
  • Build: 28723
  • Platform: x64 (with x86 compiler)
  • Version: 2.7.1
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking