In this study, we propose an error-feedback method (EFM) for constraint handling of the path generation problem, which replaces the traditional penalty-functional method. Moreover, it proportionally redistributes solutions that do not satisfy the constraint conditions, such that each offspring can effectively participate in the iterative process and avoid additional computing resource wastage. To test the performance, the EFM, penalty, and self-adaptive-penalty-functional methods were applied to heuristic algorithms, such as the differential evolution (DE), teaching learning-based optimisation (TLBO), whale optimisation algorithm (WOA), and gaining-sharing knowledge (GSK). Three four-bar mechanisms of dimensional synthesis and one path-generation problem of a pickup manipulator was considered as examples. The numerical results showed that the algorithm processed by the new constraint-processing method exhibited improved performance compared to other methods.& COPY; 2023 Elsevier B.V. All rights reserved.