*** tiredbones has joined #gnuenterprise *** dimas has joined #gnuenterprise *** dimas has quit IRC *** dcmwai has quit IRC *** reinhard has joined #gnuenterprise *** sjc has joined #gnuenterprise *** btami has joined #gnuenterprise *** kilo has joined #gnuenterprise *** chillywilly has quit IRC *** chillywi1ly has joined #gnuenterprise *** reinhard has quit IRC good morning *** dimas has joined #gnuenterprise *** btami has quit IRC *** btami has joined #gnuenterprise *** mnemoc has quit IRC *** btami has quit IRC *** mnemoc has joined #gnuenterprise *** holycow has quit IRC *** jamest_ has joined #gnuenterprise *** lekma has joined #gnuenterprise hi all hi *** sjc has quit IRC *** kilo has quit IRC *** SachaS has joined #gnuenterprise hi, can i create 'create-only' forms? *** SachaS has quit IRC *** reinhard has joined #gnuenterprise *** titopbs has joined #gnuenterprise *** wendall911 has joined #gnuenterprise *** jcater has joined #gnuenterprise hi, can i create 'create-only' forms? and, does gnue-* run inside ddd? mnemoc: I would not know how to do a "create-only" form what is ddd? debugger a frontend to gdb *** tiredbones has quit IRC *** reinhard has quit IRC *** reinhard has joined #gnuenterprise *** kilo has joined #gnuenterprise *** titopbs has quit IRC nickr: in designer set the blocks allow delete to false then set the allow editing to new records only i *think* this will have the desired effect we support python's built in debugger via --interactive-debugger with any gnue app whoops, that first part was for mnemoc *** lekma has quit IRC *** lekma has joined #gnuenterprise *** tiredbones has joined #gnuenterprise for the log: In doc "GNUe Forms: A Developer's Intro." page 7, section titled "Creating the Datasource",second paragraph has- Edit | Insert | Datasource, Should read Insert | Datasource. Is anyone on the list using the current release of gnue-designer? not me How do you design your forms? vi Do you have some docs that one could use for that method? not really when I need something I either try to find a sample that does the same or look in the code tiredbones: you have to know to gfd format which is only really documented well in GFParser.py :( (I understand that's not an option for you= :) what I do is use designer wizard to rough out the form use vi or kate to add trigger logic (or merge multiple forms into a single tabbed one) then all layout changes I do in designer gives me the quickest results plus doing it that way you'll get to understand the gfd format I was going to create a small system to learn all the part, but I guess I got to do it differently. Is there anyone working on gne-designer, seeing how that's first piece of software most people are going to come into contact with/ *** siesel has joined #gnuenterprise Should I keep going thru this document and pick-up the errors or forget it? tiredbones: i'd appreciate the bug reports i'll fix the one you listed above now Hold off, there 's more. I'll put them in the log here. too late :) actually, the commit failed hmmm... reminds me that I've promised to fix po file regeneration... *** btami has joined #gnuenterprise hi hi btami which is only really documented well in GFParser.py :( hi reinhard just for record kilo updatedthe form's dev guide from GFParser.py with many description cool yes i am 8-))) *** sjc has joined #gnuenterprise btami, do you know the name of the guide? I did a svn yesterday and didn't see any change in the "GNUe Forms: A Developer's Introduction". Developers-Guide.sxw reinhard: got an error with gnue-invoice Traceback (most recent call last): File "", line 9, in blkItem_fldQuantity_POST_CHANGE_onchange File "c:\python23\Lib\site-packages\gnue\common\logic\NamespaceCore.py", line 315, in __call__ return self._objectFunction(*args) File "c:\python23\Lib\site-packages\gnue\forms\GFObjects\GFBlock.py", line 714, in callFunction parameters) File "c:\python23\Lib\site-packages\gnue\common\datasources\GDataSource.py", line 180, in callFuncOfCurrentRecordsetEntry return rset.callFunc(name,params) File "c:\python23\Lib\site-packages\gnue\common\d grrr, too long File "c:\python23\Lib\site-packages\gnue\common\rpc\drivers\xmlrpc\pw_xmlrpc\ClientAdapter.py", line 95, in _runMethod result = to_call (*__args, **params) File "c:\python23\lib\xmlrpclib.py", line 1032, in __call__ return self.__send(self.__name, args) File "c:\python23\lib\xmlrpclib.py", line 1319, in __request verbose=self.__verbose File "c:\python23\lib\xmlrpclib.py", line 1083, in request return self._parse_response(h.getfile(), sock) File "c:\python23\lib\xmlrpclib.py", line 1217, in _parse_response p.feed(response) File "c:\python23\lib\xm the last 3 line is File "c:\python23\lib\xmlrpclib.py", line 816, in end_double self.append(float(data)) ValueError: invalid literal for float(): 138,75 client and server on same machine? yes it worked before your last few changes the comma strikes me odd is 138.75 a number you entered in a form, a number returned from the database, or anything completely different? i think it's a calculated value,itemprice=111.0 (from db) and i press 1 as quantity maybe net+vat ? *** titopbs has joined #gnuenterprise do you use the comma as decimal point in hungary? IOW yes could you test if it still happens when you run server and client in the C locale? trying... bingo! it's ok with C locale clear soory tiredbones: no, I won't go away ;-) I hope not! btami: now the question is what on earth converts the number to a string using the locale... i don't know,but it worked some days before... maybe your fixes forlekma grrr, my space isdead :) alt+032 btami: thatsannoyingisntit? sigh btami: I wouldn't know which change could cause this the error occures client side, right? yes and the return type of the calculated field is number, right? yes hmmm just noticed that the result of a calculated field seems to not get type-checked in geasInstance.py, line 364 if you add a "print repr(result)" before that return do you see any 138.75 there? with . or with , 138,75 three times not, fives times:) in quotes? with dot or with comma? just 138,75 hmmm i got this: BILLING_Head::OnInit - dateIssued set to 2005-02-16 00:00:00,00 BILLING_Head::OnInit - Seller is BÉRADÓ'88 KFT. None 0 0 0 '' 111.0 111.0 111.0 111.0 138,75 138,75 111.0 138,75 138,75 138,75 111.0 27,75 27,75 111.0 27,75 27,75 27,75 u'Vev\u0151 1' the values like 111.0 are coming from db the values like 138,75 are calculated no matter what I do, I can't get python to print numbers with a comma instead of a dot can you also output what type the values are of? bbl 111.0 138,75 that is insane I don't get it reinhard: i can reboot to linux to test it, if it helps btami: that is on windows? oh might be interesting, yes bbl in a few minutes ok *** btami has quit IRC ls :) *** btami has joined #gnuenterprise back lekma: btw, any further multithreading experiments? yes some and some interesting results? i still have the same pb we already talk now i'm trying to thread morning rpc calls a server side lekma: did you try to find out who closes the connection? no not yet ok good morning ajmitch where do you think i should put prints to find out brb lekma: there are two lines in geasList.py where "self.__recordset = None" is executed as one of your tracebacks explicitly complained about self.__recordset being none, one of these lines must get executed very shortly *before* the traceback (well, of course before the traceback, silly me....) reinhard: it's ok on linux, no 138,75 at all sigh so it's a win related bug oly s/oly/only good night all *** btami has quit IRC I'm saving all these errors, oly and the like, for the jargon file. tiredbones: huh? a joke. ah ok :) reinhard: the error i see most is related to self._dataObject being a NoneTYpe in Resultset.py s/NoneTYpe/NoneType so not having _unicodeMode or _connection attribute example the other one might be easier to spot ResultSet._dataObject is a public property, so it might get changed everywhere geasList.__recordset is a private property, and we know for sure it must be one of the two lines that set it to None well atm i only see those: DB000: Exception in thread Thread-1859: DB000: Traceback (most recent call last): DB000: File "/usr/lib/python2.3/threading.py", line 436, in __bootstrap DB000: self.run() DB000: File "/var/lib/gnue/gecocer/xul/forms.py", line 231, in run DB000: self.obj = self.attr.getXulAttr (self.obj, self.item) DB000: File "/var/lib/gnue/gecocer/xul/attributes.py", line 133, in getXulAttr DB000: attribs = self.__session.find (klass, cond, [], props) DB000: File "/usr/lib/gnue/appserver/language/Session.py", line 119, in find DB000: properties) DB000: File "/usr/lib/gnue/appserver/language/ObjectList.py", line 48, in __init__ DB000: self.__buildList () DB000: File "/usr/lib/gnue/appserver/language/ObjectList.py", line 108, in __buildList DB000: self.__populateList () DB000: File "/usr/lib/gnue/appserver/language/ObjectList.py", line 118, in __populateList DB000: rset = sm.fetch (sid, self.__list_id, len (self.__list), self.__cacheStep,0) DB000: File "/usr/lib/gnue/appserver/geasSessionManager.py", line 300, in fetch DB000: result = s.fetch (list_id, start, count) DB000: File "/usr/lib/gnue/appserver/geasSession.py", line 467, in fetch DB000: result = list.fetch (start, count) DB000: File "/usr/lib/gnue/appserver/geasList.py", line 260, in fetch DB000: self.__fillupFunc (start + count) DB000: File "/usr/lib/gnue/appserver/geasList.py", line 76, in __fillupFunc DB000: return self.__fillupUnsorted (count) DB000: File "/usr/lib/gnue/appserver/geasList.py", line 133, in __fillupUnsorted DB000: current = self.__getInstance () DB000: File "/usr/lib/gnue/appserver/geasList.py", line 163, in __getInstance DB000: record = self.__recordset.nextRecord () DB000: File "/usr/lib/gnue/appserver/data.py", line 973, in nextRecord DB000: rec = self.__nextBackendRecord () DB000: File "/usr/lib/gnue/appserver/data.py", line 1084, in __nextBackendRecord DB000: beRec = self.__resultSet.firstRecord () DB000: File "/usr/lib/gnue/common/datasources/drivers/Base/ DB000: File "/usr/lib/gnue/appserver/data.py", line 1084, in __nextBackendRecord DB000: beRec = self.__resultSet.firstRecord () DB000: File "/usr/lib/gnue/common/datasources/drivers/Base/ResultSet.py", line 175, in firstRecord DB000: if not self._cacheNextRecord(): DB000: File "/usr/lib/gnue/common/datasources/drivers/Base/ResultSet.py", line 452, in _cacheNextRecord DB000: rs = self._loadNextRecord() DB000: File "/usr/lib/gnue/common/datasources/drivers/DBSIG2/ResultSet.py", line 97, in _loadNextRecord DB000: f = unicode(f,self._dataObject._connection._encoding) DB000: AttributeError: 'NoneType' object has no attribute '_connection' D sorry too long lekma: this is really weird if you look at the line *exactly* above the last line of your traceback (line 97 in DBSIG2/ResultSet.py) self._dataObject._unicodeMode is accessed there and doesn't raise an error so it seems like another thread destroyed self._dataObject just between these 2 lines even self._dataObject._connection is accessed right before in the same procedure again in Base/RecordSet.py there is a close() function that sets self._dataObject to None I suspect that close() gets called somehow *** jamest_ has left #gnuenterprise did you mean Base/ResultSet.py ? yes I think so does the resultset has any meaningful attr that can be linked to originating list?? well don't ask me why but the resulset.close() is called for each and every list created you could provoke a traceback there to find out who is calling that close() not by the xul engine and way before my rpc closeLists is triggered a raise is enough ? raise Exception or something like that I have considered for a few times now adding a __repr__ function to objects so they can call themselves names DB000: self.__fillupFunc (start + count) DB000: File "/usr/lib/gnue/appserver/geasList.py", line 76, in __fillupFunc DB000: return self.__fillupUnsorted (count) DB000: File "/usr/lib/gnue/appserver/geasList.py", line 133, in __fillupUnsorted DB000: current = self.__getInstance () DB000: File "/usr/lib/gnue/appserver/geasList.py", line 177, in __getInstance DB000: self.__recordset.close () DB000: File "/usr/lib/gnue/appserver/data.py", line 1018, in close DB000: self.__resultSet.close () DB000: File "/usr/lib/gnue/common/datasources/drivers/Base/ResultSet.py", line 295, in close DB000: raise Exception DB000: Exception D the last lines it's geasList that close everything ok so we're back to our self.__recordset.close() anyway but that looks as if there are two fetch() running on the same list in parallel? is there any means to see which thread you're in? can you check whether geasList.__getInstance runs in 2 different threads for the same list? oh oh i don't know what it exactly mean but when i print self.__list_id in language/ObjectList.py in def --buildList sorry __buildList i get two lists with same id just before the error occur my guess would be both thread got same list id and at one point one finish its job then close the list the other thread then raise the error in the middle of its job lekma: ok. got it in geasSession, about line 397 wow you're fast self.__listcount += 1 self.__lists [self.__listcount] = list list_id = self.__listcount thread a increments listcount then thread switch thread b increments listcount (of same session) thread b gets current list id returned thread switch back thread a gets same list id returned possible solution use a good random number as list_id instead of the listcount *or* if there is any way to block thread switches between these 3 lines, that's even better no obvious solution from my part solution 2 is far too much work atm cause it would require geas to manage threads andd locks and i don't think it's in the roadmap it could be a good idea to use the address of the newly created geasList object as the list id that should be unique over all threads (I *think* there is a way to find out the address of an object) yes. id(object) let me do a quick test *** jamest has quit IRC yes, seems to work Index: geasSession.py =================================================================== --- geasSession.py (Revision 7020) +++ geasSession.py (Arbeitskopie) @@ -107,7 +107,6 @@ self.database = "gnue" self.__lists = {} - self.__listcount = 0 self.__authAdapter = authAdapter self.__connection = None self.__dirtyInstances = {} @@ -271,7 +270,6 @@ item.close () self.__lists = {} - self.__listcount = 0 self.__dirtyInstances = {} self.filters = {} @@ -393,9 +391,8 @@ list = geasList.geasList (self, classdef, self.__connection, recordset, [u'gnue_id'] + propertylist, asCond, dsSort, asSort) - self.__listcount += 1 - self.__lists [self.__listcount] = list - list_id = self.__listcount + list_id = id (list) + self.__lists [list_id] = list return list_id (that would be the diff in case you can't svn up for memory leak reasons) thx in case you can svn up, I've also committed it i think i can't svn up geasSession since lasts changes johannes made Two objects whose lifetimes are disjunct may have the same id() value what mean disjunct ? i think "non overlapping" ok hi yeah i understand while posting it is the address of the object in memory hi siesel so this is what would make sense hi lekma, hi reinhard hi siesel funny all ids are negative :) might have to do with python's memory management well the error seem to have disappear thx reinhard wohooo lekma: you can do multithreaded requests now? not really from the xmlrpc interface so you directly use the api? i have a python xul engine that is now multithreaded and fast enough xul engine means mozilla? but rpc calls still seem not to be threaded yes mozilla at client side lekma: so the rpc server does not create a new thread for rpc calls i initiate a rpc call that calls a python procedure that returns datat but in some procedures you manually spawn off threads? yep that exactly it I'm somehow shocked that we're appearantly closer to a thread safe appserver than i thought oops, too tired. Good night *** siesel has quit IRC well if you initiate the thread soon enough appserver seems to be ok what would be great would be to have a thread per session and then spaw a child thread for every request/load/store inside the session so actually a thread per rpc request? well that would be first step and a temporary solution for me and what would be next steps? * reinhard trying to understand a main thread per session that would spaw proc (find, ...) threads having one thread per call is great but it's better to have all thread from a session in jail in a session thread I don't understand for you to kill a session for example ah can threads be hierarchical? would kill all running child threads of a session i think, but i'm far from being an expert i think that as soon as you spawn a thread from a thread it is a child thread of the launcher hmmmm so the "session father" thread would keep the connection to the client? why how does that work actually? is there an open tcp/ip connection between appserver and the client during the lifetime of a session? ? nope you pass session id to each and every call yes i know but which thread would answer a new xmlrpc reqeust? except for open that has to create the session/thread object *** titopbs has quit IRC the thread answering an rpc call would be the thread object attached/linked/representing the session but how would that thread know it's "for him"? session id before it can see the session id? i don't understand because it can only see the session id when it already answered the rpc request? i mean internally the session is created via rpc?? which thread would listen to port 7654? (or whatever port you use with appserver) the actual xmlrpc server thread but that "main listener" thread would have to pass the request to the "session" thread right? yep which would acutally mean another layer of rpc between these threads no how now a the server knows to which session give a request ? not give now there's only a single thread how the actual server knows which session object is to be used when an rpc call is to be executed not to find the session object is the problem yes but calls ar executed in the session context?? but to find the thread "responsible" for that session threads are objects and to communicate with that thread so you could give a session object an attribute that could be rthe thread or the other way around :) *** wendall911 has left #gnuenterprise remember i am not a programmer * reinhard must learn more about threads so my ideas are to be taken with a huge grain of salt another question does the multithreading as you do now solve your performane problems? part of it now the forms are rendered much faster but you still have to wait for your colleagues requests to finish before going on ... where threaded rpc requests would make a big change, right? yes definitely but it seems i was wrong the server is threaded... i need more testing somehow it claims to be but I don't understand much of common's xmlrpc code :( *** kilo has quit IRC night all *** reinhard has quit IRC *** sjc has quit IRC *** lekma has quit IRC *** dcmwai has joined #gnuenterprise *** jcater has quit IRC *** holycow has joined #gnuenterprise *** holycow has quit IRC