Author Topic: C::B crashing on start (Ubuntu 13.04 & Mint 15)  (Read 36586 times)

Offline Turbine

  • Single posting newcomer
  • *
  • Posts: 6
C::B crashing on start (Ubuntu 13.04 & Mint 15)
« 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.



Thanks, Turbine.
« Last Edit: July 03, 2013, 02:36:29 pm by Turbine »

ToApolytoXaos

  • Guest
Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
« Reply #1 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

P.S.: Personal issues have nothing to do with this project and you should avoid sharing such silly things in public.

Offline Turbine

  • Single posting newcomer
  • *
  • Posts: 6
Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
« Reply #2 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.
« Last Edit: July 03, 2013, 02:28:24 pm by Turbine »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
« Reply #3 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?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
« Reply #4 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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

ToApolytoXaos

  • Guest
Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
« Reply #5 on: July 03, 2013, 04:32:03 pm »
OK. You know better. Who's trolling btw?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
« Reply #6 on: July 03, 2013, 04:45:20 pm »
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

ToApolytoXaos

  • Guest
Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
« Reply #7 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.

Offline Turbine

  • Single posting newcomer
  • *
  • Posts: 6
Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
« Reply #8 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.
« Last Edit: July 03, 2013, 11:23:31 pm by Turbine »

Offline Turbine

  • Single posting newcomer
  • *
  • Posts: 6
Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
« Reply #9 on: July 03, 2013, 11:37:14 pm »
Can we please get back on topic.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
« Reply #10 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

Offline Turbine

  • Single posting newcomer
  • *
  • Posts: 6
Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
« Reply #11 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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
« Reply #12 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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
« Reply #13 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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
« Reply #14 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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
« Reply #15 on: July 04, 2013, 02:10:46 pm »
It might also be a wxWidgets bug.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
« Reply #16 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;
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
« Reply #17 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. :-* :-* :-*

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
« Reply #18 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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
« Reply #19 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.
« Last Edit: July 08, 2013, 07:08:25 am by jens »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
« Reply #20 on: July 08, 2013, 10:45:47 am »
What are the exact steps to reproduce the problem?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
« Reply #21 on: July 08, 2013, 10:52:03 am »
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.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
« Reply #22 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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: C::B crashing on start (Ubuntu 13.04 & Mint 15)
« Reply #23 on: July 08, 2013, 11:14:48 pm »
I've reproduced it and I'm fixing it right now.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]