From: MIGUEL A. B. L. <mb...@fe...> - 2002-01-21 15:17:39
|
Quoting MIGUEL ANGEL BLANCH LARDIN <mb...@fe...>: > Hi, I have most of the code working, but I were getting a segfault when > I were > passing as a reference ( or whatever I use ) a std::list for the exe to > the DLL. > In the exe part it worked perfectly, but on the DLL one it crashed. > > So I found google and I found this one: > > When accessing a STL object created in one DLL or EXE through a pointer > or > reference in a different DLL or EXE, you may experience an access > violation or > other serious program errors including the appearance of data corruption > or data > loss. For details see > the following article in the Microsoft Knowledge Base: > > ARTICLE-ID: Q172369 > TITLE PRB: Access Violation Caused when Accessing STL Object in DLL > > > Is this problem Microsoft specific? > I will keep looking for a solution to this problem an once I fix it, I > will commit my modifications. Seems that the problem is a "feature" of Microsoft VisualC So again we have that options: - Remove Plugin Architecture ( and use Uli's libarianneclient idea ). - Remove STL of client code that must communicate with DLLs. - Investigate if STLPort solve the problem. In my opinion, we MUST not remove STL from Client, STL seems to be good and stable, so it would be a waste of time to develop an alternative. We shouldn't neither remove the PluginArchitecture as it is a great way of supporting several style of renderer easily. So unless STLPort I have a kalandraka that will do the work. Before passing WorldLite to the DLL we serialize it in a Uint8 * array, no vector is not valid neither... and in DLL we build again it... This will work but it will have a serious drawback on efficience. Seems that STLPort could solve the problem. http://www.stlport.com/dcforum/DCForumID6/729.html I will verify as soon as possible and report back. Regards, Miguel |