http://bugs.winehq.org/show_bug.cgi?id=14827
--- Comment #19 from max@veneto.com 2009-04-24 01:46:32 --- (In reply to comment #17)
I don't have AutoCAD 2005 to test, so I can will make a guess as to why the callback function may read more bytes than the amount written. The callback may be looking for a NULL byte to determine the amount of bytes written, instead of looking at the using the cb value.
Try making the following change to add the NULL byte that native richedit controls include, and see if the fixme message still gets printed for the *pcd value.
......
eheheh... that was the first stuff I've thought.... It works, I mean, adding the NULL byte make app read the correct amount of bytes (so, I guess that one is the correct behaviour) but it hangs anyways with 100% cpu as before. So, I guess the real bug is another one, even if the null byte is (IMHO) still needed.
I've tryed many stuffs, from a complete +rich*** log, +ole*** log, many embedded print messages in all calls (ole has very few TRACEs, indeed....), but I couldn't manage to make it work. Richedit (and OLE) logs just shows that the app hangs returning from message handling function, but I couldn't find if it's inside Autocad (I think so...) or inside wine code. Autocad don't run with +relay, and the usage of a BackTrace() embedded function ( seet devel mailing list) didn't help too much.
@Austin : the log (with many printf() messages added) is already here, the first attachment. As you can see, it shows nothing :-(
Suppressing the \fonttbl output makes autocad work almost perfectly (there are some other unrelated bugs in richedit code). Native riched20 didn't help either, as already told here.
Ciao
Max