Skip to content

Fix: "Validate all forms" crashes when no project is active #29

@bero

Description

@bero

Bug

The Bold menu action "Validate all forms" crashes with an access violation when:

  • No project is open in the IDE
  • A project group exists but has no active project

Root cause

In BoldComponentValidatorIDE.pas, the method ValidateIOTAModules accesses Project.FileName and Project.GetModuleCount without checking if Project is assigned:

Project := ProjectGroup.ActiveProject;
BoldLog.LogFmt(sDefaultProject, [Project.FileName]); // Crash if nil

Fix

Added nil checks before accessing Project properties:

  1. Check Assigned(Project) after ProjectGroup.ActiveProject before logging
  2. Wrap the project module iteration in if Assigned(Project) with a fallback log message

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions