From: <no...@so...> - 2001-06-15 05:17:55
|
Bugs item #433167, was updated on 2001-06-14 09:28 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=102228&aid=433167&group_id=2228 Category: None Group: None Status: Open >Resolution: Fixed Priority: 5 Submitted By: Allen Bell (apbell) >Assigned to: Robert Colquhoun (rjc) Summary: Problems w/ Zero length index strings Initial Comment: This is hard to explain, but if you compile LED with COMPILER_BACKEND=JAVA_SOURCE and then run it, you should see it all over the place. There appears to be a problem when an mvBasicString with type of TYPE_INDEX_AM_STRING is returned and it's length is zero (null). You get the first one of these in LED after it does a GOSUB to PARSE.REST and DELETES the first attribute of the currently null variable IDLIST. It returns an INDEX_AM_STRING with length of 0 and then tries to assign this to variable FNAM (the exact code is FNAM = BITE<1>) In mvBasicString public void set(mvConstantString mvs) It falls through a bunch of if clauses and eventually tries to take the default action of: mvs.getChars(0, newlen, resizeBuffer(newlen), 0); length = newlen; type = TYPE_BASIC_STRING; which causes a null pointer exception at mvBasicString getChars. I find if I add this little snippet immediately above this, the problem goes away (as do a bunch of others) if (newlen == 0) { data = EMPTY_STRING; length = 0; type = TYPE_BASIC_STRING; return; } ---------------------------------------------------------------------- >Comment By: Robert Colquhoun (rjc) Date: 2001-06-14 22:17 Message: Logged In: YES user_id=11445 I think i have this fixed in cvs. I did it slightly different from the above, making sure getChars works when all the values are zero. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=102228&aid=433167&group_id=2228 |