User forums > Using Code::Blocks

[SOLVED]Maya crashes when I attach CB debugger to it and press 'Debug/Continue'

<< < (2/3) > >>

yaoyansi:
Here is the generated project script.

--- Code: --------------------------mystring.cbp--------------------
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
   <FileVersion major="1" minor="6" />
   <Project>
      <Option title="mystring" />
      <Option makefile_is_custom="1" />
      <Option compiler="gcc" />
      <Option virtualFolders="CMake Files\;CMake Files\build\;CMake Files\build\cmake\;CMake Files\build\cmake\Modules\;CMake Files\src\;" />
      <Build>
      <Target title="all">
         <Option working_dir="/j/HOME/yys/dev/mybox_build/mystring12" />
         <Option type="4" />
         <MakeCommands>
            <Build command="/usr/bin/gmake -f &quot;/j/HOME/yys/dev/mybox_build/mystring12/Makefile&quot;  VERBOSE=1 all" />
            <CompileFile command="/usr/bin/gmake -f &quot;/j/HOME/yys/dev/mybox_build/mystring12/Makefile&quot;  VERBOSE=1 &quot;$file&quot;" />
            <Clean command="/usr/bin/gmake -f &quot;/j/HOME/yys/dev/mybox_build/mystring12/Makefile&quot;  VERBOSE=1 clean" />
            <DistClean command="/usr/bin/gmake -f &quot;/j/HOME/yys/dev/mybox_build/mystring12/Makefile&quot;  VERBOSE=1 clean" />
         </MakeCommands>
      </Target>
      <Target title="edit_cache">
         <Option working_dir="/j/HOME/yys/dev/mybox_build/mystring12" />
         <Option type="4" />
         <MakeCommands>
            <Build command="/usr/bin/gmake -f &quot;/j/HOME/yys/dev/mybox_build/mystring12/Makefile&quot;  VERBOSE=1 edit_cache" />
            <CompileFile command="/usr/bin/gmake -f &quot;/j/HOME/yys/dev/mybox_build/mystring12/Makefile&quot;  VERBOSE=1 &quot;$file&quot;" />
            <Clean command="/usr/bin/gmake -f &quot;/j/HOME/yys/dev/mybox_build/mystring12/Makefile&quot;  VERBOSE=1 clean" />
            <DistClean command="/usr/bin/gmake -f &quot;/j/HOME/yys/dev/mybox_build/mystring12/Makefile&quot;  VERBOSE=1 clean" />
         </MakeCommands>
      </Target>
      <Target title="rebuild_cache">
         <Option working_dir="/j/HOME/yys/dev/mybox_build/mystring12" />
         <Option type="4" />
         <MakeCommands>
            <Build command="/usr/bin/gmake -f &quot;/j/HOME/yys/dev/mybox_build/mystring12/Makefile&quot;  VERBOSE=1 rebuild_cache" />
            <CompileFile command="/usr/bin/gmake -f &quot;/j/HOME/yys/dev/mybox_build/mystring12/Makefile&quot;  VERBOSE=1 &quot;$file&quot;" />
            <Clean command="/usr/bin/gmake -f &quot;/j/HOME/yys/dev/mybox_build/mystring12/Makefile&quot;  VERBOSE=1 clean" />
            <DistClean command="/usr/bin/gmake -f &quot;/j/HOME/yys/dev/mybox_build/mystring12/Makefile&quot;  VERBOSE=1 clean" />
         </MakeCommands>
      </Target>
      <Target title="mystring">
         <Option output="/j/HOME/yys/dev/mybox/mystring/plug-ins/mystring.so" prefix_auto="0" extension_auto="0" />
         <Option working_dir="/j/HOME/yys/dev/mybox_build/mystring12/src" />
         <Option object_output="./" />
         <Option type="3" />
         <Option compiler="gcc" />
         <Compiler>
            <Add option="-DREQUIRE_IOSTREAM" />
            <Add option="-D_BOOL" />
            <Add option="-DLINUX" />
            <Add option="-D_LINUX" />
            <Add option="-DLINUX_64" />
            <Add directory="/usr/autodesk/maya/include" />
            <Add directory="/usr/include" />
            <Add directory="/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7" />
            <Add directory="/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/backward" />
            <Add directory="/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/x86_64-redhat-linux" />
            <Add directory="/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include" />
            <Add directory="/usr/local/include" />
         </Compiler>
         <MakeCommands>
            <Build command="/usr/bin/gmake -f &quot;/j/HOME/yys/dev/mybox_build/mystring12/src/Makefile&quot;  VERBOSE=1 mystring" />
            <CompileFile command="/usr/bin/gmake -f &quot;/j/HOME/yys/dev/mybox_build/mystring12/src/Makefile&quot;  VERBOSE=1 &quot;$file&quot;" />
            <Clean command="/usr/bin/gmake -f &quot;/j/HOME/yys/dev/mybox_build/mystring12/src/Makefile&quot;  VERBOSE=1 clean" />
            <DistClean command="/usr/bin/gmake -f &quot;/j/HOME/yys/dev/mybox_build/mystring12/src/Makefile&quot;  VERBOSE=1 clean" />
         </MakeCommands>
      </Target>
      <Target title="mystring/fast">
         <Option output="/j/HOME/yys/dev/mybox/mystring/plug-ins/mystring.so" prefix_auto="0" extension_auto="0" />
         <Option working_dir="/j/HOME/yys/dev/mybox_build/mystring12/src" />
         <Option object_output="./" />
         <Option type="3" />
         <Option compiler="gcc" />
         <Compiler>
            <Add option="-DREQUIRE_IOSTREAM" />
            <Add option="-D_BOOL" />
            <Add option="-DLINUX" />
            <Add option="-D_LINUX" />
            <Add option="-DLINUX_64" />
            <Add directory="/usr/autodesk/maya/include" />
            <Add directory="/usr/include" />
            <Add directory="/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7" />
            <Add directory="/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/backward" />
            <Add directory="/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/x86_64-redhat-linux" />
            <Add directory="/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include" />
            <Add directory="/usr/local/include" />
         </Compiler>
         <MakeCommands>
            <Build command="/usr/bin/gmake -f &quot;/j/HOME/yys/dev/mybox_build/mystring12/src/Makefile&quot;  VERBOSE=1 mystring/fast" />
            <CompileFile command="/usr/bin/gmake -f &quot;/j/HOME/yys/dev/mybox_build/mystring12/src/Makefile&quot;  VERBOSE=1 &quot;$file&quot;" />
            <Clean command="/usr/bin/gmake -f &quot;/j/HOME/yys/dev/mybox_build/mystring12/src/Makefile&quot;  VERBOSE=1 clean" />
            <DistClean command="/usr/bin/gmake -f &quot;/j/HOME/yys/dev/mybox_build/mystring12/src/Makefile&quot;  VERBOSE=1 clean" />
         </MakeCommands>
      </Target>
      </Build>
      <Unit filename="/j/HOME/yys/dev/mybox/mystring/src/main.cpp">
      </Unit>
      <Unit filename="/j/HOME/yys/dev/mybox/mystring/src/mystring.cpp">
      </Unit>
      <Unit filename="/j/HOME/yys/dev/mybox/mystring/src/plugin.cpp">
      </Unit>
      <Unit filename="/j/HOME/yys/dev/mybox/mystring/src/mystring.h">
      </Unit>
      <Unit filename="/j/HOME/yys/dev/mybox/mystring/CMakeLists.txt">
          <Option virtualFolder="CMake Files\" />
      </Unit>
      <Unit filename="/j/HOME/yys/dev/mybox/mystring/build/cmake/Modules/FindMaya.cmake">
          <Option virtualFolder="CMake Files\build\cmake\Modules\" />
      </Unit>
      <Unit filename="/j/HOME/yys/dev/mybox/mystring/src/CMakeLists.txt">
          <Option virtualFolder="CMake Files\src\" />
      </Unit>
   </Project>
</CodeBlocks_project_file>
-------------------------------------------------------
--- End code ---

yaoyansi:
- launch codeblocks and open my project.

--- Code: -------------------------log-------------------------------
$  codeblocks
Starting Code::Blocks svn build  rev 10074 Jan 21 2015, 18:58:42 - wx2.8.12 (Linux, unicode) - 64 bit
Initialize EditColourSet .....
Initialize EditColourSet: done.
Loading menubar...
BYOGames: loaded
Valgrind: loaded
RegExTestbed: loaded
cbKeyBinder: loaded
CodeCompletion: loaded
FileManager: loaded
EnvVars: loaded
ProjectOptionsManipulator: loaded
cbDragScroll: loaded
wxSmithContribItems: loaded
SmartIndentLua: loaded
HexEditor: loaded
ClassWizard: loaded
DoxyBlocks: loaded
lib_finder: loaded
wxSmithAui: loaded
ToDoList: loaded
SmartIndentCpp: loaded
FilesExtensionHandler: loaded
CodeSnippets: loaded
EditorConfig: loaded
ThreadSearch: loaded
ToolsPlus: loaded
Debugger: loaded
OpenFilesList: loaded
SmartIndentPython: loaded
Autosave: loaded
Cccc: loaded
copystrings: loaded
SpellChecker: loaded
Exporter: loaded
IncrementalSearch: loaded
SmartIndentHDL: loaded
SmartIndentFortran: loaded
AStylePlugin: loaded
Profiler: loaded
NassiShneidermanPlugin: loaded
HeaderFixup: loaded
BrowseTracker: loaded
Abbreviations: loaded
CB_Koders: loaded
SmartIndentXML: loaded
ProjectsImporter: loaded
SmartIndentPascal: loaded
CodeStat: loaded
SymTab: loaded
ScriptedWizard: loaded
Cscope: loaded
HelpPlugin: loaded
EditorTweaks: loaded
MouseSap: loaded
wxSmith: loaded
wxSmithMime: loaded
OccurrencesHighlighting: loaded
CppCheck: loaded
Compiler: loaded
AutoVersioning: loaded
ReopenEditor: loaded
BYO Games plugin activated
Valgrind plugin activated
Regular expressions testbed plugin activated
Keyboard shortcuts plugin activated
Code completion plugin activated
FileManager plugin activated
Environment variables plugin activated
Project options manipulator plugin activated
DragScroll plugin activated
wxSmith - Contrib Items plugin activated
SmartIndentLua plugin activated
HexEditor plugin activated
Class wizard plugin activated
DoxyBlocks plugin activated
ClassBrowser::UpdateClassBrowserView(): No active project available.
ClassBrowser::OnThreadEvent(): Updating class browser...
ClassBrowser::OnThreadEvent(): Class browser updated.
Library finder plugin activated
wxSmith - Aui plugin activated
Todo List plugin activated
SmartIndentCpp plugin activated
Files extension handler plugin activated
Code snippets plugin activated
EditorConfig plugin for Code::Blocks plugin activated
ThreadSearch plugin activated
ToolsPlus plugin activated
Debugger plugin activated
Open files list plugin activated
SmartIndentPython plugin activated
Autosave plugin activated
Cccc plugin activated
Copy Strings to clipboard plugin activated
SpellChecker plugin activated
Source Exporter plugin activated
IncrementalSearch plugin activated
SmartIndentHDL plugin activated
SmartIndentFortran plugin activated
Source code formatter (AStyle) plugin activated
Code profiler plugin activated
NassiShneidermanPlugin plugin activated
Header Fixup plugin activated
BrowseTracker plugin activated
Abbreviations plugin activated
Koders query plugin activated
SmartIndentXML plugin activated
Foreign projects importer plugin activated
SmartIndentPascal plugin activated
Code statistics plugin activated
Symbol Table Plugin plugin activated
Project wizard added for 'Empty project'
Project wizard added for 'Fortran application'
Project wizard added for 'Fortran library'
Project wizard added for 'Fortran DLL'
Project wizard added for 'Console application'
Project wizard added for 'D application'
Project wizard added for 'FLTK project'
Project wizard added for 'GLFW project'
Project wizard added for 'GLUT project'
Project wizard added for 'GTK+ project'
Project wizard added for 'Irrlicht project'
Project wizard added for 'Lightfeather project'
Project wizard added for 'Matlab project'
Project wizard added for 'OpenCV project'
Project wizard added for 'OpenGL project'
Project wizard added for 'Ogre project'
Project wizard added for 'Code::Blocks plugin'
Project wizard added for 'QT4 project'
Project wizard added for 'SDL project'
Project wizard added for 'SFML project'
Project wizard added for 'Static library'
Project wizard added for 'Shared library'
Project wizard added for 'wxWidgets project'
Build-target wizard added for 'Console'
Build-target wizard added for 'Static library'
Build-target wizard added for 'wxWidgets'
Project wizard added for 'ARM Project'
Project wizard added for 'AVR Project'
Project wizard added for 'TriCore Project'
Project wizard added for 'PowerPC Project'
Project wizard added for 'MCS51 Project'
File(s) wizard added for 'Empty file'
File(s) wizard added for 'C/C++ source'
File(s) wizard added for 'C/C++ header'
File(s) wizard added for 'Fortran source'
Scripted wizard plugin activated
Cscope plugin activated
Help plugin plugin activated
Editor Tweaks plugin: Building menu
Editor Tweaks plugin: making the menu 14
EditorTweaks plugin activated
MouseSap plugin activated
wxSmith plugin activated
wxSmith - MIME plugin plugin activated
OccurrencesHighlighting plugin activated
CppCheck plugin activated
Added compiler "GNU GCC Compiler"
Added compiler "Intel C/C++ Compiler"
Added compiler "GDC D Compiler"
Added compiler "GNU Fortran Compiler"
Added compiler "G95 Fortran Compiler"
Added compiler "GNU GCC Compiler for ARM"
Added compiler "PGI Fortran Compiler"
Added compiler "GNU GCC Compiler for LM8"
Added compiler "GNU GCC Compiler for LM32"
Added compiler "Tiny C Compiler"
Added compiler "Digital Mars D Compiler"
Added compiler "Small Device C Compiler"
Added compiler "GNU GCC Compiler for AVR"
Added compiler "GNU GCC Compiler for TriCore"
Added compiler "LLVM D Compiler"
Added compiler "LLVM Clang Compiler"
Added compiler "GNU GCC Compiler for ZPU"
Added compiler "GNU GCC Compiler for MSP430"
Added compiler "GNU GCC Compiler for PowerPC"
Added compiler "*No Compiler*"
Compiler plugin activated
AutoVersioning plugin activated
ReopenEditor plugin activated
Loading toolbar...
Initializing plugins...
Loading project file...
Parsing project file...
Loading target all
Loading target edit_cache
Loading target rebuild_cache
Loading target mystring
Loading target mystring/fast
Loading project files...
7 files loaded
Done loading project in 8ms
Project's base path: /mnt/sg_home/yys/dev/mybox_build/mystring12/
Project's common toplevel path: /
NativeParser::GetGCCCompilerDirs(): Caching GCC default include dir: /usr/include/c++/4.4.7
NativeParser::GetGCCCompilerDirs(): Caching GCC default include dir: /usr/include/c++/4.4.7/x86_64-redhat-linux
NativeParser::GetGCCCompilerDirs(): Caching GCC default include dir: /usr/include/c++/4.4.7/backward
NativeParser::GetGCCCompilerDirs(): Caching GCC default include dir: /usr/local/include
NativeParser::GetGCCCompilerDirs(): Caching GCC default include dir: /usr/lib/gcc/x86_64-redhat-linux/4.4.7/include
NativeParser::GetGCCCompilerDirs(): Caching GCC default include dir: /usr/include
NativeParser::DoFullParsing(): AddCompilerPredefinedMacros failed!
NativeParser::DoFullParsing(): AddProjectDefinedMacros failed!
NativeParser::DoFullParsing(): Adding cpp/c files to batch-parser
NativeParser::DoFullParsing(): Added 3 source file(s) for project 'mystring' to batch-parser...
ClassBrowser::UpdateClassBrowserView(): No active project available.
NativeParser::CreateParser(): Finish creating a new parser for project 'mystring'
ClassBrowser::OnThreadEvent(): Updating class browser...
ClassBrowser::OnThreadEvent(): Class browser updated.
NativeParser::OnParserStart(): Starting batch parsing for project 'mystring'...
ReadClsNames() : Unexpected token '((__aligned__))' for 'struct60___pthread_unwind_buf_t', file '/usr/include/pthread.h', line 515.
NativeParser::OnParserEnd(): Project 'mystring' parsing stage done!
Project 'mystring' parsing stage done (102 total parsed files, 4199 tokens in 0 minute(s), 0.269 seconds).
ClassBrowser::OnThreadEvent(): Updating class browser...
ClassBrowser::OnThreadEvent(): Class browser updated.
-----------------------------------------------------
--- End code ---


- It works well if I double click a .h file in Codeblocks, here is the log

--- Code: ----------------------------log----------------------------
Mozilla universal detection engine detected 'Pure *ASCII*'.
Final encoding detected: Unicode 8 bit (UTF-8) (ID: 41)
Editor Open
NativeParser::GetAllPathsByFilename(): Traversing '/mnt/sg_home/yys/dev/mybox/mystring/src' for: mystring.*
NativeParser::GetAllPathsByFilename(): Found 2 files:
- /mnt/sg_home/yys/dev/mybox/mystring/src/mystring.cpp
- /mnt/sg_home/yys/dev/mybox/mystring/src/mystring.h
ClassBrowser::OnThreadEvent(): Updating class browser...
ClassBrowser::OnThreadEvent(): Class browser updated.
-----------------------------------------------------
--- End code ---


- But codeblocks is blocked if I double click a .cpp file in Codeblocks. I don't know why, and I have to kill the codeblock precess by force. here is the log.

--- Code: ----------------------------log----------------------------
Mozilla universal detection engine detected 'Pure *ASCII*'.
Final encoding detected: Unicode 8 bit (UTF-8) (ID: 41)
Editor Open
Killed
-----------------------------------------------------
--- End code ---


I'm going to set breakpoints in my *.cpp files but I can't open the .cpp file in CodeBlocks at all. Could you give me any clue to solve this problem?


BTW
Finally, I find a temp solution to walk around this problem. The solution is to modify all of the absolute source file paths to relative file paths in the generated *.cbp file manually, here is the step:
For example, modify:

--- Code: ---<Unit filename="/j/HOME/yys/dev/mybox/mystring/src/main.cpp"></Unit>
<Unit filename="/j/HOME/yys/dev/mybox/mystring/src/mystring.cpp"></Unit>
<Unit filename="/j/HOME/yys/dev/mybox/mystring/src/plugin.cpp"></Unit>
<Unit filename="/j/HOME/yys/dev/mybox/mystring/src/mystring.h"></Unit>
<Unit filename="/j/HOME/yys/dev/mybox/mystring/CMakeLists.txt">
     <Option virtualFolder="CMake Files\" />
</Unit>
<Unit filename="/j/HOME/yys/dev/mybox/mystring/build/cmake/Modules/FindMaya.cmake">
     <Option virtualFolder="CMake Files\build\cmake\Modules\" />
</Unit>
<Unit filename="/j/HOME/yys/dev/mybox/mystring/src/CMakeLists.txt">
     <Option virtualFolder="CMake Files\src\" />
</Unit>

--- End code ---
to:

--- Code: ---<Unit filename="../../mybox/mystring/CMakeLists.txt">
<Option virtualFolder="CMake Files/../../../../../../j/HOME/yys/dev/mybox/mystring/" /></Unit>
<Unit filename="../../mybox/mystring/build/cmake/Modules/FindMaya.cmake">
<Option virtualFolder="CMake Files/../../../../../../j/HOME/yys/dev/mybox/mystring/build/cmake/Modules/" /></Unit>
<Unit filename="../../mybox/mystring/src/CMakeLists.txt">
<Option virtualFolder="CMake Files/../../../../../../j/HOME/yys/dev/mybox/mystring/src/" /></Unit>
<Unit filename="../../mybox/mystring/src/main.cpp" />
<Unit filename="../../mybox/mystring/src/mystring.cpp" />
<Unit filename="../../mybox/mystring/src/mystring.h" />
<Unit filename="../../mybox/mystring/src/plugin.cpp" />

--- End code ---

- Codeblocks is not blocked anymore if I double click a .cpp file in Codeblocks. here is the log

--- Code: -------------------------log-------------------------------------------
Mozilla universal detection engine detected 'Pure *ASCII*'.
Final encoding detected: Unicode 8 bit (UTF-8) (ID: 41)
Editor Open
NativeParser::GetAllPathsByFilename(): Traversing '/mnt/sg_home/yys/dev/mybox/mystring/src' for: main.*
NativeParser::GetAllPathsByFilename(): Traversing ' - /mnt/sg_home/yys/dev/' for: main.*
NativeParser::GetAllPathsByFilename(): Found 1 files:
- /mnt/sg_home/yys/dev/mybox/mystring/src/main.cpp
ClassBrowser::OnThreadEvent(): Updating class browser...
ClassBrowser::OnThreadEvent(): Class browser updated.
-----------------------------------------------------------------
--- End code ---

But I'm not satisfied with this temp solution at all, because I have to change the generated *.cbp file. So I still need your help to solve my problem.


Regards

ollydbg:
@yaoyansi
If the logs are too long, you can save to a txt file and attach to the post.

yaoyansi:
It seems that I have the same problem which is mentioned in these two posts:
http://forums.codeblocks.org/index.php/topic,19469.0.html
http://forums.codeblocks.org/index.php/topic,18474.0.html

My home directory /j/HOME(it equals to/mnt/sg_home/) has 396 sub-directories.





oBFusCATed:
Things to try:
1. Disable the code completion plugin
2. Install a night build. Jens provide binaries for centos 6, so you should be fine finding one in his repos.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version