Author Topic: Kubuntu - C::B 8477 crash on Workspace load  (Read 14310 times)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Kubuntu - C::B 8477 crash on Workspace load
« Reply #15 on: October 29, 2012, 11:25:50 pm »
I would probably use something like:
Code
A *a=func();
shared_ptr<B> p(a ? a->makeB() : nullptr);
if (p)
   ...

Another option is:
Code
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!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Kubuntu - C::B 8477 crash on Workspace load
« Reply #16 on: October 30, 2012, 05:44:11 am »
Code
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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline cacb

  • Lives here!
  • ****
  • Posts: 536
Re: Kubuntu - C::B 8477 crash on Workspace load
« Reply #17 on: October 30, 2012, 07:48:02 pm »
Nice work, it is much appreciated!  :D

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Kubuntu - C::B 8477 crash on Workspace load
« Reply #18 on: November 01, 2012, 08:47:38 pm »
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!]

Offline cacb

  • Lives here!
  • ****
  • Posts: 536
Re: Kubuntu - C::B 8477 crash on Workspace load
« Reply #19 on: November 03, 2012, 01:58:39 pm »
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.  :)