Hi, Firstly - what on earth is safemalloc()? It seems to be documented in old patches to the perl 5.005 API, but not since then.
Secondly - safemalloc() seems to fail when reserving space for text label strings in the InsertItem function of TreeView.xs. The samples/pmx.pl file distributed with the Win32::GUI 665 PPM is a good example of the crash, just comment out "use blib" at the start. It probably won't crash on your machine (since I'm guessing this is dependent on circumstance). The crash varies. Sometimes it is a null pointer assignment (memory at "0x0000000" could not be "written"). Sometimes it is an access violation. I don't understand why safefree is doing this, it's only allocating 3 or 4 bytes of RAM so it's not like that's a problem. The line is: pszText = (LPSTR) safemalloc(tlen); tlen is defined OK. Is there something that we should be using instead of safemalloc() because safemalloc does not appear to be safe. Steve