C4D Illegal Performance Error
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 26/06/2003 at 23:50, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 7.303
Platform: Windows ;
Language(s) : C.O.F.F.E.E ;---------
Hi,
I have created a plugin using C.O.F.F.E.E That plugin is just to create cubes of different sizes, and moving the points here and there. When I do so, I always get Illegal Performance problem and it shuts down my C4D. What could be the reason? Here I have sent the exact error message that I am getting.
----- Error Description -------
CINEMA_4D_XL caused an invalid page fault in
module CINEMA_4D_XL.EXE at 0187:00725d3c.
Registers:
EAX=013de8c0 CS=0187 EIP=00725d3c EFLGS=00210202
EBX=00000000 SS=018f ESP=013de8ac EBP=04abd750
ECX=00000367 DS=018f ESI=00000002 FS=3a2f
EDX=03f1e7dc ES=018f EDI=00000000 GS=0000
Bytes at CS:EIP:
8b 4f 2c 52 6a 00 81 c1 9c 31 00 00 e8 d3 b7 00
Stack dump:
00000367 00000002 013de8c0 00000000 03f1e7a4 00000000 00000000 013df9b0 00865e0b 00000008 040ff40c 013dea98 bff7b9b6 00000000 00000000 00000000 -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/06/2003 at 02:11, xxxxxxxx wrote:
That error message doesn't tell us anything. You'll have to post some code, preferably the part that you have narrowed down the problem to.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 30/06/2003 at 00:20, xxxxxxxx wrote:
Hi Michael,
Here is one of the programs which I used in my plug-in. Like this i have many programs. Pls guide me...include "asciitochar.coh" // to covert ascii character into alphabet. // Plug-ID definition var PLUGIN_ID = 911118; var vPilecapName, vHeight, vWidth, vDepth; // Plug-in DialogBox Creation class dlgPilecap : GeDialog { public: dlgPilecap(); Init(); CreateLayout(); Command(id,msg); } dlgPilecap::dlgPilecap() { super(PLUGIN_ID); } dlgPilecap::Init() { SetString(1002, "Pilecap"); // Name of the Pilecap SetFloat(1005, 200, 0, 1000, 1); // Width SetFloat(1008, 100, 0, 1000, 1); // Height SetFloat(1011, 200, 0, 1000, 1); // Depth SetFloat(1016, 0, 0, 1000, 1); // Width SetFloat(1019, 0, 0, 1000, 1); // Height SetFloat(1022, 0, 0, 1000, 1); // Depth SetFloat(1027, 0, -1000, 1000, 1); // X SetFloat(1030, 0, -1000, 1000, 1); // Y SetFloat(1033, 0, -1000, 1000, 1); // Z } dlgPilecap::CreateLayout() { SetTitle("Square Pilecap..."); AddGroupBeginH(1000,0,1,"",0); AddStaticText(1001,0,0,0,"Name ",0); AddEditText(1002,0,200,0); AddGroupEnd(); AddGroupBeginH(1003,0,1,"",0); AddStaticText(1004,0,0,0,"Width ",0); AddEditNumber(1005,0,200,0); AddGroupEnd(); AddGroupBeginH(1006,0,1,"",0); AddStaticText(1007,0,0,0,"Height ",0); AddEditNumber(1008,0,200,0); AddGroupEnd(); AddGroupBeginH(1009,0,1,"",0); AddStaticText(1010,0,0,0,"Depth ",0); AddEditNumber(1011,0,200,0); AddGroupEnd(); AddGroupBeginH(1012,0,1,"",0); AddStaticText(1013,0,0,0,"Rotation ",0); AddGroupEnd(); AddGroupBeginH(1014,0,1,"",0); AddStaticText(1015,0,0,0,"H ",0); AddEditNumber(1016,0,200,0); AddGroupEnd(); AddGroupBeginH(1017,0,1,"",0); AddStaticText(1018,0,0,0,"P ",0); AddEditNumber(1019,0,200,0); AddGroupEnd(); AddGroupBeginH(1020,0,1,"",0); AddStaticText(1021,0,0,0,"B ",0); AddEditNumber(1022,0,200,0); AddGroupEnd(); AddGroupBeginH(1023,0,1,"",0); AddStaticText(1024,0,0,0,"Position ",0); AddGroupEnd(); AddGroupBeginH(1025,0,1,"",0); AddStaticText(1026,0,0,0,"X ",0); AddEditNumber(1027,0,200,0); AddGroupEnd(); AddGroupBeginH(1028,0,1,"",0); AddStaticText(1029,0,0,0,"Y ",0); AddEditNumber(1030,0,200,0); AddGroupEnd(); AddGroupBeginH(1031,0,1,"",0); AddStaticText(1032,0,0,0,"Z ",0); AddEditNumber(1033,0,200,0); AddGroupEnd(); AddGroupBeginH(1034,0,1,"",0); AddButton(1035,0,0,0,"Insert"); AddGroupEnd(); return TRUE; } dlgPilecap::Command(id,msg) { var obj, cnt, i, j=0, cubarr, bs, ObjPilecap, conPilecap; var pt, doc, pos, activeobj_con, len; var Obj1, Obj2, mat1, mat2, vec1, vec2, PilecapPos, mid; var objFile, ptrFile; var Rot_H, Rot_P, Rot_B; var posX, posY, posZ; var vFound, temp, ObName, vStr; switch(id) { case 1035: vPilecapName = GetString(1002); vHeight = GetFloat(1008); vWidth = GetFloat(1005); vDepth = GetFloat(1011); Rot_H = GetFloat(1016); Rot_P = GetFloat(1019); Rot_B = GetFloat(1022); posX = GetFloat(1027); posY = GetFloat(1030); posZ = GetFloat(1033); doc = GetActiveDocument(); obj = GetActiveObject(doc); cnt = obj->GetPointCount(); bs = obj->GetPointSelection(); for(i=0; i<=cnt; i++) { if(bs->IsSelected(i)) { pos = obj->GetPoint(i); pos.y = pos.y + vHeight/2; break; } } if(doc->FindObject(vPilecapName)) { TextDialog("Object Name already exists!", DLG_ICONSTOP + DLG_OK); break; } // To create a Pilecap - Cube of size 200x200x200 ObjPilecap = new(PrimitiveObject); ObjPilecap->SetPrimitiveType(PRIMITIVE_CUBE); conPilecap = ObjPilecap->GetContainer(); conPilecap->SetData(PRIM_CUBE_LEN, vector(vWidth,vHeight,vDepth)); ObjPilecap->SetContainer(conPilecap); ObjPilecap->SetName(vPilecapName); doc->InsertObject(ObjPilecap,NULL,NULL); ObjPilecap->SetRotation(vector(Rot_H, Rot_P, Rot_B)); SendModelingCommand(MCOMMAND_MAKEEDITABLE, doc, ObjPilecap, conPilecap, MODIFY_ALL); ObjPilecap=doc->FindObject(vPilecapName); pos.x = pos.x + posX; pos.y = pos.y + posY; pos.z = pos.z + posZ; ObjPilecap->SetPosition(pos); GeEventAdd(REDRAW_ALL); //CHECKING PILECAP.TXT BEFORE INSERTING THE NAME objFile = GeGetRootFilename(); objFile->RemoveLast(); objFile->AddLast("Pilecap.txt"); ptrFile = new(BaseFile); ptrFile->Open(objFile, GE_READ, FILE_NODIALOG); vStr = ptrFile->ReadString(ptrFile->GetLength()); if(!vStr) vStr=" "; ptrFile->Close(); if(strstr(vStr, vPilecapName)<0) //Object already there in text file { if(ptrFile->Open(objFile, GE_APPEND)) { vPilecapName = stradd(vPilecapName, "!"); ptrFile->WriteString(vPilecapName); ptrFile->Close(); } } } } // Plug-in Menu Creation class mnuPilecap : MenuPlugin { public: mnuPilecap(); GetID(); GetName(); GetHelp(); Execute(doc); } mnuPilecap::mnuPilecap() { super(); } mnuPilecap::GetID() { return PLUGIN_ID; } mnuPilecap::GetName() { return "Square Pilecap..."; } mnuPilecap::GetHelp() { return "Creates a Square Pilecap on top of the active object..."; } mnuPilecap::Execute(doc) { //When plugin is selected, pop-up dialog box. var d = new(dlgPilecap); d->Open(TRUE,-1,-1); } main() { Register(mnuPilecap); }
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 18/07/2003 at 02:11, xxxxxxxx wrote:
Mikael, have you come across any possible reasons why my C4D shows Illegal Performance Error?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 18/07/2003 at 07:02, xxxxxxxx wrote:
Sorry, I cannot confirm the crash. Your code works fine, at least as long as a polygon object with at least one point selected is active.
Could you try to narrow down the crash to a certain part of the code? Just remove stuff until it stops crashing and then find out what you need to put in to make it crash again.
Fwiw, I'm running this in 7.303 on a WinXP PC.