Code::Blocks Forums

User forums => Help => Topic started by: Turbine on July 03, 2013, 01:46:39 pm

Title: C::B crashing on start (Ubuntu 13.04 & Mint 15)
Post by: Turbine on July 03, 2013, 01:46:39 pm
Following the selection of compiler, the program will crash with the attached dump.

This happened on my other installation which has been why I'm using this, it was working.. Until I believe I updated G++ & GCC in the Saucy repo from 3.7 to 3.8, eep. Codeblocks version is irrelevant to this problem happening, tried raring, saucy and Jen's repo. I've tried forcing the G++/GCC version back to 3.7, with the exception of "gcc-4.8-base", which will cheekily install most of the software if removed, possibly the cause.

It seems to be completely my fault this went wrong. If you need any other information, just ask. I've tried to run codeblocks from terminal.. it just doesn't do anything or say anything, in the hope it'd shed some light on the issue. I've had no problems with C::B working on various distros in the past, until now.

(http://i43.tinypic.com/2emopk4.jpg)

Thanks, Turbine.
Title: Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
Post by: ToApolytoXaos on July 03, 2013, 02:23:52 pm
Uninstall GCC, and run again Code::Blocks. It should let C::B start properly and complain for not finding any compiler installed.

A compiler issue is totally irrelevant to this project and you are violating the forum's rules, I'm afraid.

http://wiki.codeblocks.org/index.php?title=FAQ-General#Q:_What_Code::Blocks_is_not.3F (http://wiki.codeblocks.org/index.php?title=FAQ-General#Q:_What_Code::Blocks_is_not.3F)

P.S.: Personal issues have nothing to do with this project and you should avoid sharing such silly things in public.
Title: Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
Post by: Turbine on July 03, 2013, 02:26:25 pm
@A compiler issue is totally irrelevant to this project and you are violating the forum's rules, I'm afraid.
Codeblocks is failing to start due to some dependant component.

P.S.: Personal issues have nothing to do with this project and you should avoid sharing such silly things in public.
Troll.
Title: Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
Post by: oBFusCATed on July 03, 2013, 03:05:20 pm
I think you've hit the same issue as reported here: http://forums.codeblocks.org/index.php/topic,18088.0.html

And this is what you should do: http://forums.codeblocks.org/index.php/topic,18088.msg123705.html#msg123705

@admins: Can you move the first and my posts in the other topic and probably rename it to something more meaningful?
Title: Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
Post by: oBFusCATed on July 03, 2013, 03:07:07 pm
@ToApolytoXaos:
Please be a bit more polite, Turbine is reporting a real problem not related to the compiler.
You'd have known that if you've looked at the provided crash dump.
Title: Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
Post by: ToApolytoXaos on July 03, 2013, 04:32:03 pm
OK. You know better. Who's trolling btw?
Title: Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
Post by: oBFusCATed on July 03, 2013, 04:45:20 pm
Who's trolling btw?
You, this time  ;D
Title: Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
Post by: ToApolytoXaos on July 03, 2013, 09:04:56 pm
Ah he edited his answer and removed the line about girlfriend's mother / father something...i don't remember now.

I think it's best for me to stop trying to help people; as it seems it's pointless.

cheers.
Title: Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
Post by: Turbine on July 03, 2013, 11:21:02 pm
I think it's best for me to stop trying to help people; as it seems it's pointless.
*facepalms* you're beyond help I'm afraid.
Title: Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
Post by: Turbine on July 03, 2013, 11:37:14 pm
Can we please get back on topic.
Title: Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
Post by: BlueHazzard on July 03, 2013, 11:43:14 pm
pls post the file /tmp/codeblocks.....

if possible in code tags, or better use some pastebin service, because it is a large file...

greetings
Title: Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
Post by: Turbine on July 03, 2013, 11:54:22 pm
It's already attached to the first post, here's a pastebin of the same thing if it's inconvenient.

http://pastebin.com/sD9v8ycr (http://pastebin.com/sD9v8ycr)
Title: Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
Post by: oBFusCATed on July 03, 2013, 11:57:20 pm
Turbine: I've told you what to do - contact ubuntu's developers, they ship modified gtk+, so they probably know what is going on.
Title: Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
Post by: BlueHazzard on July 04, 2013, 12:18:14 am
It's already attached to the first post, here's a pastebin of the same thing if it's inconvenient.

sry, didn't read earful...

Code
    <frame level="1" function="g_type_check_instance_cast" offset="0000001c"/>
    <frame level="2" function="wxMenu::GtkAppend(wxMenuItem*, int)" offset="00000612"/>
    <frame level="3" function="wxMenu::DoAppend(wxMenuItem*)" offset="0000001e"/>

yea, it's a gtk+ bug, we can't do nothing, as oBFusCATed said

greetings
Title: Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
Post by: oBFusCATed on July 04, 2013, 01:08:35 pm
yea, it's a gtk+ bug, we can't do nothing, as oBFusCATed said
I won't be so sure :) Currently there are some gtk-warnings related to this code,
so probably we are doing something wrong there, but I don't know what.
Title: Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
Post by: Jenna on July 04, 2013, 02:10:46 pm
It might also be a wxWidgets bug.
Title: Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
Post by: oBFusCATed on July 05, 2013, 01:33:24 am
Ubuntu and windows users please try this patch to see if the crashes are fixed and the code still works on windows:

Code
Index: src/src/debuggermenu.cpp
===================================================================
--- src/src/debuggermenu.cpp    (revision 9174)
+++ src/src/debuggermenu.cpp    (working copy)
@@ -78,11 +78,25 @@ namespace
             return nullptr;
         if (recreate)
         {
-            wxMenu *subMenu = item->GetSubMenu();
-            while (subMenu->GetMenuItemCount() > 0)
+            wxMenu *menu = item->GetMenu();
+            size_t pos = static_cast<size_t>(wxNOT_FOUND);
+            for (size_t ii = 0; ii < menu->GetMenuItemCount(); ++ii)
             {
-                wxMenuItemList& list=subMenu->GetMenuItems();
-                subMenu->Remove(list.GetFirst()->GetData());
+                if (item == menu->FindItemByPosition(ii))
+                {
+                    pos = ii;
+                    break;
+                }
+            }
+            if (pos != static_cast<size_t>(wxNOT_FOUND))
+            {
+                wxMenu *newSubMenu = new wxMenu;
+                wxMenuItem *newItem = new wxMenuItem(menu, item->GetId(), item->GetText(), item->GetHelp(),
+                                                     item->IsCheckable(), newSubMenu);
+                menu->Insert(pos, newItem);
+
+                menu->Destroy(item);
+                return newItem->GetSubMenu();
             }
         }
         return item ? item->GetSubMenu() : nullptr;
Title: Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
Post by: Jenna on July 08, 2013, 12:47:34 am
I do not get a crash (latest nightly from my repo for debian testing svn r9176) on Ubuntu 13.04 with latest updates after I deleted (renamed) my ~/.codeblocks directory.
Older configuration from C::B 12.11-2 from Ubuntu repo leads to a crash with the new version. :-* :-* :-*
Title: Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
Post by: oBFusCATed on July 08, 2013, 01:35:24 am
What about the new version?
I'm going to commit it, because it fixes the gtk warnings.
Title: Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
Post by: Jenna on July 08, 2013, 06:51:59 am
What about the new version?
I'm going to commit it, because it fixes the gtk warnings.
I did not test it, but you cast wxNOT_FOUND to size_t and you use the casted value for comparison.

Is this cast guaranteed to work correctly (or better as expected) with all compilers possibly used for building C::B ?

EDIT:
besides of this it seems to work here (fc19 64-bit with wx2.8 and gcc4.8), no more gtk-warnings/criticals.

By the way disabling and immediately reenabling the debugger-plugin leads to a cras, if I click on the debugger-menu.
If I close C::B between disabling and reenabling, it works correctly.
That also happens with trunk, so it is not (directly?) related.
Title: Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
Post by: oBFusCATed on July 08, 2013, 10:45:47 am
What are the exact steps to reproduce the problem?
Title: Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
Post by: Jenna on July 08, 2013, 10:52:03 am
What are the exact steps to reproduce the problem?

I just tested it on windows with 12.11 and it happens here also.
Title: Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
Post by: stahta01 on July 08, 2013, 10:38:36 pm
What are the exact steps to reproduce the problem?
  • Go to "Plugins -> Manage plugins" and disable the debugger plugin.
  • Keep C::B open and reenable the plugin, it does not matter, whether the plugin-manager dialog is closed or not.
  • Click on the "Debug"-menu and C::B crashes.

I just tested it on windows with 12.11 and it happens here also.

It does NOT happen for me; This is with just the Compiler and Debugger plug-ins activated on CB startup.
FYI: There was 3 or 4 plugins when activated cause CB to crash when other plugins are enabled/disabled.
I found this out about a year ago, I think I posted on it. I thought the issue was fixed.

Windows 7 32-bit testing CB 12.11.

Tim S.
Title: Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
Post by: oBFusCATed on July 08, 2013, 11:14:48 pm
I've reproduced it and I'm fixing it right now.