[Ecls-list] cl_boot crash

John DeSoi desoi at pgedit.com
Wed Jul 28 00:13:24 UTC 2010


I'm trying to create a 4D plugin to host ECL (OS X 10.5.8). I call cl_boot when the plugin is initialized, but 4D always crashes. If I trace under GDB, it appears to crash in GC_push_all_eager at the line "q = (ptr_t)(*p);"

I have included part of the crash report below. Unfortunately, I know just enough C to be dangerous so I don't really have a clue on what I might need to do to fix it. I have messed with the various boot options without success.

Does cl_boot have to be called from a particular thread? If so, how do I achieve that?

Thanks for any suggestions or ideas.

John DeSoi, Ph.D.

=====

void GC_push_all_eager(ptr_t bottom, ptr_t top)
{
    word * b = (word *)(((word) bottom + ALIGNMENT-1) & ~(ALIGNMENT-1));
    word * t = (word *)(((word) top) & ~(ALIGNMENT-1));
    register word *p;
    register ptr_t q;
    register word *lim;
    register ptr_t greatest_ha = GC_greatest_plausible_heap_addr;
    register ptr_t least_ha = GC_least_plausible_heap_addr;
#   define GC_greatest_plausible_heap_addr greatest_ha
#   define GC_least_plausible_heap_addr least_ha

    if (top == 0) return;
    /* check all pointers in range and push if they appear	*/
    /* to be valid.						*/
      lim = t - 1 /* longword */;
      for (p = b; p <= lim; p = (word *)(((ptr_t)p) + ALIGNMENT)) {
	q = (ptr_t)(*p);
	GC_PUSH_ONE_STACK((ptr_t)q, p);
      }
#   undef GC_greatest_plausible_heap_addr
#   undef GC_least_plausible_heap_addr
}



Thread 23 Crashed:
0   libSystem.B.dylib             	0x90b60fd6 usleep$NOCANCEL$UNIX2003 + 0
1   libSystem.B.dylib             	0x90b78685 abort + 85
2   libecl.10.4.dylib             	0x21844ca7 ecl_internal_error + 87
3   libecl.10.4.dylib             	0x21865372 sigsegv_handler + 258 (unixint.d:573)
4   libSystem.B.dylib             	0x90af82bb _sigtramp + 43
5   ???                           	0xffffffff 0 + 4294967295
6   libecl.10.4.dylib             	0x21886957 GC_push_all_stacks + 167 (darwin_stop_world.c:93)
7   libecl.10.4.dylib             	0x2188114a GC_mark_some + 570
8   libecl.10.4.dylib             	0x21878108 GC_stopped_mark + 136
9   libecl.10.4.dylib             	0x21878b99 GC_try_to_collect_inner + 153
10  libecl.10.4.dylib             	0x21882cae GC_init_inner + 926
11  libecl.10.4.dylib             	0x21875af2 init_alloc + 82 (alloc_2.d:721)
12  libecl.10.4.dylib             	0x2175acaf cl_boot + 127 (main.d:426)
13  com.4D.4DPlugin               	0x14c73fa5 InitPlugin + 53 (4DPlugin.c:69)
14  com.4D.4DPlugin               	0x14c73f5a PluginMain + 43 (4DPlugin.c:24)
15  com.4D.4DPlugin               	0x14c63d1c FourDPackex + 96 (4DPluginAPI.c:45)
16  com.4d.4d                     	0x006ec1df xercesc_2_8::InputSource::setIssueFatalErrorIfNotFound(bool) + 28959
17  com.4d.4d                     	0x006ec306 xercesc_2_8::InputSource::setIssueFatalErrorIfNotFound(bool) + 29254
18  com.4d.4d                     	0x007161f0 bool xbox::VValueBag::GetLong<ProgressIndicatorType>(xbox::StPackedDictionaryKey const&, ProgressIndicatorType&) const + 34698
19  com.4d.4d                     	0x0071a0d9 bool xbox::VValueBag::GetLong<ProgressIndicatorType>(xbox::StPackedDictionaryKey const&, ProgressIndicatorType&) const + 50803
20  com.4d.4d                     	0x0071bf56 bool xbox::VValueBag::GetLong<ProgressIndicatorType>(xbox::StPackedDictionaryKey const&, ProgressIndicatorType&) const + 58608
21  com.4d.4d                     	0x0071c191 bool xbox::VValueBag::GetLong<ProgressIndicatorType>(xbox::StPackedDictionaryKey const&, ProgressIndicatorType&) const + 59179
22  com.4d.4d                     	0x001a0920 void xbox::VValueBag::SetLong<__DB4DFieldType>(xbox::StPackedDictionaryKey const&, __DB4DFieldType) + 123300
23  com.4d.4d                     	0x001a0b31 void xbox::VValueBag::SetLong<__DB4DFieldType>(xbox::StPackedDictionaryKey const&, __DB4DFieldType) + 123829
24  com.4d.4d                     	0x001a122b void xbox::VValueBag::SetLong<__DB4DFieldType>(xbox::StPackedDictionaryKey const&, __DB4DFieldType) + 125615
25  com.4d.4d                     	0x0043d5b9 void xbox::VValueBag::SetLong<EDataFileOpeningOptions>(xbox::StPackedDictionaryKey const&, EDataFileOpeningOptions) + 116045
26  com.4d.4d                     	0x002cef96 LayoutEditor::ExtraDescriptionShown xbox::VPreferences::GetValue<LayoutEditor::ExtraDescriptionShown, xbox::VLong>(xbox::StBagKeyWithDefault<LayoutEditor::ExtraDescriptionShown, xbox::VLong> const&) const + 198432
27  com.4d.kernel                 	0x018dc357 xbox::VTask::_Run() + 103
28  com.4d.kernel                 	0x018e0edd xbox::XMacTaskMgr::XMacTaskMgr() + 429
29  com.4d.kernel                 	0x0192c280 GetCurrentFiber() + 96
30  ...ple.CoreServices.CarbonCore	0x9012593d CooperativeThread + 309
31  libSystem.B.dylib             	0x90abd155 _pthread_start + 321
32  libSystem.B.dylib             	0x90abd012 thread_start + 34

Thread 23 crashed with X86 Thread State (32-bit):
  eax: 0x00000000  ebx: 0x90b78639  ecx: 0xb018199c  edx: 0x90af9e42
  edi: 0xb0181d00  esi: 0x00000002  ebp: 0xb0181a08  esp: 0xb01819dc
   ss: 0x0000001f  efl: 0x00010286  eip: 0x90b60fd6   cs: 0x00000017
   ds: 0x0000001f   es: 0x0000001f   fs: 0x00000000   gs: 0x00000037
  cr2: 0x0243e000





More information about the ecl-devel mailing list