Calling LoadTasksFromJSONFile (or stream) generates access violation message

Hello,
I have installed TMS FNC Core v4.2.2.7 and TMS FNC Gantt Chart v.1.3.3 in Delphi 13.
When I call the LoadTasksFromJSONFile or LoadTasksFromJSONStream function in my own project or in the sample project provided ("...\ TMS FNC Gantt Chart\Demos\Fill Project"), I always get a protection violation. Saving with SaveTasksToJSONFile or SaveTasksToJSONStream works perfectly (load/save with csv also). It seems to be related to FOwnerProject, which is nil:

function TTMSFNCGanttTask.GetPlannedDuration: TTMSFNCGanttDuration;
begin
  if (SubTasks.Count > 0) and CheckProjectAutoParentStartEnd then
  begin
    FOwnerProject.WorkTime.GetDurationBetweenDateTimes(ScheduledStart, ScheduledEnd, FPlannedDuration, WorkTimePolicy, False);
  end;

  Result := FPlannedDuration
end;

Is there a solution for this? I appreciate any help.

Hello,

Thank you for the information.
We are currently investigating the cause of the problem.

This will be fixed in the next release of TMS FNC Gantt Chart.

1 Like

Hello,

Thank you for fixing the LoadTasksFromJSONStream loading error, but now I cannot save at all? Sorry, but is this an April Fool's joke?

procedure TTMSFNCGanttProject.SaveToJSONFile(AFileName: string);
begin
// TODO: implement JSON save
end;

procedure TTMSFNCGanttProject.SaveToJSONStream(AStream: TStream);
begin
// TODO: implement JSON save
end;

I’m very sorry, there was a problem with the commit of the file.
Our build tool is currently running and an updated version with a fix should be ready by this afternoon.

It's working now. Thank you very much for the quick solution.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.