Segmentation fault on vectors.

  • (4 Pages)
  • +
  • « First
  • 2
  • 3
  • 4

53 Replies - 1161 Views - Last Post: 11 July 2019 - 02:24 PM Rate Topic: -----

#46 Xrey274   User is offline

  • D.I.C Regular

Reputation: 0
  • View blog
  • Posts: 282
  • Joined: 10-December 16

Re: Segmentation fault on vectors.

Posted 11 July 2019 - 03:45 AM

Ok I have found out the reason for my problem(at least when compiling from terminal) when using g++ to compile I forgot to add -c, but no idea why code blocks was failing.

Update: Seems to have fixed it for code_blocks as well?

Ok code_blocks seems to alternating between crashing and compiling successfully? I am just happy that it works for terminal.
Was This Post Helpful? 0
  • +
  • -

#47 Skydiver   User is online

  • Code herder
  • member icon

Reputation: 6966
  • View blog
  • Posts: 23,676
  • Joined: 05-May 12

Re: Segmentation fault on vectors.

Posted 11 July 2019 - 03:48 AM

do you have a SSD or a hard drive? If the latter, time to check the SMART stats to see if it is starting to fail.
Was This Post Helpful? 0
  • +
  • -

#48 Xrey274   User is offline

  • D.I.C Regular

Reputation: 0
  • View blog
  • Posts: 282
  • Joined: 10-December 16

Re: Segmentation fault on vectors.

Posted 11 July 2019 - 06:48 AM

SSD for OS, HDD for storage.
Was This Post Helpful? 0
  • +
  • -

#49 Xrey274   User is offline

  • D.I.C Regular

Reputation: 0
  • View blog
  • Posts: 282
  • Joined: 10-December 16

Re: Segmentation fault on vectors.

Posted 11 July 2019 - 06:53 AM

Both drives pass the SMART test.
Was This Post Helpful? 0
  • +
  • -

#50 Skydiver   User is online

  • Code herder
  • member icon

Reputation: 6966
  • View blog
  • Posts: 23,676
  • Joined: 05-May 12

Re: Segmentation fault on vectors.

Posted 11 July 2019 - 07:45 AM

Well, there went that theory. I was getting that hanging on one of my older machines. It took me a running the SMART diagnostics to figure out that I'd run out of movable blocks.

This is really sounding like a Code::Blocks issue as it tries to monitor the progress that the compiler is making. The next time Code::Blocks hangs, perhaps run `ps`. See if the compiler is even still running, or if it's actually completed it's work.

Time to move to another IDE?
Was This Post Helpful? 0
  • +
  • -

#51 Xrey274   User is offline

  • D.I.C Regular

Reputation: 0
  • View blog
  • Posts: 282
  • Joined: 10-December 16

Re: Segmentation fault on vectors.

Posted 11 July 2019 - 11:09 AM

I downloaded Code::Blocks for the purposes of debugging(i find the graphical way of debugging faster and more efficient than terminal), but for anything else I use Sublime.
Was This Post Helpful? 0
  • +
  • -

#52 Skydiver   User is online

  • Code herder
  • member icon

Reputation: 6966
  • View blog
  • Posts: 23,676
  • Joined: 05-May 12

Re: Segmentation fault on vectors.

Posted 11 July 2019 - 11:20 AM

For about 14 of my 17 years at Microsoft, I was using a mix of Source Insight and CodeWright for reading/ writing code and building, and only firing up WinDbg or Visual Studio for any serious debugging. Most of the time, the unit tests and logging I builtin was enough to help me determine what is wrong so that I didn't even have to fire up a debugger.
Was This Post Helpful? 0
  • +
  • -

#53 Xrey274   User is offline

  • D.I.C Regular

Reputation: 0
  • View blog
  • Posts: 282
  • Joined: 10-December 16

Re: Segmentation fault on vectors.

Posted 11 July 2019 - 01:36 PM

Isn't CodeWright like an ancient program?
Was This Post Helpful? 0
  • +
  • -

#54 Skydiver   User is online

  • Code herder
  • member icon

Reputation: 6966
  • View blog
  • Posts: 23,676
  • Joined: 05-May 12

Re: Segmentation fault on vectors.

Posted 11 July 2019 - 02:24 PM

Yup. Old timer here.
Was This Post Helpful? 0
  • +
  • -

  • (4 Pages)
  • +
  • « First
  • 2
  • 3
  • 4