News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Kubuntu - C::B 8477 crash on Workspace load

Started by cacb, October 28, 2012, 09:01:06 PM

Previous topic - Next topic

oBFusCATed

I would probably use something like:

A *a=func();
shared_ptr<B> p(a ? a->makeB() : nullptr);
if (p)
   ...


Another option is:

shared_ptr<B> p(nullptr);
A *a=func();
if (a)
    p=shared_ptr<B>(a->makeB());
if (p)
(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!]

MortenMacFly

Quote from: oBFusCATed on October 29, 2012, 11:25:50 PM

A *a=func();
shared_ptr<B> p(a ? a->makeB() : nullptr);
if (p)
   ...

This looks like I did it, except that I used 0 and not nullptr, right? Then ti should be OK to commit to resolve the crash.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

cacb


oBFusCATed

Morten: yes, if it compiles and fixes the crash :)
(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!]

cacb

I have now upgraded to the latest C::B 8500 nightly under Kubuntu and can confirm that the crash problem is gone, also with CodeCompletion plugin enabled.

Thanks, guys.  :)