Bug 320653 - CMake manager asserts if the same project is opened two times
Summary: CMake manager asserts if the same project is opened two times
Status: CONFIRMED
Alias: None
Product: kdevelop
Classification: Applications
Component: Build tools: CMake (other bugs)
Version First Reported In: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-03 10:19 UTC by András Manţia
Modified: 2021-03-09 22:47 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description András Manţia 2013-06-03 10:19:54 UTC
The bug could be related to bug 198953, although my backtrace is different.
Setup:
- one cmake project that could be built for desktop and Android
- two separate build directories (one for desktop, one for Android)
- KDevelop crashes with an assert:

ASSERT: "folders.isEmpty() || folders.size()==1" in file /development/sources/kde-trunk/kdevelop/projectmanagers/cmake/cmakemanager.cpp, line 1259

I've added a few debug lines befor to see the content of "dirty" and "folders" (folder names are changed):
dirty:  "/development/repository/app/src/alerts/frontend/" 
folders: (0x7fbe69733dd0, 0x7fbe691a4c10) 
KUrl("file://development/repository/app/src/alerts/frontend/") 
KUrl("file://development/repository/app/src/alerts/frontend/") 

The CMakeLists.txt in "alerts" looks like this:
add_subdirectory(backend)
if (NOT ANDROID)
    add_subdirectory(frontend)
endif()
Comment 1 Aleix Pol 2013-06-03 11:02:16 UTC
Hm, I see... well the idea was that you should be able to easily switch from one build directory to the other, instead of having the project open twice. Actually this can be a problem in different cases (they are both using the same config directory!).

Should we find a good way to let you configure the build directory of a build run?

I'm not closing because we should error in this case, not assert and crash.
Comment 2 Justin Zobel 2021-03-09 22:47:53 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.