Alright, in my application I have a "settings" class, with various public functions which return or set the data requested/specified. However, this line of code returns a segfault:

Qt Code:
  1. QString settings::getSomeInfo() {
  2. return internalAppSettings->value("main/info", "default").toString();
  3. }
To copy to clipboard, switch view to plain text mode 

Note that this file's header is included in my Main Window class, which in turn is included in main.cpp. Also, in main.cpp, I used QCoreApplication::setOrganizationName(), QCoreApplication::setApplicationName(), and QCoreApplication::setOrganizationDomain() so that I don't need to do it many times whenever I have to declare QSettings.

This is the output from GDB, the debugger:

Qt Code:
  1. Program received signal SIGSEGV, Segmentation fault.
  2. [Switching to Thread -1225369392 (LWP 17790)]
  3. 0x08063322 in settings::getSomeInfo (this=0x0) at src/settings.cpp:104
  4. Use the -dograb option to enforce grabbing.
  5. Scope for 104:
  6. Symbol this is a variable with complex or multiple locations (DWARF2), length 4.
  7. (gdb)
  8. Program terminated with signal SIGSEGV, Segmentation fault.
  9. The program no longer exists.
To copy to clipboard, switch view to plain text mode 

Thanks in advance ~codeslicer