Thread: [cx-oracle-users] Segmentation fault with custom cursor
Brought to you by:
atuining
From: <wa...@li...> - 2004-07-22 10:32:40
|
I'm having problems with implementing custom cursors. A minimal failing example is this: from cx_Oracle import * class Cursor2(Cursor): pass class Connection2(Connection): def cursor(self): return Cursor2() db = Connection2("...") c = db.cursor() Executing this gives me a Segmentation fault. I'm on Linux using cx_Oracle 4.0.1 with Anthony's patch for the NVARCHAR/UTF16 problem. Bye, Walter Dörwald |
From: Anthony T. <an...@co...> - 2004-07-22 14:23:36
|
I am on vacation right now so I can't test this myself. Perhaps you could try it with the shipping cx_Oracle as well? Just before I left on vacation I received an e-mail from someone with respect to the patch you mention -- I am thinking of reversing it as a result of that e-mail as it turns out that the problem is an Oracle bug and the issues I discussed with you (about unicode and the like) are much worse than I imagined. I'll get back to you with some more information when I return (first week of August). Walter Dörwald wrote: > I'm having problems with implementing custom cursors. > A minimal failing example is this: > > from cx_Oracle import * > > class Cursor2(Cursor): > pass > > class Connection2(Connection): > def cursor(self): > return Cursor2() > > db = Connection2("...") > c = db.cursor() > > Executing this gives me a Segmentation fault. I'm on Linux using > cx_Oracle 4.0.1 with Anthony's patch for the NVARCHAR/UTF16 problem. > > Bye, > Walter Dörwald > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: <wa...@li...> - 2004-07-26 11:10:24
|
Anthony Tuininga wrote: > I am on vacation right now so I can't test this myself. Perhaps you > could try it with the shipping cx_Oracle as well? I reinstalled the release version of cx_Oracle 4.0.1 and it still gives me a segmentation fault. > Just before I left on > vacation I received an e-mail from someone with respect to the patch you > mention -- I am thinking of reversing it as a result of that e-mail as > it turns out that the problem is an Oracle bug Do we have any change of getting this bug fixed? > and the issues I > discussed with you (about unicode and the like) are much worse than I > imagined. I'll get back to you with some more information when I return > (first week of August). OK! Bye, Walter Dörwald |
From: Anthony T. <an...@co...> - 2004-09-01 21:29:34
|
Ok, I should have looked at this a little more closely a little sooner, such as before I released 4.1 beta1 :-) The problem with your code is that you need to pass the connection through to the constructor of the cursor. Failing to do so does in fact yield a segfault which I have fixed and that fix will be included in 4.1 final when it is released. If you have any further questions, fire away. :-) Walter Dörwald wrote: > I'm having problems with implementing custom cursors. > A minimal failing example is this: > > from cx_Oracle import * > > class Cursor2(Cursor): > pass > > class Connection2(Connection): > def cursor(self): > return Cursor2() > > db = Connection2("...") > c = db.cursor() > > Executing this gives me a Segmentation fault. I'm on Linux using > cx_Oracle 4.0.1 with Anthony's patch for the NVARCHAR/UTF16 problem. > > Bye, > Walter Dörwald > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users -- Anthony Tuininga an...@co... Computronix Distinctive Software. Real People. Suite 200, 10216 - 124 Street NW Edmonton, AB, Canada T5N 4A3 Phone: (780) 454-3700 Fax: (780) 454-3838 http://www.computronix.com |
From: <wa...@li...> - 2004-09-08 13:04:14
|
Anthony Tuininga wrote: > Ok, I should have looked at this a little more closely a little sooner, > such as before I released 4.1 beta1 :-) The problem with your code is > that you need to pass the connection through to the constructor of the > cursor. OK, with the change: class Connection2(Connection): def cursor(self): return Cursor2(self) it works. > Failing to do so does in fact yield a segfault which I have > fixed and that fix will be included in 4.1 final when it is released. If > you have any further questions, fire away. :-) Everything's working fine now. Servus, Walter |