xboard-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XBoard-devel] XBoard 4.9.0 release


From: H.G. Muller
Subject: Re: [XBoard-devel] XBoard 4.9.0 release
Date: Wed, 11 May 2016 08:19:03 +0200
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2

Hmm, when I tested this it worked without problem; I added this theme:

"test" -ubt true -lbtf "~~/themes/textures/EdSolid-cream.png" -dbtf "~~/themes/textures/EdSolid-blue.png" -lbtm 1 -dbtm 1 -ub false -upf false -pid "~~/themes/Mnemonic-S" -trueColors true -hsc #FFFF00 -phc #ff0000

 The backtrace shows that the crash happened during an snprintf called from LoadTheme (in backend.c). Unfortunately there are many snprintfs called from LoadTheme, so to zoom in on the problem we would have to figure out which one it is that causes the trouble, and what it was expected to print. Can you put a printf statement after every snprintf there like

printf("A\n"),fflush(stdout);

(and similar "B\n", "C\n" etc) to see what the last one is that was printed in the terminal before the crash?

Op 5/11/2016 om 1:36 AM schreef Joshua Pettus:
Thanks Harm,

I gave it a try, and now loads correctly. Thanks.  But now when I save a new theme (testing out the new DataDir to ~~/ translation) XBoard now crashes :

XBoard: line 69:   889 Segmentation fault: 11

I did a backtrace  but I bet it's the translation that's giving us trouble:

(lldb) thread backtrace all
* thread #1: tid = 0xa99f, 0x00007fff980d4152 libsystem_c.dylib`strlen + 18, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x11cfe0)
  * frame #0: 0x00007fff980d4152 libsystem_c.dylib`strlen + 18
    frame #1: 0x00007fff98119a54 libsystem_c.dylib`__vfprintf + 5713
    frame #2: 0x00007fff981426c9 libsystem_c.dylib`__v2printf + 669
    frame #3: 0x00007fff98126915 libsystem_c.dylib`_vsnprintf + 596
    frame #4: 0x00007fff981269ca libsystem_c.dylib`vsnprintf + 80
    frame #5: 0x00007fff98157d08 libsystem_c.dylib`__snprintf_chk + 128
    frame #6: 0x00000001000591d6 xboard-bin`LoadTheme + 401
    frame #7: 0x0000000100081d3d xboard-bin`BoardOptionsOK + 156
    frame #8: 0x0000000100080745 xboard-bin`GenericReadout + 2575
    frame #9: 0x00000001000a1b81 xboard-bin`GenericPopDown + 174
    frame #10: 0x0000000100bdd9a5 libgobject-2.0.0.dylib`g_cclosure_marshal_VOID__INTv + 110
    frame #11: 0x0000000100bdca15 libgobject-2.0.0.dylib`_g_closure_invoke_va + 433
    frame #12: 0x0000000100bf04c4 libgobject-2.0.0.dylib`g_signal_emit_valist + 1201
    frame #13: 0x0000000100bf13a3 libgobject-2.0.0.dylib`g_signal_emit + 148
    frame #14: 0x0000000100bdca15 libgobject-2.0.0.dylib`_g_closure_invoke_va + 433
    frame #15: 0x0000000100bf04c4 libgobject-2.0.0.dylib`g_signal_emit_valist + 1201
    frame #16: 0x0000000100bf13a3 libgobject-2.0.0.dylib`g_signal_emit + 148
    frame #17: 0x000000010037f5a8 libgtk-quartz-2.0.0.dylib`gtk_real_button_released + 52
    frame #18: 0x0000000100bdca15 libgobject-2.0.0.dylib`_g_closure_invoke_va + 433
    frame #19: 0x0000000100bf04c4 libgobject-2.0.0.dylib`g_signal_emit_valist + 1201
    frame #20: 0x0000000100bf13a3 libgobject-2.0.0.dylib`g_signal_emit + 148
    frame #21: 0x000000010037cd7a libgtk-quartz-2.0.0.dylib`gtk_button_button_release + 15
    frame #22: 0x000000010041d67c libgtk-quartz-2.0.0.dylib`_gtk_marshal_BOOLEAN__BOXED + 169
    frame #23: 0x0000000100bdcc5e libgobject-2.0.0.dylib`g_closure_invoke + 399
    frame #24: 0x0000000100bef6e1 libgobject-2.0.0.dylib`signal_emit_unlocked_R + 4564
    frame #25: 0x0000000100bf0f8a libgobject-2.0.0.dylib`g_signal_emit_valist + 3959
    frame #26: 0x0000000100bf13a3 libgobject-2.0.0.dylib`g_signal_emit + 148
    frame #27: 0x0000000100516670 libgtk-quartz-2.0.0.dylib`gtk_widget_event_internal + 711
    frame #28: 0x0000000100416d71 libgtk-quartz-2.0.0.dylib`gtk_propagate_event + 300
    frame #29: 0x0000000100417d37 libgtk-quartz-2.0.0.dylib`gtk_main_do_event + 1214
    frame #30: 0x00000001007ea0f2 libgdk-quartz-2.0.0.dylib`gdk_event_dispatch + 87
    frame #31: 0x0000000100c5d3fe libglib-2.0.0.dylib`g_main_context_dispatch + 346
    frame #32: 0x0000000100c5fc2f libglib-2.0.0.dylib`g_main_context_iterate + 385
    frame #33: 0x0000000100c5fe01 libglib-2.0.0.dylib`g_main_context_iteration + 65
    frame #34: 0x0000000100417eb2 libgtk-quartz-2.0.0.dylib`gtk_main_iteration + 33
    frame #35: 0x000000010009c9cf xboard-bin`main + 5481
    frame #36: 0x0000000100007780 xboard-bin`start + 52

  thread #3: tid = 0xa9a3, 0x00007fff947a5efa libsystem_kernel.dylib`kevent_qos + 10, queue = 'com.apple.libdispatch-manager'
    frame #0: 0x00007fff947a5efa libsystem_kernel.dylib`kevent_qos + 10
    frame #1: 0x00007fff9c6d9165 libdispatch.dylib`_dispatch_mgr_invoke + 216
    frame #2: 0x00007fff9c6d8dcd libdispatch.dylib`_dispatch_mgr_thread + 52

  thread #6: tid = 0xa9a4, 0x00007fff947a55e2 libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #0: 0x00007fff947a55e2 libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fff8a8ed578 libsystem_pthread.dylib`_pthread_wqthread + 1283
    frame #2: 0x00007fff8a8eb341 libsystem_pthread.dylib`start_wqthread + 13

  thread #7: tid = 0xaa9d, 0x00007fff947a55e2 libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #0: 0x00007fff947a55e2 libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fff8a8ed578 libsystem_pthread.dylib`_pthread_wqthread + 1283
    frame #2: 0x00007fff8a8eb341 libsystem_pthread.dylib`start_wqthread + 13

  thread #8: tid = 0xaa9e, 0x00007fff947a55e2 libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #0: 0x00007fff947a55e2 libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fff8a8ed578 libsystem_pthread.dylib`_pthread_wqthread + 1283
    frame #2: 0x00007fff8a8eb341 libsystem_pthread.dylib`start_wqthread + 13

  thread #9: tid = 0xaaa0, 0x00007fff947a55e2 libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #0: 0x00007fff947a55e2 libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fff8a8ed578 libsystem_pthread.dylib`_pthread_wqthread + 1283
    frame #2: 0x00007fff8a8eb341 libsystem_pthread.dylib`start_wqthread + 13

  thread #10: tid = 0xaace, 0x00007fff9479ef72 libsystem_kernel.dylib`mach_msg_trap + 10, name = 'com.apple.NSEventThread'
    frame #0: 0x00007fff9479ef72 libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x00007fff9479e3b3 libsystem_kernel.dylib`mach_msg + 55
    frame #2: 0x00007fff94d671c4 CoreFoundation`__CFRunLoopServiceMachPort + 212
    frame #3: 0x00007fff94d6668c CoreFoundation`__CFRunLoopRun + 1356
    frame #4: 0x00007fff94d65ed8 CoreFoundation`CFRunLoopRunSpecific + 296
    frame #5: 0x00007fff96d17e99 AppKit`_NSEventThread + 149
    frame #6: 0x00007fff8a8ed99d libsystem_pthread.dylib`_pthread_body + 131
    frame #7: 0x00007fff8a8ed91a libsystem_pthread.dylib`_pthread_start + 168
    frame #8: 0x00007fff8a8eb351 libsystem_pthread.dylib`thread_start + 13

  thread #11: tid = 0xaad4, 0x00007fff947a507a libsystem_kernel.dylib`__select + 10
    frame #0: 0x00007fff947a507a libsystem_kernel.dylib`__select + 10
    frame #1: 0x0000000100c67f59 libglib-2.0.0.dylib`g_poll + 325
    frame #2: 0x00000001007eac38 libgdk-quartz-2.0.0.dylib`select_thread_func + 300
    frame #3: 0x00007fff8a8ed99d libsystem_pthread.dylib`_pthread_body + 131
    frame #4: 0x00007fff8a8ed91a libsystem_pthread.dylib`_pthread_start + 168
    frame #5: 0x00007fff8a8eb351 libsystem_pthread.dylib`thread_start + 13


Josh


On 5/10/16 3:31 AM, H.G. Muller wrote:
This looks like the line simply gets clipped because of insufficient buffer size. And on trying to activate it, it might be clipped even shorter than on writing. Encountering an invalid option name still is a fatal error when the options were not coming from a settings file (where recovery is possible by skipping to the next line, and where it was pretty annoying that after running a newer test version of WinBoard, the old version would crash because of the new options it did not knowthat were stored in the settings file). The "logout" is now always sent to an ICS after a fatal error, to prevent the ICS from starting a new game when XBoard is waiting for user confirmation of the fatal-error popup before actually exiting (which you would then forfeit on time).

I will check which buffers the theme definition passes through, and enlarge those. It would of course also be helpful if at some point (e.g. creating the line in the -themeNames option in LoadTheme()) XBoard would recognize the long path names obtained from the file chooser as being in its DATADIR (which here is "/Applications/Chess/Xboard/XBoard.app/Contents/Resources/share/xboard"?), and replace it by ~~. This would of course not help against general use of long path names, but it would surely make the theme lines more readable in the typical case:

"Marble(Blue)" -ubt true -lbtf "~~/themes/textures/Transparent/stone-marble2-texture.png" -dbtf "~~/themes/textures/Transparent/stone-marble1-texture.png" -lbtm 1 -dbtm 1 -lsc #cbdce1 -dsc #1b6883 -ub false -upf false -pid "~~/themes/Habsburg" -trueColors false -wpc #ededed -bpc #000000 -hsc #fff826 -phc #FF0000






reply via email to

[Prev in Thread] Current Thread [Next in Thread]