00:41:52 mdc_mobile [n=mdc_mobi@ds9.entity.com] has joined #ccl 01:09:51 codewitch [n=thecodew@b1FBB.static.pacific.net.au] has joined #ccl 01:10:46 Hello rme, thank you for looking after the Win32 build of Clozure 01:11:16 sellout [n=greg@c-24-128-50-176.hsd1.ma.comcast.net] has joined #ccl 01:11:20 You're welcome, but I'm not the only one who looks after it. 01:14:23 I've managed to integrate it with emacs and load lispbuilder-sdl with it, and I was very happy to be able to have another repl interacting with the running sdl examples 01:16:01 I have a problem running the cl-opengl glut examples however. 01:17:39 When I try (cl-glut-examples:gears), a window appears, a single frame is rendered, and ccl breaks to its kernel debugger with an exception from freeglut.dll 01:21:19 Has Clozure Win32 ever been tested with cl-opengl? 01:21:23 Can you paste the backtrace from the kernel debugger? (use "b" to print a backtrace) 01:21:30 Right away 01:22:06 [7560] Clozure CL kernel debugger: B 01:22:06 current thread: tcr = 0x5cb310, native thread ID = 0x1980, interrupts enabled 01:22:06 (#x00B80D44) #x08DC69A5 : # + 95 01:22:06 (#x00B80D4C) #x08DC676D : # + 23 01:22:06 (#x00B80D54) #x081139A5 : # + 679 01:22:06 (#x00B80D8C) #x083686DD : # + 247 01:22:08 (#x00B80DA8) #x083744B5 : # + 751 01:22:10 (#x00B80DE8) #x08375E25 : # + 1815 01:22:12 (#x00B80EFC) #x0836832D : # + 71 01:22:14 (#x00B80F04) #x08318175 : # + 95 01:22:16 (#x00B80F14) #x083D945D : # + 583 01:22:18 (#x00B80F60) #x08330A95 : # + 671 01:22:20 (#x00B80FA4) #x083312E5 : # + 335 01:22:22 (#x00B80FCC) #x083061BD : # + 279 01:22:24 [7560] Clozure CL kernel debugger: 01:23:57 In the kernel debugger, if I choose "Exit from this debugger, asserting that any exception was handled", it runs for one frame, refreshes the display, then throws another exception. 01:30:20 I haven't been making very good guesses today. You might send mail to openmcl-devel. 01:30:39 http://clozure.com/pipermail/openmcl-devel/2009-June/009691.html might be relevant 01:34:15 The exception wasn't handled. 01:35:40 I built freeglut.dll from source using MSys/MinGW - I'll try instrumenting glutMainLoop 01:36:25 I wonder - I don't know- if GLUT can just run on the listener thread in Windows. 01:37:06 Did you see an exception message when it entered the kernel debugger ? 01:41:27 Yes, it said: 01:41:29 ? (cl-glut-examples:gears) 01:41:30 %eax = 0x00000001 01:41:30 %ecx = 0x00000000 01:41:30 %edx = 0x0086ff94 01:41:30 %ebx = 0x0086ff94 01:41:30 %esp = 0x00a6f9e4 01:41:32 %ebp = 0x00a6f9fc 01:41:34 %esi = 0x00a6fb94 01:41:36 %edi = 0x00c36278 01:41:38 %eip = 0x00019c35 01:41:40 %eflags = 0x00040212 01:41:42 %cs = 0x001b 01:41:44 %ds = 0x0023 01:41:46 %ss = 0x0023 01:41:48 %es = 0x0023 01:41:50 %fs = 0x003b 01:41:52 %gs = 0x0000 01:41:53 something caused it to read an 'r'. 01:41:54 Exception on foreign stack 01:41:56 Exception occurred while executing foreign code 01:41:58 ? for help 01:42:00 [2356] Clozure CL kernel debugger: 01:42:19 what do you mean? 01:45:34 The registers output was its response to having read an 'r' from somewhere. 01:51:31 Could the version of cffi I'm using make a difference? Or is this something internal to Clozure? I'm using the latest cffi 0.10.4 01:51:50 Any of the above; I have no idea. 02:07:24 * trying something 02:13:54 -!- codewitch [n=thecodew@b1FBB.static.pacific.net.au] has quit [Read error: 54 (Connection reset by peer)] 02:19:13 codewitch [n=thecodew@b1FBB.static.pacific.net.au] has joined #ccl 02:20:18 Ignoring exceptions too many times results in a crash 02:21:50 That command is supposed to be used if you've fixed things (in gdb or somehow) and want to try to proceed, "asserting that the exception has been handled."' 02:22:42 Yes - I was hoping that it was one of those ignorable, non-lethal exceptions 02:23:11 I've narrowed it down to a call to fgEnumWindows 02:23:54 The reason I thought the exception might have been non-lethal is because CLisp runs it without any problems. Apart from the annoying problem of not being multithreaded 02:24:13 Which means, of course, next to nothing. 02:25:54 What means nothing, that it runs in CLisp, or that I'm spraying printfs in fgEnumWindows? 02:26:19 *codewitch* away for a while 02:39:15 -!- mdc_mobile [n=mdc_mobi@ds9.entity.com] has quit [] 02:43:54 bfulgham_ [n=brent@adsl-69-234-130-247.dsl.irvnca.pacbell.net] has joined #ccl 02:44:56 -!- bfulgham_ [n=brent@adsl-69-234-130-247.dsl.irvnca.pacbell.net] has quit [Client Quit] 02:45:18 -!- alms [n=alms@209-150-48-250.c3-0.bkl-ubr1.sbo-bkl.ma.cable.rcn.com] has quit [] 02:48:12 May I ask, what country are you guys in? (gbyer, rme, Clozure Win32 developers) 02:48:16 alms [n=alms@209-150-48-250.c3-0.bkl-ubr1.sbo-bkl.ma.cable.rcn.com] has joined #ccl 02:49:21 Most of us are in the US; Clozure has some people (subcontractors) in Germany and I'm not sure where else. 02:50:18 Clozure is fantastic. I am very grateful that you guys have ported it to Win32, and despite this cl-opengl problem, its a beautiful piece of work. Is there a way I can donate? 02:50:38 See if you can get alms' attention. 02:55:21 http://clozure.com/about.html contains contact information. 03:03:02 chandler [n=n@opendarwin/developer/chandler] has joined #ccl 03:03:28 lisppaste5 [n=lisppast@common-lisp.net] has joined #ccl 03:04:12 rme: sorry about that! apparently freenode had some issues earlier and lisppaste didn't recover gracefully 03:04:13 http://clozure.com/about.html is a good read. 03:04:17 There's the lisppaste bot again. Thanks chandler. 03:08:38 bfulgham_ [n=brent@adsl-69-234-130-247.dsl.irvnca.pacbell.net] has joined #ccl 03:12:54 Would freeglut.dll functions be running in more than one thread? 03:15:57 On some platforms (OSX), they're sensitive about what thread they're on. The thing that I wonder about is whether they expect to use 'cdecl' or 'stdcall' calling conventions, and what cffi knows about that. 03:20:43 mdc_mobile [n=mdc_mobi@ds9.entity.com] has joined #ccl 03:21:33 I'll try to compare it to the SDL and SDL glue library code, since that works. OpenGL is explicitly mentioned here http://trac.clozure.com/ccl/wiki/OpenMclFfi so is there a testbed available? 03:26:55 There's lots of OpenGL code running in OpenMCL/CCL. (On OSX, Linux, ....) 03:29:10 lispbuilder-sdl uses __declspec(dllexport) and has its own little cffi, cl-opengl also uses __declspec(dllexport) but has a cffi package dependency 03:29:26 Just throwing random trivia out there 03:31:35 I tried to build freeglut, and the build process got confused about whether function names have '@n' appended to them. That generally means that the function follows Pascal-like calling convents (called 'stdcall' on Windows.) We don't care, but it probably also means that callback functions are expected to discard their arguments before returning, and we don't do that unless told to. 03:35:48 Which freeglut are you building? 03:36:38 2.6.0-rc1 from SourceForge. Trying to build a non-Cygwin version with the Cygwin compiler. 03:38:21 I'm building this one: http://www.turtle.dds.nl/gl4newlisp/freeglut-devel.tar.gz 03:39:17 The reason is, I started playing with Lisp 3 weeks ago and started off with CLisp. After scraping lots of forums, I found that this is the freeglut build I should use. 03:40:39 Its unfortunate that cl-opengl and freeglut have to be obtained separately 03:41:46 I could be wrong. I probably am wrong. I'm going to build from 2.6.0-rc1 using Msys/MinGW and see if that helps.... 03:41:50 I don't know if the version of FreeGLUT necessarily matters, but I am concerned that cffi may not know how to generate stdcall callbacks. If the calling function and callee don't agree about that sort of thing, bad things happen. 03:42:37 I only understand cffi broadly, not enough to mess around with it... 03:43:56 Guess I'd better get my hands dirty 03:45:30 I think that that's worth looking at; the whole stdcall/cdecl thing is windows-specific, and CCL on Windows is fairly new and defaults to 'cdecl' for callbacks; the FreeGLUT convention may be to use stdcall. 03:49:47 ....you're right. 03:52:09 So, if CFFI has a means of generating a 'stdcall' callback, the DEFCALLBACK that gets generated for CCL has to say something special whose syntax I don't recall at the monent ... 03:56:09 jauaor [n=araujo@gentoo/developer/araujo] has joined #ccl 03:58:43 I removed all instances of __stdcall, now interface functions are defined as __declspec(dllexport) instead of __declspec(dllexport) void __stdcall 03:59:18 Exception still occurs. I thought I'd give it a try. 04:00:26 I don't know if that's correct; FreeGLUT may use stdcall for a reason. The demos will define lisp functions that are called from the GLUT code, and it may expect them to be 'stdcall' and crash if they aren't. 04:07:24 features.lisp in cffi/src has #:no-stdcall declared in #:cffi-features, which suggests that cffi will automagically convert standard calls.... much like I just did now that I think about it 04:08:19 I don't know for sure what that means. 04:08:52 Here is the code: 04:09:02 (defpackage #:cffi-features 04:09:02 (:use #:cl) 04:09:02 (:export 04:09:02 #:cffi-feature-p 04:09:02 ;; Features related to the CFFI-SYS backend. Why no-*? This 04:09:02 ;; reflects the hope that these symbols will go away completely 04:09:04 ;; meaning that at some point all lisps will support long-longs, 04:09:06 ;; the foreign-funcall primitive, etc... 04:09:08 #:no-long-long 04:09:10 #:no-foreign-funcall 04:09:12 #:no-stdcall 04:09:12 lisppaste5: url 04:09:14 #:flat-namespace 04:09:14 To use the lisppaste bot, visit http://paste.lisp.org/new/ccl and enter your paste. 04:10:40 codewitch pasted "Code from cffi/src" at http://paste.lisp.org/display/81259 04:13:33 -!- bfulgham_ [n=brent@adsl-69-234-130-247.dsl.irvnca.pacbell.net] has quit [] 04:14:35 bfulgham_ [n=brent@adsl-69-234-130-247.dsl.irvnca.pacbell.net] has joined #ccl 04:15:28 Do you want me to provide the simplest way to reproduce this problem? 04:18:54 The CFFI documentation seems to imply that it supports specifying the calling convention. http://common-lisp.net/project/cffi/manual/html_node/defcallback.html 04:20:00 If you can, please fill out a ticket in trac. I suspect that it's a CFFI issue, ultimately, but it'd be good to have a record of it. 04:20:01 But Clozure doesn't support it yet, based on what Gary is saying 04:20:23 No, that's not what I'm saying. 04:20:57 And I guess that cl-opengl would need to be updated to define callbacks using stdcall for Windows systems. 04:22:08 If it doesn't. We don't know whether it does or not, but what's CFFI's idea of a stdcall callback for CCL ? 04:26:00 It looks like the CCL backend in the current CFFI sources ignores other calling conventions. 04:26:11 %defcallback in http://common-lisp.net/project/cffi/darcs/cffi/src/cffi-openmcl.lisp 04:26:56 Yep. 04:37:47 Ticket added to trac: http://trac.clozure.com/ccl/ticket/527 04:40:02 Thanks. It's almost certainly necessary to fix CFFI's defcallback support; don't know if that's the only problem, but this sort of thing can't work until that's fixed. 04:40:21 Is it something you know how to do? 04:41:21 When I'm not watching baseball on the net ? Yes, I can probably figure it out, or rme can. 04:42:04 If/when we do, we'll send the patch to Luis or whoever maintains cffi these days. 04:46:53 I posted to cl-opengl-devel yesterday about this problem, and Luis replied - interesting how in all the world, there are literally about 5 people looking after Lisp 04:47:10 Link: http://common-lisp.net/pipermail/cl-opengl-devel/2009-June/000585.html 04:48:52 Thank you again so much for taking the time today to think about this problem and reply to my noob questions 04:49:09 NP. 04:49:12 Only 5? There's got to be at least a dozen lisp hackers. 04:50:22 gbyers, rme, luis, paul graham, and a legion of bloggers 05:57:42 Thanks again 05:57:46 -!- codewitch [n=thecodew@b1FBB.static.pacific.net.au] has left #ccl 05:57:51 ok. 06:05:29 codewitch [n=thecodew@b1FBB.static.pacific.net.au] has joined #ccl 06:05:56 -!- codewitch [n=thecodew@b1FBB.static.pacific.net.au] has quit [Client Quit] 06:32:03 -!- rme [n=rme@pool-70-104-125-18.chi.dsl-w.verizon.net] has quit [] 06:57:33 codewitch [n=thecodew@CPE-124-177-50-95.vic.bigpond.net.au] has joined #ccl 06:59:55 -!- codewitch [n=thecodew@CPE-124-177-50-95.vic.bigpond.net.au] has quit [Client Quit] 07:03:49 codewitch [n=thecodew@CPE-124-177-50-95.vic.bigpond.net.au] has joined #ccl 08:24:08 -!- sellout [n=greg@c-24-128-50-176.hsd1.ma.comcast.net] has quit [Read error: 110 (Connection timed out)] 09:22:18 sellout [n=greg@c-24-128-50-176.hsd1.ma.comcast.net] has joined #ccl 09:36:16 -!- codewitch [n=thecodew@CPE-124-177-50-95.vic.bigpond.net.au] has quit [] 10:08:42 codewitch [n=thecodew@CPE-124-177-50-95.vic.bigpond.net.au] has joined #ccl 10:48:27 -!- codewitch [n=thecodew@CPE-124-177-50-95.vic.bigpond.net.au] has quit [] 10:59:06 -!- jauaor [n=araujo@gentoo/developer/araujo] has quit [] 11:47:55 -!- sellout [n=greg@c-24-128-50-176.hsd1.ma.comcast.net] has quit [] 12:30:09 sellout [n=greg@guest-fw.dc4.itasoftware.com] has joined #ccl 13:40:29 jajcloz [n=jaj@pool-173-76-163-72.bstnma.fios.verizon.net] has joined #ccl 14:46:19 -!- bfulgham_ [n=brent@adsl-69-234-130-247.dsl.irvnca.pacbell.net] has quit [] 15:33:49 dat [n=dthomp@nmd.sbx08736.mcminor.wayport.net] has joined #ccl 15:39:16 rme [n=rme@pool-70-104-125-18.chi.dsl-w.verizon.net] has joined #ccl 15:40:38 -!- mdc_mobile [n=mdc_mobi@ds9.entity.com] has quit [Remote closed the connection] 15:57:25 milanj [n=milan@93.87.142.252] has joined #ccl 16:00:05 -!- dat [n=dthomp@nmd.sbx08736.mcminor.wayport.net] has quit [Read error: 113 (No route to host)] 16:05:21 dat [n=dthomp@dyn-188-dynamic.linfield.edu] has joined #ccl 17:31:08 -!- dat [n=dthomp@dyn-188-dynamic.linfield.edu] has quit ["Leaving"] 17:43:52 anRch [n=markmill@12.147.116.237] has joined #ccl 18:05:03 -!- anRch [n=markmill@12.147.116.237] has quit [] 18:14:41 anRch [n=markmill@12.147.116.237] has joined #ccl 18:21:45 -!- rme [n=rme@pool-70-104-125-18.chi.dsl-w.verizon.net] has quit [] 18:22:09 rme [n=rme@pool-70-104-125-18.chi.dsl-w.verizon.net] has joined #ccl 18:49:58 -!- rme [n=rme@pool-70-104-125-18.chi.dsl-w.verizon.net] has quit [] 18:53:43 -!- anRch [n=markmill@12.147.116.237] has quit [] 18:55:06 rme [n=rme@pool-70-104-125-18.chi.dsl-w.verizon.net] has joined #ccl 20:19:47 -!- segv__ [n=mb@p4FC1AC90.dip.t-dialin.net] has quit [Read error: 110 (Connection timed out)] 20:20:13 segv__ [n=mb@p4FC1C27F.dip.t-dialin.net] has joined #ccl 20:35:07 -!- sellout [n=greg@guest-fw.dc4.itasoftware.com] has quit [] 20:50:58 REPLeffect [n=REPLeffe@69.54.115.254] has joined #ccl 21:10:07 -!- jajcloz [n=jaj@pool-173-76-163-72.bstnma.fios.verizon.net] has quit [Read error: 113 (No route to host)] 21:14:48 sellout [n=greg@c-24-128-50-176.hsd1.ma.comcast.net] has joined #ccl 21:27:23 jauaor [n=araujo@gentoo/developer/araujo] has joined #ccl 21:38:41 jajcloz [n=jaj@pool-173-76-163-72.bstnma.fios.verizon.net] has joined #ccl 21:55:36 milanj- [n=milan@93.86.186.165] has joined #ccl 21:56:50 amblerc [n=user@24-180-81-97.dhcp.bycy.mi.charter.com] has joined #ccl 22:08:00 -!- amblerc [n=user@24-180-81-97.dhcp.bycy.mi.charter.com] has quit ["ERC Version 5.3 (IRC client for Emacs)"] 22:15:21 -!- milanj [n=milan@93.87.142.252] has quit [Read error: 110 (Connection timed out)] 22:15:57 -!- alms [n=alms@209-150-48-250.c3-0.bkl-ubr1.sbo-bkl.ma.cable.rcn.com] has quit [] 22:58:01 -!- milanj- [n=milan@93.86.186.165] has quit ["Leaving"] 23:37:36 alms [n=alms@209-150-48-250.c3-0.bkl-ubr1.sbo-bkl.ma.cable.rcn.com] has joined #ccl