마음의 안정을 찾기 위하여 - DecisionCube cannot be activated - 'The DecisionCube capacity is low' is reported, but incorrect
2446379
285
644
관리자새글쓰기
태그위치로그방명록
별일없다의 생각
dawnsea's me2day/2010
색상(RGB)코드 추출기(Color...
Connection Generator/2010
최승호PD, '4대강 거짓말 검...
Green Monkey**/2010
Syng의 생각
syng's me2DAY/2010
천재 작곡가 윤일상이 기획,...
엘븐킹's Digital Factory/2010
DecisionCube cannot be activated - 'The DecisionCube capacity is low' is reported, but incorrect
Delphi/Etc Tip | 2008/10/01 10:11
출처 : http://qc.codegear.com/wc/qcmain.aspx?d=2703

var
  i:integer; 
  a:Array [1..255] of TSmallintArray;
begin
  for i:=1 to 255 do
  begin
    A[i]:=TSmallIntArray.Create(0,0);
    A[i].AutoSize:=false;
    A[i].Capacity:=30000;
  end;
end;

이렇게 실행을 하면 Capacity 부분에서 그림과 같은 에러가 떨어집니다.

ELowCapacityError With message
''The DecisionCube Capacity is low. please deactivate dimensions or change the data set.'

그런데 이상한건 똑같은 소스가 노트북(인텔싱글코어)에서는 안그러는데 데스크탑(AMD 듀얼코어)에서만 그럽니다.
쓰고 있는 건 Delphi7버전입니다.
하루 종일 왜그럴까 생각해 보고 데스크탑 델파이를 재설치와 델파이 서비스팩 업그레이드도 해보았지만
도무지 감조차 오지 않습니다ㅜ
차이점이라면 CPU가 싱글이냐 듀얼이냐 차이뿐인데ㅜ
아시는 분 조언 부탁합니다.

var
  a:TSmallintArray;
begin
  A:=TSmallIntArray.Create(0,0);
  A.AutoSize:=false;
  A.Capacity:=30000;
end;

이 경우도 마찬가지입니다.

If you have a lot of physical memory or a large page file, you may find that a DecisionCube raises the following exception whenever the DecisionCube's data set is opened:

Exception class: ELowCapacityError
Message: "The DecisionCube capacity is low. Please deactivate dimensions or change the data set."

As a result, the DecisionCube cannot be activated.



Steps:
1. Open the DecisionCube's data set. This will trigger the bug.

The exception will occur whenever the sum of the available physical memory and the available page file memory exceeds 2 GBytes. This is caused by a bug in Delphi - more specifically: an integer being out of range in the procedure GetAvailableMem (unit Mxarrays).

Affected Delphi versions: Delphi 3-7



As a workaround, add a unit with the following code to your project:


{-------------------------------------------------------------------------------

        Bug workaround for 'The DecisionCube capacity is low' bug

________________________________________________________________________________

BUG DESCRIPTION
  If you have a lot of physical memory or a large page file, you may find that a
  DecisionCube raises the following exception whenever the DecisionCube's data
  set is opened:
    Exception class: ELowCapacityError
    Message: "The DecisionCube capacity is low. Please deactivate dimensions or
             change the data set."
  The exception will occur whenever the sum of the available physical memory and
  the available page file memory exceeds 2 GBytes. This is caused by a bug in
  Delphi - more specifically: an integer being out of range in the procedure
  GetAvailableMem (unit Mxarrays).

AFFECTED DELPHI VERSIONS
  Delphi 3-7 (with the DecisionCube package installed)

WORKAROUND
  Add this unit to your project.
-------------------------------------------------------------------------------}


unit DecisionCubeBugWorkaround;

interface

uses Windows, Mxarrays;

implementation

function GetAvailableMem: Integer;
const
  MaxInt: Int64 = High(Integer);
var
  MemStats: TMemoryStatus;
  Available: Int64;
begin
  GlobalMemoryStatus(MemStats);
  if (MemStats.dwAvailPhys > MaxInt) or (Longint(MemStats.dwAvailPhys) = -1) then
    Available := MaxInt
  else
    Available := MemStats.dwAvailPhys;
  if (MemStats.dwAvailPageFile > MaxInt) or (Longint(MemStats.dwAvailPageFile) = -1) then
    Inc(Available, MaxInt div 2)
  else
    Inc(Available, MemStats.dwAvailPageFile div 2);
  if Available > MaxInt then
    Result := MaxInt
  else
    Result := Available;
end;

initialization
  Mxarrays.SetMemoryCapacity(GetAvailableMem);
end.
2008/10/01 10:11 2008/10/01 10:11
Article tag list Go to top
View Comment 2
Trackback URL :: 이 글에는 트랙백을 보낼 수 없습니다
From. 명이 2008/10/01 12:41
답글달기삭제
응? 블로그 구조가 바뀐거죵???
입구가 바뀌어서 깜딱 놀래부렀다능...ㅎㅎㅎ
(아닌가 긴가 막 이래요 -_-;;)

그리움님, 저 감기걸려버렸어요 ㅠ_ㅠ

날 선선하니까 꼭 잘 챙겨 입으시고~ 감기따윈! 걸리시면 안되요~
즐거운 하루 되시고요~^^
From. 그리움(복분자주) 2008/10/01 13:23
삭제
커버(?)라는 기능이 있어서 그걸로 바꿔봤어요 ^^

헛.. 감기.... 요즘처럼 아침엔 덥고 밤에 쌀쌀한 날씨엔 더욱 조심하셔야죠! 얼렁 화이팅 하세요!

오늘 작성하신 포스팅도 너무 먹음직스럽다는..

아침에는 명이님 블로그 방문 제한을 -,.-;
PREV : [1] : NEXT
 
 
 
 
: [1] ... [482][483][484][485][486][487][488][489][490] ... [1324] :
«   2025/02   »
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28  
전체 (1324)
출판 준비 (0)
My-Pro... (41)
사는 ... (933)
블로그... (22)
My Lib... (32)
게임 ... (23)
개발관... (3)
Smart ... (1)
Delphi (93)
C Builder (0)
Object... (0)
VC, MF... (10)
Window... (1)
Open API (3)
Visual... (0)
Java, JSP (2)
ASP.NET (0)
PHP (6)
Database (12)
리눅스 (29)
Windows (25)
Device... (1)
Embedded (1)
게임 ... (0)
Web Se... (2)
Web, S... (22)
잡다한... (7)
프로젝트 (0)
Personal (0)
대통령... (13)
Link (2)