View Single Post
Old 08-27-2010, 06:03 AM   #28
Human being with feelings
Join Date: Mar 2009
Posts: 256

I just switched from the 8da3756 commit version back to my version and opening projects that had been saved with 8da3756 caused reaper to crash like this:

	0x18940b72 WDL_HeapBuf::Resize(int, bool) + 458 (heapbuf.h:245)
	0x18940f02 WDL_TypedBuf<unsigned char>::Resize(int, bool) + 44 (heapbuf.h:294)
	0x18940f56 int ByteChunk::Put<int>(int const*) + 56
	0x18940fbe ByteChunk::PutStr(char const*) + 62 (Containers.h:194)
	0x1893e636 Indus::SerializeState(ByteChunk*) + 188 (Indus.cpp:228)
	0x1897e69e IPlugBase::RestorePreset(int) + 158
	0x1897e83a IPlugBase::UnserializePresets(ByteChunk*, int) + 326
	0x18982b0f IPlugVST::VSTDispatcher(AEffect*, int, int, int, void*, float) + 2079
I added this hacky code into UnserializePresets:

    char *t = name.Get();
    for (int j=0; ; j++) {
      if (t[j]='\0') break;
      if (j >  MAX_PRESET_NAME_LEN) return 0;
Which got rid of the crashes, I could then resave the projects and then take the hacky code out. And all is well again.

Or maybe we could keep some check like that in there anyway?
cc_ is offline   Reply With Quote