Re: BUG #1 2.3 alpha

new topic     » goto parent     » topic index » view thread      » older message » newer message

At 12:42 AM 12/5/2001 -0500, Euman wrote:
>Alright, this is the solution to why my program crashes
>
>I have multiple instance of txtbuff
>
>atom txtbuff declared in the main program file and,
>global atom txtbuff declared in treeview.ew
>
>version 2.2 never picked up on this and didnt complain
>
>2.3 is fixed up abit !
>
>I formally appologise to Robert
>
>Im Sorry Robert
>
>Euman

Are you sure that's it?  It looks like the code you posted is
referencing two different variables (if you just cut and pasted,
that is.)

According to your earlier post:

   include file treeview.ew
   global function filltvitem(atom Item, atom mask, atom state)
   .....<del code>.....
      txtbuff = myalloc(256)
   .....<del code>.....
      return txtbuff
   end function

And then you have:

   [ main program ]
   global atom txtbuf
   include treeview.ew
   .....<del code>.....
       itxtbuff = filltvitem(hItem, TVIF_TEXT, 0)
       item = SendMessage(id, TVM_GETITEM, 0, tvitem)
       path = {peek_zstring(txtbuff)}

Note that in treeview.ew, you reference atom <txtbuff>, and in
your main program you declare atom <txtbuf>.  You then attempt
to use atom <txtbuff> in your main code, but it has not been declared
yet, only atom <txtbuf> has.  It appears that you are using two different
atoms here, one with two trailing f's, and one with only a single trailing f.
If this is the case, version 2.2, 2.1, 1.5a etc will fail with an error as well.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu