Hi Yiping Cheng, On Nov 20, 2009, at 19:10 , Yiping Cheng wrote:
> I am a new SyncML learner from China. My platform is Windows XP and > Visual Studio 6. > I am now experiencing a problem with SyncML RTK on my platform and I hope > that you could > help me out. Thank you very much in advance! > > The problem was that after I successfully made the RTK compiled, when > runing one of > the example programs (sender), an "Access Violation" always occurred. This > problem exists > for all the five versions I have downloaded (namely RTK 4.1, 4.2, 4.3, 4.4 > from SourceForge, > and the latest version extracted from LibSynthesis). For the sourceforge > versions, the > "Access Violation" exception occurred when the main function was executing > C(myStartSync(id)), > and for the latest version, the exception occurred when the main function was > executing > C(myStartMessage(id)). For all the versions, I debugged into the source code > and I found > that the exception all occurred during the execution of xltEncBlock. I think the example programs in the RTK are really really outdated. I've never used any of them during the last 9 years and I don't know anybody who has used them. My guess is that these examples were never used except by the original authors in the very beginning of the RTK development. For a real-world SyncML client, much more than the RTK is needed anyway (that's what libsynthesis is about). The RTK is fine for efficiently encoding/decoding SyncML messages, but nothing beyond that. > A similar problem occurred when the RTK was compiled using the latest > MingW develop environment > and Microsoft Visual Studio.net. I have made no modifications to the source > files other than that > I changed all #include <*.h> where *.h is not an ANSI header to #include > "*.h", and made all > the c and h files into one directory, in order that I need not additionally > specify a default > include directory. > > Therefore, should you have time, could you please take a look at the > cause of the problem? > I can send you a zip or rar file which contains all the project and source > files. Thank you very much! I can't really help with the RTK example program - but I have a quick guess what *could* be the problem: As the smlXXXX_t structs have evolved over time and got new fields, it might well be that the ancient example does not initialize all fields correctly which might then crash the encoder. So a Q&D approach could be to memset all the structs to zero, so unused fields are at least defined. The encoder/decoder itself is heavily in use by all of our products, so the API as defined in sml.h for sure works. So I'd recommend to look at libsynthesis usage of the RTK and build your program accordingly. Best Regards, Lukas Lukas Zeller ([email protected]) - Synthesis AG, SyncML Solutions & Sustainable Software Concepts [email protected], http://www.synthesis.ch _______________________________________________ os-libsynthesis mailing list [email protected] http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis
