Bug #14842 2008-11-27 12:09

christobal

compile current file can cause C::B to crash

This is how you can repoduce it:

1. create a project with some files and at least 3 build targets (e.g target1 target2 and target3)

2. assing a file (e.g. main.c) to at least two build targets (target1 and target2)

3. set target3 as the current build target

4. start "compile current file" (main.c)

5. C::B should crash now....

I think the cause is CompilerGCC::GetBuildTargetForFile, which will return always the current build target if a file is assinged to more than one build targets.

Category
Application::Crash
Group
 
Status
Open
Close date
 
Assigned to
 
christobal 2008-11-27 13:00

I have posted a patch (ID #002601) that will fix this problem.

ID_45523 2010-01-14 20:59

I confirm the bug, even when the current file belongs to target3:

Create a project a add a target and select ARM9 gcc compiler for it.

Save the project

Quit & reopen the project. If the first thing you do is ctrl+shift+F9 with ARM target, Code::Blocks crashes (the bug exists since 8.02 and still exists in nightly 6080).

If you compile current file with target 1 first, then compile current file works 0K with target 3. It crashes only when it's the first compilation action after code::blocks has been started.