I tried the mock and didn't find anything plausible. BSTR is OK. J retains the ownership of the argument of property_put, so the callee is supposed to make a copy. But that doesn't contradict with other uses: Scripting.Dictionary works fine with that; ListView itself makes its own separate copies as seen assigning two different values to two columns. I don't see any merit in pursuing to change this behavior. So it may well be really a bug in the ListView component, though suspicious given its exposure. Also it does not happen in VB 6 version of the ActiveX, MSComctlLib.ListViewCtrl.2. Since there is an easy workaround it can remain an unsolved mystery.
----- Original Message ---- From: Oleg Kobchenko <[EMAIL PROTECTED]> To: Beta forum <[email protected]> Sent: Friday, July 21, 2006 1:54:39 PM Subject: Re: [Jbeta] another ole crash Thank you for looking into it. As I said, it's a wierd mystery. I was suspecting maybe passing a slightly off value, like incorrect BSTR. But, let me try first to mock the indexer and see what it gets. ----- Original Message ---- From: Eric Iverson <[EMAIL PROTECTED]> To: Beta forum <[email protected]> Sent: Friday, July 21, 2006 11:41:56 AM Subject: Re: [Jbeta] another ole crash At first I assumed another utf-8 bug. But I have stepped through the code very carefully and can't find anything wrong. My regretful (and possibly incorrect) conclusion is that this is a bug in the control and that for successful use you must set subitems in order. The fact that j504 always works and j601 always crashes argues against this theory, but I can't find any problem in the J code. Lots of additional experiments to isolate the problem only reinforce for me that the problem is not in the J601 code. An example that makes this conclusion a bit clearer is to create and show the list with several more columns and then do the oleset of subitems in immediate execution. Do them in order and they always work. Do one out of order and it always crashes. The J code for oleset is fairly simple and looks to be correct. Any additional info or examples of other controls that work with 504 and fail with 601 would be welcome. ----- Original Message ----- From: "Oleg Kobchenko" <[EMAIL PROTECTED]> To: "Beta forum" <[email protected]> Sent: Thursday, July 20, 2006 6:34 AM Subject: [Jbeta] another ole crash > Here's another OLE crash. It happens when an indexed property > (SubItems) has a gap (commented below). Although the crash > occurs inside the external COM and on a different method call (view > change), > it does not happen in j504. > It happens in beta p, but was also in beta o. > > F=: 0 : 0 > pc f; > xywh 6 6 300 94;cc lv ocx:COMCTL.ListViewCtrl.1 rightmove bottommove; > xywh 6 104 34 11;cc tog button topmove bottommove;cn "Toggle"; > pas 6 6;pcenter; > rem form end; > ) > f_run=: 3 : 0 > wd F > wd 'oleget lv base ListItems;oleid lv ListItems' > wd 'oleget lv base ColumnHeaders;oleid lv ColumnHeaders' > wd 'olemethod lv ColumnHeaders add ,, Name 50 0' > wd 'olemethod lv ColumnHeaders add ,, Value 50 1' > wd 'olemethod lv ColumnHeaders add ,, Type 50 2' > wd 'olemethod lv ListItems add ,, one;oleid lv cur' > NB. wd 'oleset lv cur subitems 1 *123' > wd 'oleset lv cur subitems 2 *456' > wd 'oleset lv base view 2' > wd 'pshow;' > ) > f_tog_button=: 3 : 0 > wd 'oleset lv base view 3' > ) > f_close=: wd bind 'pclose' > f_run'' > > > ----- Original Message ---- > From: Eric Iverson <[EMAIL PROTECTED]> > To: Beta forum <[email protected]> > Sent: Tuesday, July 11, 2006 10:02:56 PM > Subject: Re: [Jbeta] ole picture/object references > > > Thanks for the clean examples. The bug for both picture and object is > fixed in the next beta. > > ----- Original Message ----- > From: "Oleg Kobchenko" <[EMAIL PROTECTED]> > To: "Beta forum" <[email protected]> > Sent: Tuesday, July 11, 2006 5:15 PM > Subject: Re: [Jbeta] ole picture/object references > > >> Here's a script* for object error: works in j504, not in j601: >> >> tx3=: 3 : 0 >> wd 'pc xp' >> wd 'cc x oleautomation:MSXML2.DOMDocument' >> wd 'olemethod x base createElement *root' >> wd 'olemethod x base appendChild !object:.x.temp' >> smoutput wd 'oleget x base xml' >> wd 'psel xp; pclose;' >> ) >> tx3'' >> |domain error: wd >> | wd'olemethod x base appendChild !object:.x.temp' >> wd'qer' >> bad parameter : 0 >> >> Should be: >> >> <root/> >> >> I will make next one with picture. >> >> >> ______________________ >> * Also with id instead of temp: same behavior >> >> tx4=: 3 : 0 >> wd 'pc xp' >> wd 'cc x oleautomation:MSXML2.DOMDocument' >> wd 'olemethod x base createElement *root' >> wd 'oleid x root' >> wd 'olemethod x base appendChild !object:.x.root' >> smoutput wd 'oleget x base xml' >> wd 'psel xp; pclose;' >> ) >> >> >> ----- Original Message ---- >> From: Eric Iverson <[EMAIL PROTECTED]> >> To: Beta forum <[email protected]> >> Sent: Tuesday, July 11, 2006 3:12:47 PM >> Subject: Re: [Jbeta] ole picture/object references >> >> >> There were lots of fiddly changes to OLE for J601 (mostly due to >> UTF-8). >> This bug is likely due to those changes. It would help me if you >> could >> give the simplest script that demonstrates the bug using a dead >> standard >> ole object that I will have on a default XP system. >> >> ----- Original Message ----- >> From: "Oleg Kobchenko" <[EMAIL PROTECTED]> >> To: "Beta forum" <[email protected]> >> Sent: Tuesday, July 11, 2006 12:10 PM >> Subject: [Jbeta] ole picture/object references >> >> >>> In j601, ole picture/object references produce errors, while they >>> work >>> in j504. >>> >>> wd 'olemethod img listimages add ,, >>> !picture:user\classes\ole\n.ico' >>> |domain error: wd >>> | wd'olemethod '... >>> wd'qer' >>> ole - Type mismatch : 0 >>> >>> See more at >>> http://www.jsoftware.com/jwiki/System/Library/Bugs >>> >>> Are there any ole changes in j601? > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
