robotframework / mabot

Automatically exported from code.google.com/p/robotframework-mabot
Other
12 stars 11 forks source link

Mabot causing seg fault on Mac OS X #50

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Mac OS X 10.6.2 (Snow Leopard)
python --version
Python 2.6.1
jython --version
Jython 2.5.1
pybot --version
Robot Framework 2.1.3 (Python 2.6.1 on darwin)
jybot --version
Robot Framework 2.1.3 (Jython 2.5.1 on java1.6.0_17)
rebot --version
Rebot 2.1.3 (Python 2.6.1 on darwin)
mabot.py --version
Mabot 0.6.1

I tried starting MaBot several different ways and they all resulted in the
following segfault
mabot.py &
mabot.py simple.html &
mabot.py . &

The following commands do work without the segfault
mabot.py --version
mabot.py --help

Here is a snippet of the segfault that was reported.
-------------------
Process:         Python [5484]
Path:           
/System/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Co
ntents/MacOS/Python
Identifier:      org.python.python.app
Version:         2.6 (2.6)
Build Info:      python-440000~1
Code Type:       X86 (Native)
Parent Process:  bash [5428]

Date/Time:       2010-03-18 07:28:25.485 -0700
OS Version:      Mac OS X 10.6.2 (10C540)
Report Version:  6

Interval Since Last Report:          62763 sec
Crashes Since Last Report:           2
Per-App Interval Since Last Report:  41099 sec
Per-App Crashes Since Last Report:   2
Anonymous UUID:                      29369D91-8741-478F-8EBD-E376ED4EAF46

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000065726f46
Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   ???                             0x65726f46 0 + 1701998406
1   com.tcltk.tcllibrary            0x010f14f0 Tcl_FindCommand + 840
2   com.tcltk.tcllibrary            0x010880eb Tcl_GetCommandInfo + 51
3   com.tcltk.tklibrary             0x01226475 TkpGetSubFonts + 5008
4   com.apple.AE                    0x94326f3a aeDispatchAppleEvent(AEDesc
const*, AEDesc*, unsigned long, unsigned char*) + 166
5   com.apple.AE                    0x94326e39
dispatchEventAndSendReply(AEDesc const*, AEDesc*) + 43
6   com.apple.AE                    0x94326d46 aeProcessAppleEvent + 197
7   com.apple.HIToolbox             0x93bbf2a1 AEProcessAppleEvent + 50
8   com.apple.AppKit                0x904a9d02 _DPSNextEvent + 1420
9   com.apple.AppKit                0x904a9306 -[NSApplication
nextEventMatchingMask:untilDate:inMode:dequeue:] + 156
10  com.tcltk.tklibrary             0x0122ee94 XQueryPointer + 2261
11  com.tcltk.tklibrary             0x0122f3d6 Tk_MacOSXSetupTkNotifier + 1079
12  com.tcltk.tcllibrary            0x010f6a63 Tcl_DoOneEvent + 229
13  com.tcltk.tklibrary             0x01170376 TkGetDisplayOf + 424
14  com.tcltk.tcllibrary            0x01089977 Tcl_CreateInterp + 4919
15  com.tcltk.tcllibrary            0x0108a96c Tcl_EvalObjv + 72
16  _tkinter.so                     0x007da49d Tkapp_CallDeallocArgs + 11750
17  org.python.python               0x0008b372 PyEval_EvalFrameEx + 16375
18  org.python.python               0x0008b4d5 PyEval_EvalFrameEx + 16730
19  org.python.python               0x0008b4d5 PyEval_EvalFrameEx + 16730
20  org.python.python               0x0008b4d5 PyEval_EvalFrameEx + 16730
21  org.python.python               0x0008b4d5 PyEval_EvalFrameEx + 16730
22  org.python.python               0x0008b4d5 PyEval_EvalFrameEx + 16730
23  org.python.python               0x0008cf64 PyEval_EvalCodeEx + 1720
24  org.python.python               0x0002ee2c PyClassMethod_New + 1823
25  org.python.python               0x0000c700 PyObject_Call + 101
26  org.python.python               0x0001c12e PyClass_New + 1603
27  org.python.python               0x0000c700 PyObject_Call + 101
28  org.python.python               0x0008677a PyEval_CallObjectWithKeywords
+ 171
29  org.python.python               0x0001ba58 PyInstance_New + 290
30  org.python.python               0x0000c700 PyObject_Call + 101
31  org.python.python               0x0008c802 PyEval_EvalFrameEx + 21639
32  org.python.python               0x0008b4d5 PyEval_EvalFrameEx + 16730
33  org.python.python               0x0008cf64 PyEval_EvalCodeEx + 1720
34  org.python.python               0x0008d009 PyEval_EvalCode + 87
35  org.python.python               0x000a40bb Py_CompileString + 111
36  org.python.python               0x000a4167 PyRun_FileExFlags + 139
37  org.python.python               0x000a5e8a PyRun_SimpleFileExFlags + 814
38  org.python.python               0x000b3168 Py_Main + 3074
39  org.python.python.app           0x00001eb5 start + 53

Thread 1:  Dispatch queue: com.apple.libdispatch-manager
0   libSystem.B.dylib               0x951c30ea kevent + 10
1   libSystem.B.dylib               0x951c3804 _dispatch_mgr_invoke + 215
2   libSystem.B.dylib               0x951c2cc3 _dispatch_queue_invoke + 163
3   libSystem.B.dylib               0x951c2a68 _dispatch_worker_thread2 + 234
4   libSystem.B.dylib               0x951c24f1 _pthread_wqthread + 390
5   libSystem.B.dylib               0x951c2336 start_wqthread + 30

Thread 2:
0   libSystem.B.dylib               0x951c2182 __workq_kernreturn + 10
1   libSystem.B.dylib               0x951c2718 _pthread_wqthread + 941
2   libSystem.B.dylib               0x951c2336 start_wqthread + 30

Thread 3:
0   libSystem.B.dylib               0x951bb856 select$DARWIN_EXTSN + 10
1   com.tcltk.tcllibrary            0x0112c737 Tcl_InitNotifier + 1643
2   libSystem.B.dylib               0x951c9fbd _pthread_start + 345
3   libSystem.B.dylib               0x951c9e42 thread_start + 34

Thread 0 crashed with X86 Thread State (32-bit):
  eax: 0x00aa2cb4  ebx: 0x010f0af6  ecx: 0x00aa2ca0  edx: 0xbfffc986
  edi: 0xbfffc984  esi: 0x01255172  ebp: 0xbfffca68  esp: 0xbfffc91c
   ss: 0x0000001f  efl: 0x00010206  eip: 0x65726f46   cs: 0x00000017
   ds: 0x0000001f   es: 0x0000001f   fs: 0x00000000   gs: 0x00000037
  cr2: 0x65726f46

Binary Images:
    0x1000 -     0x1ff7  org.python.python.app 2.6 (2.6)
<4D01A378-6EE4-7558-6564-0BC51C06A652>
/System/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Co
ntents/MacOS/Python
    0x5000 -    0xecfef  org.python.python 2.6.1 (2.6.1)
<99F1F7BA-7AFA-6069-4E43-11F97B892F65>
/System/Library/Frameworks/Python.framework/Versions/2.6/Python
  0x1df000 -   0x1e0ff7  cStringIO.so ??? (???)
<7FA5644E-4FA1-60EF-8322-5A15EAC0BED3>
/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynlo
ad/cStringIO.so
  0x1e4000 -   0x1e6ff7  math.so ??? (???)
<0C41AF37-25FD-1EB3-D721-02CCFFC5D9B1>
/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynlo
ad/math.so
  0x1eb000 -   0x1edfe7  binascii.so ??? (???)
<0E5DD6E7-614C-27F6-B1B8-1A2D88D75D97>
/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynlo
ad/binascii.so
  0x1f1000 -   0x1f2ff7  _random.so ??? (???)
<04AE7C48-ED14-5BBA-610B-3B95E115188C> /System/Library/Frameworks/

If there is more information you would like gathered for this, just shout
and I will report/test whatever I can.

Original issue reported on code.google.com by jerry57@gmail.com on 18 Mar 2010 at 2:39

GoogleCodeExporter commented 9 years ago
Based on the segfault information the problem seems to be related to the Tkinter
toolkit used by Mabot. A quick Google search with terms "tkinter osx segfault"
returns several results indicating there are some problem with it on Snow 
Leopard.
Could you jerry57 try searching for more information and see can you find a 
solution?

Original comment by pekka.klarck on 19 Mar 2010 at 8:58

GoogleCodeExporter commented 9 years ago
I have tried looking around to find a solution to the segfault, but no luck 
yet.  If
anyone else spots something they think might work, please let me know and I 
will give
it a try.  Unfortunately I am not a programmer but am willing to try whatever I 
can.

Original comment by jerry57@gmail.com on 23 Mar 2010 at 1:08

GoogleCodeExporter commented 9 years ago
I tried this from my Leopard (10.5.8) desktop and MaBot runs without error.  
Here are
the versions I have installed there.
python --version
Python 2.5.1
pybot --version
Robot Framework 2.1.3 (Python 2.5.1 on darwin)
jython --version
Jython 2.5.1
mabot.py --version
Mabot 0.6.1

I only briefly used it to open one of my existing test suites and click through 
it. 
Will try and do further testing as time permits, but would really love to 
resolve
this issue for Snow Leopard (10.6.2).

Original comment by jerry57@gmail.com on 23 Mar 2010 at 2:30

GoogleCodeExporter commented 9 years ago
It might be that the problem is in disabling Text object. See 
http://stackoverflow.com/questions/2914603/why-do-i-get-a-segmentation-fault-whi
le-redirecting-sys-stdout-to-tkinter-text-wi for more details. We check is this 
the case and if it is easy to fix, we will do it for 0.7 release.

Original comment by jpran...@gmail.com on 28 Jun 2010 at 7:10

GoogleCodeExporter commented 9 years ago
Seems that this is not the case in here. We were able to reproduce the problem. 
We will investigate what is causing the problem before releasing Mabot 0.7. 

Original comment by jpran...@gmail.com on 28 Jun 2010 at 7:49

GoogleCodeExporter commented 9 years ago
The segmentation fault first rises when calling idlelib's 
TreeWidget.TreeNode.update(), which internally uses Tcl/Tk. If I comment this 
call out, I get the segmentation fault again from a different part of the gui, 
but finally it always ends up coming from Tcl/Tk.

If I try run the code through a debugger I dont get the segmentation fault 
anymore. This seems to suggest that the problem is related to threads and 
concurrency problems in Tcl/Tk with Snow Leopard.

Unfortunately I can't now use more time trying to figure this out. For the time 
being we at the core team have to leave this problem open and unsolved. It 
would be great if anyone with a Mac can lend a hand and investigate this 
further.

Original comment by jussi.ao...@gmail.com on 2 Jul 2010 at 12:49

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
What are the chances of converting MaBot to use wx rather than tk?  wx (which 
RIDE uses) does not seem to have the problems that tk is suffering on Mac OS X 
10.6.

Original comment by jerry57@gmail.com on 28 Sep 2010 at 5:26

GoogleCodeExporter commented 9 years ago
I personally don't know what is involved to do this switch, but I have asked 
one of our python devs here to take a look at this.  I will post whatever he 
reports back.

Original comment by jerry57@gmail.com on 28 Sep 2010 at 5:54

GoogleCodeExporter commented 9 years ago
attached more info

Process:         Python [2514]
Path:            
/System/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Co
ntents/MacOS/Python
Identifier:      org.python.python.app
Version:         2.6 (2.6)
Build Info:      python-440100~2
Code Type:       X86 (Native)
Parent Process:  bash [1572]

Date/Time:       2010-10-25 14:19:46.889 +0800
OS Version:      Mac OS X 10.6.4 (10F569)
Report Version:  6

Interval Since Last Report:          291098 sec
Crashes Since Last Report:           13
Per-App Interval Since Last Report:  7045 sec
Per-App Crashes Since Last Report:   2
Anonymous UUID:                      6F7F4C56-443C-4063-8D8A-40F0CBBA12EA

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000065726f46
Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   ???                             0x65726f46 0 + 1701998406
1   Tcl                             0x010794e4 Tcl_FindCommand + 840
2   Tcl                             0x010100df Tcl_GetCommandInfo + 51
3   Tk                              0x011ae475 TkpGetSubFonts + 5008
4   com.apple.AE                    0x9764ff58 aeDispatchAppleEvent(AEDesc 
const*, AEDesc*, unsigned long, unsigned char*) + 166
5   com.apple.AE                    0x9764fe57 dispatchEventAndSendReply(AEDesc 
const*, AEDesc*) + 43
6   com.apple.AE                    0x9764fd61 aeProcessAppleEvent + 197
7   com.apple.HIToolbox             0x989d1323 AEProcessAppleEvent + 50
8   com.apple.AppKit                0x9090ccc6 _DPSNextEvent + 1420
9   com.apple.AppKit                0x9090c2ca -[NSApplication 
nextEventMatchingMask:untilDate:inMode:dequeue:] + 156
10  Tk                              0x011b6e94 XQueryPointer + 2261
11  Tk                              0x011b73d6 Tk_MacOSXSetupTkNotifier + 1079
12  Tcl                             0x0107ea57 Tcl_DoOneEvent + 229
13  Tk                              0x010f834e TkGetDisplayOf + 424
14  Tcl                             0x0101196b Tcl_CreateInterp + 4919
15  Tcl                             0x01012960 Tcl_EvalObjv + 72
16  _tkinter.so                     0x007cd49d Tkapp_CallDeallocArgs + 11750
17  org.python.python               0x0008b382 PyEval_EvalFrameEx + 16375
18  org.python.python               0x0008b4e5 PyEval_EvalFrameEx + 16730
19  org.python.python               0x0008b4e5 PyEval_EvalFrameEx + 16730
20  org.python.python               0x0008b4e5 PyEval_EvalFrameEx + 16730
21  org.python.python               0x0008b4e5 PyEval_EvalFrameEx + 16730
22  org.python.python               0x0008b4e5 PyEval_EvalFrameEx + 16730
23  org.python.python               0x0008cf74 PyEval_EvalCodeEx + 1720
24  org.python.python               0x0002ee0c PyClassMethod_New + 1823
25  org.python.python               0x0000c6e0 PyObject_Call + 101
26  org.python.python               0x0001c10d PyClass_New + 1603
27  org.python.python               0x0000c6e0 PyObject_Call + 101
28  org.python.python               0x0008678a PyEval_CallObjectWithKeywords + 
171
29  org.python.python               0x0001ba37 PyInstance_New + 290
30  org.python.python               0x0000c6e0 PyObject_Call + 101
31  org.python.python               0x0008c812 PyEval_EvalFrameEx + 21639
32  org.python.python               0x0008b4e5 PyEval_EvalFrameEx + 16730
33  org.python.python               0x0008cf74 PyEval_EvalCodeEx + 1720
34  org.python.python               0x0008d019 PyEval_EvalCode + 87
35  org.python.python               0x000a40af Py_CompileString + 111
36  org.python.python               0x000a415b PyRun_FileExFlags + 139
37  org.python.python               0x000a5e7e PyRun_SimpleFileExFlags + 814
38  org.python.python               0x000b315c Py_Main + 3074
39  org.python.python.app           0x00001eb5 start + 53

Thread 1:  Dispatch queue: com.apple.libdispatch-manager
0   libSystem.B.dylib               0x94791942 kevent + 10
1   libSystem.B.dylib               0x9479205c _dispatch_mgr_invoke + 215
2   libSystem.B.dylib               0x94791519 _dispatch_queue_invoke + 163
3   libSystem.B.dylib               0x947912be _dispatch_worker_thread2 + 240
4   libSystem.B.dylib               0x94790d41 _pthread_wqthread + 390
5   libSystem.B.dylib               0x94790b86 start_wqthread + 30

Thread 2:
0   libSystem.B.dylib               0x947909d2 __workq_kernreturn + 10
1   libSystem.B.dylib               0x94790f68 _pthread_wqthread + 941
2   libSystem.B.dylib               0x94790b86 start_wqthread + 30

Thread 3:
0   libSystem.B.dylib               0x9478a086 select$DARWIN_EXTSN + 10
1   Tcl                             0x010b472b Tcl_InitNotifier + 1643
2   libSystem.B.dylib               0x9479881d _pthread_start + 345
3   libSystem.B.dylib               0x947986a2 thread_start + 34

Thread 0 crashed with X86 Thread State (32-bit):
  eax: 0x0181fab4  ebx: 0x01078aea  ecx: 0x0181faa0  edx: 0xbfffcc26
  edi: 0xbfffcc24  esi: 0x011dd172  ebp: 0xbfffcd08  esp: 0xbfffcbbc
   ss: 0x0000001f  efl: 0x00010206  eip: 0x65726f46   cs: 0x00000017
   ds: 0x0000001f   es: 0x0000001f   fs: 0x00000000   gs: 0x00000037
  cr2: 0x65726f46

Original comment by jollych...@gmail.com on 25 Oct 2010 at 6:23

GoogleCodeExporter commented 9 years ago
I'm running into this issue as well. Would love a fix.

Original comment by e...@qualitytree.com on 12 Jun 2012 at 10:26

GoogleCodeExporter commented 9 years ago
Currently OSX support is not in the scope of core teams tasks.

Patches are welcome!

Original comment by mikko.ko...@gmail.com on 11 Oct 2012 at 1:07