[Lazarus] Thread debugging problem

Leonardo M. Ramé l.rame at griensu.com
Wed Sep 28 16:13:16 CEST 2011


On 2011-09-28 11:04:20 -0300, Leonardo M. Ramé wrote:
> Hi, since updating my Lazarus version from svn (I was using a one month
> old version) I'm getting a SIGABRT exception in a thread.
> 
> The exception apparently is raised while adding items to a TCollection
> that is created in the main thread, then passed as parameter to the
> newly created thread. If I comment the line "mycollection.add" the error
> disapears.
> 
> This is the lazarus log I get when running from command line, hope it
> helps find the problem:
> 
> TMainIDE.DoInitProjectRun ProgramFilename=/home/leonardo/Desarrollo/griensu/GViewerIII/dicomviewer
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> TDebugger.ReqCmd Command not supported: Environment ClassName=TGDBMIDebugger
> [TCmdLineDebugger] Debug PID: 16190
> TGDBMIDebugger.ProcessResult Error: ,msg="No symbol table is loaded.  Use the \"file\" command."
> [Debugger] Running GDB version: Ubuntu/Linaro 7.2-1ubuntu11
> [TDebugger.SetFileName] "/home/leonardo/Desarrollo/griensu/GViewerIII/dicomviewer"
> [TMainIDE.DoRunProject] B TGDBMIDebugger
> [TMainIDE.DoRunProject] END
> TGDBMIDebugger.StartDebugging WorkingDir="/home/leonardo/Desarrollo/griensu/GViewerIII/"
> TGDBMIDebugger.ProcessResult Error: ,msg="No symbol \"FPC_THREADVAR_RELOCATE_PROC\" in current context."
> [Debugger] Log output: &"info functions FPC_CPUINIT\n"
> [Debugger] Log output: &"set width 50000\n"
> [Debugger] Log output: &"set inferior-tty /dev/pts/2\n"
> [Debugger] Log output: &"info address main\n"
> [Debugger] Log output: &"ptype TObject\n"
> [Debugger] Log output: &"ptype Exception\n"
> [Debugger] Log output: &"ptype Shortstring\n"
> [Debugger] Log output: &"ptype pointer\n"
> [Debugger] Log output: &"ptype byte\n"
> [Debugger] Log output: &"info address FPC_RAISEEXCEPTION\n"
> [Debugger] Log output: &"info address FPC_BREAK_ERROR\n"
> [Debugger] Log output: &"info address FPC_RUNERROR\n"
> [Debugger] Log output: &"info file\n"
> [Debugger] File type: 
> [Debugger] Entry point: 
> [WARNING] [Debugger.TargetInfo] Unknown FileType: , using GDB cpu
> [Debugger] Log output: &"Funci\303\263n \302\253foo\302\273 no definida.\n"
> [Debugger] Console output: ~"[Depuraci\303\263n de hilo usando libthread_db enabled]\n"
> [Debugger] Log output: &"info program\n"
> [Debugger] Target PID: 16192
> [Debugger] Log output: &"info line \"/home/leonardo/Desarrollo/griensu/GViewerIII/images.pas\":612\n"
> [Debugger] Console output: ~"[Nuevo Thread 0x7fffef0bd700 (LWP 16195)]\n"
> [DBGTGT] *
> [DBGTGT] running,thread-id="all"
> [Debugger] Console output: ~"[Nuevo Thread 0x7fffee8bc700 (LWP 16196)]\n"
> [DBGTGT] *
> [DBGTGT] running,thread-id="all"
> [Debugger] Console output: ~"[Nuevo Thread 0x7fffecd9a700 (LWP 16197)]\n"
> [DBGTGT] *
> [DBGTGT] running,thread-id="all"
> [Debugger] Console output: ~"[Cambiando a Thread 0x7fffecd9a700 (LWP 16197)]\n"
> [WARNING] Debugger: Unexpected async-record: =thread-selected,id="4"
> 

Sorry, I found the solution. It was related to instantiating a
TBGRABitmap before the main form is shown.

-- 
Leonardo M. Ramé
http://leonardorame.blogspot.com




More information about the Lazarus mailing list