I have a C++ class CAppStruct with method RegionsToObjList() that returns a
pointer to a C++ class CElementList.
I listed a code snippet with line number.
516: CElementList* CAppStruct::RegionsToObjList() const
517: {
518: long nEntry;
519:
520:printf("%s:%s:%d\n", __FILE__, __FUNCTION__, __LINE__);
521: if (m_regions == NULL || m_nRegions <= 0)
522: {
523:printf("%s:%s:%d\n", __FILE__, __FUNCTION__, __LINE__);
524: return NULL;
525: }
526:
527:printf("%s:%s:%d\n", __FILE__, __FUNCTION__, __LINE__);
528: CElementList *pList = new CElementList();
529:
530:printf("%s:%s:%d\n", __FILE__, __FUNCTION__, __LINE__);
531: CCgmBaseObj* pObj = NULL;
532:printf("%s:%s:%d &m_nRegions=%ld\n", __FILE__, __FUNCTION__,
__LINE__, &m_nRegions);
533: for (nEntry = 0; nEntry < m_nRegions; nEntry++)
534: {
535:printf("%s:%s:%d m_nRegions=%d type=%d\n", __FILE__, __FUNCTION__,
__LINE__, m_nRegions, m_regions[nEntry].type);
.
.
.
660: }
661:
662:printf("%s:%s:%d\n", __FILE__, __FUNCTION__, __LINE__);
This is the end of the output I get when I run.
AppStruct.cpp:RegionsToObjList:520
module.js:1983
AppStruct.cpp:RegionsToObjList:527
module.js:1983
AppStruct.cpp:RegionsToObjList:530
module.js:1983
AppStruct.cpp:RegionsToObjList:532 &m_nRegions=100 module.js:1983
alignment error loading from address 5, which was expected to be
aligned to a multiple of 4
It appears to be aborting on the "for" statement. The variable "m_nRegions"
was already accessed on line 521 and didn't fail.
Any thoughts or suggestions?
Thanks
--
You received this message because you are subscribed to the Google Groups
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.