Created attachment 175286 [details] log of application SUMMARY open a project, and calculate a schedule. Application crashes in: ASSERT: "mn->findSchedule(sid) == nullptr" in file /home/mickael/projects/kde/calligraplan/src/libs/kernel/kptschedulerplugin.cpp, line 541 Do you know what is happens ? STEPS TO REPRODUCE 1. open a project file 2. go to 'planification' click on calculate OBSERVED RESULT assert falls EXPECTED RESULT project rescheduled SOFTWARE/OS VERSIONS Linux/KDE Plasma: on Debian 12 KDE Plasma Version: 5.103 KDE Frameworks Version: 5.103 Qt Version: 5.15.8 ADDITIONAL INFORMATION It is 'master' branch, compiled in debug mode (7e8350e8) see example of project file and log in attachement.
Created attachment 175287 [details] project example
Hello, May I have find the issue, in file ktpproject.cpp, calculated schedule seems not right (always 1), when browsed into m_schedule hash, it starts from 1 but in plan file (for example) it can be 3. Here a example of fix, by browsing all hash value and take the max. diff --git a/src/libs/kernel/kptproject.cpp b/src/libs/kernel/kptproject.cpp index 37d612e8..0938bccf 100644 --- a/src/libs/kernel/kptproject.cpp +++ b/src/libs/kernel/kptproject.cpp @@ -2940,10 +2940,15 @@ void Project::addMainSchedule(MainSchedule *sch, int minId) return; } //debugPlan<<"No of schedules:"<<m_schedules.count(); - long i = std::max(minId, 1); // keep this positive (negative values are special...) - while (m_schedules.contains(i)) { - ++i; + QHashIterator<long, Schedule*> it(m_schedules); + long i = minId; + while (it.hasNext()) { + it.next(); + qInfo() << it.key() << ": " << it.value() ; + i = std::max(it.key(), i); } + ++i;
Git commit 0fc4fbc5d8d19aae6293c78daee1b936e582ca2f by Albert Astals Cid, on behalf of Mickael Sergent. Committed on 17/12/2025 at 22:15. Pushed by aacid into branch 'master'. Related: bug 1 M +9 -3 src/libs/kernel/kptproject.cpp https://invent.kde.org/office/calligraplan/-/commit/0fc4fbc5d8d19aae6293c78daee1b936e582ca2f