Проблема с API

Roman
Posts: 2
Joined: Mon Jul 18, 2005 07:35

Проблема с API

Postby Roman » Wed Jul 20, 2005 07:06

Здравствуйте! Помогите, пожалуйста, решить возникшую у нас проблему.
Мы разрабатываем программное обеспечение под операционной системой OS/2 Warp в среде Borland C++ for OS/2 версия 2.0. Решили обновить операционку на новую – eComStation версия 1.2. Но программы, написанные в OS/2 Warp не работают. Точнее они работают некоторое время, после чего выгружаются без каких-либо сообщений. В течение этого времени загрузка процессора постепенно растет (начиная с 2 %) и на уровне приблизительно 25% программа закрывается. Опытным путем мы определили, что некорректно работают оконные функции, связанные с установкой параметров отрисовки, а в частности WinSetPresParam(hwnd, PP_FOREGRAUNDCOLORINDEX, …), WinSetPresParam(hwnd, PP_BACKGRAUNDCOLORINDEX, …) и тому подобные. Как мы предполагаем, дело в различном подходе к распределению памяти в OS/2 Warp и eComStation. Как выйти из сложившейся ситуации?

ErOs2
Posts: 5
Joined: Wed Jul 20, 2005 10:44
Contact:

Postby ErOs2 » Wed Jul 20, 2005 10:54

Странная проблема.
Единственная разница в использовании API на Warp 3 и с более новыми версиями состоит в том, что для Warp 4 и выше HAB должен быть обязательно корректным, полученным с помощью функции WinInitialize(). Более же ранние версии работали и в том случае, если хаб просто 0.

В общем, давайте разбираться с проблемой.
1. Везде ли, где используется хаб он получен с помощью WinInitialize?
2. WinSetPresParam - почему вы решили что не работают именно эти функции? Какая ошибка возникает?
3. У борланда есть проблема с управлением стеком в тредах. Используете ли вы в своей программе функцию _beginthread?

User avatar
Papa Karlo
Posts: 36
Joined: Tue Jun 28, 2005 16:52

Postby Papa Karlo » Wed Jul 20, 2005 13:08

Штатных медиумов тут нет, поэтому нужно поступить штатным образом.
Т.е. родить маленький исходник, на котором эта проблема проявляется, и показать его народу.

90% - что это проблема не API

Roman
Posts: 2
Joined: Mon Jul 18, 2005 07:35

Собственно исходник

Postby Roman » Fri Jul 29, 2005 14:00

/*************************************************************************
*
* File Name : STYLE.H
*
************************************************************************/

#define IDD_MSGBOX 1001

#define IDS_BLUE 50
#define IDS_RED 51
#define IDS_PINK 52
#define IDS_GREEN 53
#define IDS_CYAN 54
#define IDS_YELLOW 55
#define IDS_DARKGRAY 56
#define IDS_DARKBLUE 57
#define IDS_DARKRED 58
#define IDS_DARKPINK 59
#define IDS_DARKGREEN 60
#define IDS_DARKCYAN 61
#define IDS_BROWN 62
#define IDS_PALEGRAY 63
#define IDS_DEFAULT 64
#define IDS_WARNING 65
#define IDS_FIRSTCOLOR IDS_BLUE

#define IDMSG_CANNOTLOADSTRING 11
#define IDMSG_CANNOTSETPP 26

#define IDD_PPDEMODLG 10007

#define IDC_EXIT 2
#define IDC_FORECOLORLIST 119
#define IDC_BACKCOLORLIST 120
#define IDC_SAMPLETEXT 322
#define IDC_START_TIMER 422
#define IDC_STOP_TIMER 423
#define IDC_DELAY_TIMER 424


/*************************************************************************
*
* File Name : STYLE.CPP
*
*************************************************************************/
#define INCL_WIN
#include <os2.h>
#include <string.h>
#include "style.h"


#define MESSAGELEN 100 /* maximum length for messages */
#define COLORNAMELEN 20
#define NUMCOLORS 15 /* number of colors used in PP Demo */

#define TIMER_DELAY 250UL
#define CONTROLS_COUNT 24

/* Global variables */
static ULONG ulTimerId = 0;
static LONG DelayTimer = TIMER_DELAY;
static CHAR apszPresParamColor[NUMCOLORS][COLORNAMELEN];
/*
* Set up an array of colors in the same order as the stringtable constants
*/
static ULONG aulColor[NUMCOLORS-1] =
{ CLR_BLUE, CLR_RED, CLR_PINK, CLR_GREEN, CLR_CYAN,
CLR_YELLOW, CLR_DARKGRAY, CLR_DARKBLUE, CLR_DARKRED,
CLR_DARKPINK, CLR_DARKGREEN, CLR_DARKCYAN, CLR_BROWN,
CLR_PALEGRAY };

HAB hab;
HMQ hmq;
QMSG qmsg;
HWND hwndMain;

/* Entry point declarations */
SHORT MessageBox(HWND hwndOwner, SHORT idMsg, SHORT fsStyle, BOOL fBeep);
BOOL InitPresParamDemoDlg(HWND hwnd);
BOOL UpdatePresParamDemoDlg(HWND hwnd);
MRESULT EXPENTRY PresParamDemoDlgProc(HWND hwnd, USHORT msg, MPARAM mp1, MPARAM mp2);

void main(int argc, char* argv[]) {
if(!(hab = WinInitialize(0))) { WinAlarm(HWND_DESKTOP, WA_ERROR); return; }
if(!(hmq = WinCreateMsgQueue(hab, 256))) { WinAlarm(HWND_DESKTOP, WA_ERROR); WinTerminate(hab); return; }
WinDlgBox(HWND_DESKTOP, HWND_DESKTOP, (PFNWP)PresParamDemoDlgProc, NULLHANDLE, IDD_PPDEMODLG, (PVOID)NULL);
WinDestroyMsgQueue(hmq); WinTerminate(hab);
}



/*****************************************************************/
MRESULT EXPENTRY PresParamDemoDlgProc( HWND hwnd, USHORT msg,
MPARAM mp1, MPARAM mp2)
{
switch(msg)
{
case WM_INITDLG:
hwndMain = hwnd;
if (!InitPresParamDemoDlg(hwnd)) WinPostMsg(hwnd, WM_CLOSE, NULL, NULL);
else WinEnableControl(hwnd, IDC_STOP_TIMER, FALSE);
return (MRESULT)FALSE;
case WM_TIMER:
WinStopTimer(hab, hwnd, ulTimerId);
UpdatePresParamDemoDlg(hwnd);
WinSendDlgItemMsg(hwnd, IDC_DELAY_TIMER, SPBM_QUERYVALUE, (MPARAM)&DelayTimer, MPFROM2SHORT(0, SPBQ_UPDATEIFVALID));
ulTimerId = WinStartTimer(hab, hwnd, 1, DelayTimer);
break;
case WM_COMMAND:
switch(SHORT1FROMMP(mp1))
{
case IDC_EXIT:
WinPostMsg(hwnd, WM_CLOSE, NULL, NULL);
break;

case IDC_START_TIMER:
WinSendDlgItemMsg(hwnd, IDC_DELAY_TIMER, SPBM_QUERYVALUE, (MPARAM)&DelayTimer, MPFROM2SHORT(0, SPBQ_UPDATEIFVALID));
ulTimerId = WinStartTimer(hab, hwnd, 1, DelayTimer);
WinEnableControl(hwnd, IDC_STOP_TIMER, TRUE);
WinEnableControl(hwnd, IDC_START_TIMER, FALSE);
WinEnableControl(hwnd, IDC_DELAY_TIMER, FALSE);
break;
case IDC_STOP_TIMER:
WinStopTimer(hab, hwnd, ulTimerId); ulTimerId = 0;
WinEnableControl(hwnd, IDC_DELAY_TIMER, TRUE);
WinEnableControl(hwnd, IDC_START_TIMER, TRUE);
WinEnableControl(hwnd, IDC_STOP_TIMER, FALSE);
break;
default:
break;
}
break;
case WM_CLOSE:
if (ulTimerId != 0) WinStopTimer(hab, hwnd, ulTimerId);
WinPostMsg(hwnd, WM_QUIT, NULL, NULL);
break;
default: return(WinDefDlgProc(hwnd, msg, mp1, mp2));
}
return (MRESULT)0;
}

/*********************************************************************/
BOOL InitPresParamDemoDlg(HWND hwnd)
{
HWND hwndTemp;
ULONG ulCounter;
MRESULT mresult;

/* Load the color table */
for (ulCounter = 0; ulCounter < NUMCOLORS; ulCounter++)
{
if (!WinLoadString(hab, (HMODULE)0, (ulCounter + IDS_FIRSTCOLOR),
COLORNAMELEN, (PSZ)apszPresParamColor[ulCounter]))
{
MessageBox(hwndMain, IDMSG_CANNOTLOADSTRING, MB_OK | MB_ERROR, FALSE);
return FALSE;
}
}
/* Load foreground color combo box */
hwndTemp = WinWindowFromID(hwnd, IDC_FORECOLORLIST);

for(ulCounter = 0; ulCounter < NUMCOLORS; ulCounter++)
{
mresult = WinSendMsg(hwndTemp, LM_INSERTITEM,
MPFROMSHORT(LIT_SORTASCENDING),
MPFROMP((PSZ)apszPresParamColor[ulCounter]));

if (((SHORT)mresult) == LIT_ERROR || ((SHORT)mresult) == LIT_MEMERROR)
{
MessageBox(hwndMain, IDMSG_CANNOTLOADSTRING, MB_OK | MB_ERROR, FALSE);
return FALSE;
}
}
/* Load background color combo box */
hwndTemp = WinWindowFromID(hwnd, IDC_BACKCOLORLIST);

for(ulCounter = 0; ulCounter < NUMCOLORS; ulCounter++)
{
mresult = WinSendMsg(hwndTemp, LM_INSERTITEM,
MPFROMSHORT(LIT_SORTASCENDING),
MPFROMP((PSZ)apszPresParamColor[ulCounter]));

if (((SHORT)mresult) == LIT_ERROR || ((SHORT)mresult) == LIT_MEMERROR)
{
MessageBox(hwndMain, IDMSG_CANNOTLOADSTRING, MB_OK | MB_ERROR, FALSE);
return FALSE;
}
}

WinSendDlgItemMsg(hwnd, IDC_FORECOLORLIST, LM_SELECTITEM, MPFROMSHORT(0), MPFROMSHORT(TRUE));
WinSendDlgItemMsg(hwnd, IDC_BACKCOLORLIST, LM_SELECTITEM, MPFROMSHORT(NUMCOLORS - 1), MPFROMSHORT(TRUE));
WinSendDlgItemMsg(hwnd, IDC_DELAY_TIMER, SPBM_SETLIMITS, MPFROMLONG(5000), 0);
WinSendDlgItemMsg(hwnd, IDC_DELAY_TIMER, SPBM_SETCURRENTVALUE, MPFROMLONG(TIMER_DELAY), 0);
return TRUE;
}

/*********************************************************************/
BOOL UpdatePresParamDemoDlg(HWND hwnd)
{
HWND hwndTemp1, hwndTemp2, hwndSampleText;
CHAR pszTemp1[COLORNAMELEN], pszTemp2[COLORNAMELEN];
ULONG ulColor, ulPresParams, j;
SHORT sCounter;


/* Get the text of the foreground color combobox */
hwndTemp1 = WinWindowFromID(hwnd, IDC_FORECOLORLIST);

if (WinQueryWindowText(hwndTemp1, COLORNAMELEN, (PSZ)pszTemp1))
{
/* Find the text in the list of color names */
sCounter = 0;
while (sCounter < NUMCOLORS)
{
if (!strcmp(pszTemp1, apszPresParamColor[sCounter]))
{
ulColor = aulColor[sCounter]; break;
}
else sCounter++;
}

/*
* If color is not default, set the color. If the default is
* selected, then remove the color presentation parameter if
* it exists. If the value is not a valid color, then don't
* don't do anything
*/
if (sCounter < NUMCOLORS)
{
sCounter += IDS_FIRSTCOLOR;

for (j = 0; j < CONTROLS_COUNT; j++) {

hwndSampleText = WinWindowFromID(hwnd, IDC_SAMPLETEXT + j);
if (sCounter < IDS_DEFAULT)
{
if (!WinSetPresParam(hwndSampleText, PP_FOREGROUNDCOLORINDEX,
(ULONG)sizeof(LONG), (PVOID)&ulColor))
{
MessageBox(hwndMain, IDMSG_CANNOTSETPP, MB_OK | MB_ERROR, FALSE);
}
}
else
{
/*
* If setting presentation parameter to the default, remove
* the presentation parameter, but only if it has been
* set
*/
if (sCounter == IDS_DEFAULT &&
WinQueryPresParam(hwndSampleText, PP_FOREGROUNDCOLORINDEX,
0, &ulPresParams, (ULONG)sizeof(LONG), (PVOID)&ulColor,
QPF_NOINHERIT) != 0)
{
if (!WinRemovePresParam(hwndSampleText,
PP_FOREGROUNDCOLORINDEX))
{
MessageBox(hwndMain, IDMSG_CANNOTSETPP, MB_OK | MB_ERROR, FALSE);
}
}
}
} // for

}
}

/* Do the same for the background color combobox */
hwndTemp2 = WinWindowFromID(hwnd, IDC_BACKCOLORLIST);
if (WinQueryWindowText(hwndTemp2, COLORNAMELEN, (PSZ)pszTemp2))
{
/* Find the text in the list of color names */
sCounter = 0;
while (sCounter < NUMCOLORS)
{
if (!strcmp(pszTemp2, apszPresParamColor[sCounter]))
{
ulColor = aulColor[sCounter]; break;
}
else sCounter++;
}

/*
* If color is not default, set the color. If the default is
* selected, then remove the color presentation parameter. If
* the value is not a valid color, the don't do anything
*/
if (sCounter < NUMCOLORS)
{
sCounter += IDS_FIRSTCOLOR;

for (j = 0; j < CONTROLS_COUNT; j++) {

hwndSampleText = WinWindowFromID(hwnd, IDC_SAMPLETEXT + j);
if (sCounter < IDS_DEFAULT)
{
if (!WinSetPresParam(hwndSampleText, PP_BACKGROUNDCOLORINDEX,
(ULONG)sizeof(LONG), (PVOID)&ulColor))
{
MessageBox(hwndMain, IDMSG_CANNOTSETPP, MB_OK | MB_ERROR, FALSE);
}
}
else
{
if (sCounter == IDS_DEFAULT &&
WinQueryPresParam(hwndSampleText,
PP_BACKGROUNDCOLORINDEX, 0, &ulPresParams, (ULONG)sizeof(LONG),
(PVOID)&ulColor, QPF_NOINHERIT) != 0)
{
if (!WinRemovePresParam(hwndSampleText,
PP_BACKGROUNDCOLORINDEX))
{
MessageBox(hwndMain, IDMSG_CANNOTSETPP, MB_OK | MB_ERROR, FALSE);
}
}
}

} // for

}
}

WinSetWindowText(hwndTemp1, pszTemp2);
WinSetWindowText(hwndTemp2, pszTemp1);

return TRUE;
}
/*********************************************************************/
SHORT MessageBox(HWND hwndOwner, SHORT idMsg, SHORT fsStyle, BOOL fBeep)
{
CHAR szText[MESSAGELEN];
CHAR szTitle[MESSAGELEN];
PSZ pszTitle = NULL;

if(!WinLoadMessage(hab, (HMODULE)NULL, idMsg, MESSAGELEN, (PSZ)szText))
{
WinAlarm(HWND_DESKTOP, WA_ERROR); return MBID_ERROR;
}

if(fBeep) WinAlarm(HWND_DESKTOP, WA_ERROR);

if ( (fsStyle & MB_WARNING)
&& WinLoadString(hab, (HMODULE)0, IDS_WARNING, MESSAGELEN, szTitle) )
pszTitle = szTitle;
else pszTitle = NULL; /* default to error title */

return(WinMessageBox(HWND_DESKTOP, hwndOwner, szText, pszTitle, IDD_MSGBOX, fsStyle));

}
/*********************************************************************/








/*************************************************************************
*
* File Name : STYLE.RC
*
*************************************************************************/
#include <os2.h>
#include "style.h"

STRINGTABLE
{
IDS_BLUE "Blue"
IDS_RED "Red"
IDS_PINK "Pink"
IDS_GREEN "Green"
IDS_CYAN "Cyan"
IDS_YELLOW "Yellow"
IDS_DARKGRAY "Dark Gray"
IDS_DARKBLUE "Dark Blue"
IDS_DARKRED "Dark Red"
IDS_DARKPINK "Dark Pink"
IDS_DARKGREEN "Dark Green"
IDS_DARKCYAN "Dark Cyan"
IDS_BROWN "Brown"
IDS_PALEGRAY "Pale Gray"
IDS_DEFAULT "Default"
IDS_WARNING "Warning"
}

MESSAGETABLE
{
IDMSG_CANNOTLOADSTRING "Failed to load string."
IDMSG_CANNOTSETPP "Error setting presentation parameters."
}


DLGTEMPLATE IDD_PPDEMODLG
BEGIN
DIALOG "Style", IDD_PPDEMODLG, 15, 4, 240, 112, FS_NOBYTEALIGN | WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR
BEGIN
RTEXT "~Foreground:", 256, 100, 96, 60, 8, SS_TEXT | DT_RIGHT | DT_TOP | DT_MNEMONIC | WS_VISIBLE | NOT WS_GROUP
CONTROL "", IDC_FORECOLORLIST, 165, 62, 64, 42, WC_COMBOBOX, CBS_DROPDOWNLIST | WS_TABSTOP | WS_VISIBLE
RTEXT "~Background:", 258, 100, 76, 60, 8, SS_TEXT | DT_RIGHT | DT_TOP | DT_MNEMONIC | WS_VISIBLE | NOT WS_GROUP
CONTROL "", IDC_BACKCOLORLIST, 165, 42, 64, 43, WC_COMBOBOX, CBS_DROPDOWNLIST | WS_TABSTOP | WS_VISIBLE
LTEXT "No", IDC_SAMPLETEXT, 4, 94, 10, 10, SS_TEXT | DT_CENTER | DT_VCENTER | WS_VISIBLE | NOT WS_GROUP
LTEXT "No", IDC_SAMPLETEXT +1, 28, 94, 10, 10, SS_TEXT | DT_CENTER | DT_VCENTER | WS_VISIBLE | NOT WS_GROUP
LTEXT "No", IDC_SAMPLETEXT +2, 52, 94, 10, 10, SS_TEXT | DT_CENTER | DT_VCENTER | WS_VISIBLE | NOT WS_GROUP
LTEXT "No", IDC_SAMPLETEXT +3, 76, 94, 10, 10, SS_TEXT | DT_CENTER | DT_VCENTER | WS_VISIBLE | NOT WS_GROUP
PUSHBUTTON "Exit", IDC_EXIT, 185, 3, 38, 13, BS_PUSHBUTTON | BS_DEFAULT | WS_VISIBLE | WS_TABSTOP
LTEXT "No", IDC_SAMPLETEXT +4, 4, 77, 10, 10, SS_TEXT | DT_CENTER | DT_VCENTER | WS_VISIBLE | NOT WS_GROUP
LTEXT "No", IDC_SAMPLETEXT +5, 28, 77, 10, 10, SS_TEXT | DT_CENTER | DT_VCENTER | WS_VISIBLE | NOT WS_GROUP
LTEXT "No", IDC_SAMPLETEXT +6, 52, 77, 10, 10, SS_TEXT | DT_CENTER | DT_VCENTER | WS_VISIBLE | NOT WS_GROUP
LTEXT "No", IDC_SAMPLETEXT +7, 76, 77, 10, 10, SS_TEXT | DT_CENTER | DT_VCENTER | WS_VISIBLE | NOT WS_GROUP
CONTROL "No", IDC_SAMPLETEXT +8, 4, 57, 14, 14, WC_BUTTON, BS_PUSHBUTTON | WS_VISIBLE | WS_TABSTOP
CONTROL "No", IDC_SAMPLETEXT +9, 27, 57, 14, 14, WC_BUTTON, BS_PUSHBUTTON | WS_VISIBLE | WS_TABSTOP
CONTROL "No", IDC_SAMPLETEXT +10, 50, 57, 14, 14, WC_BUTTON, BS_PUSHBUTTON | WS_VISIBLE | WS_TABSTOP
CONTROL "No", IDC_SAMPLETEXT +11, 73, 57, 14, 14, WC_BUTTON, BS_PUSHBUTTON | WS_VISIBLE | WS_TABSTOP
CONTROL "No", IDC_SAMPLETEXT +12, 4, 38, 14, 14, WC_BUTTON, BS_PUSHBUTTON | WS_VISIBLE | WS_TABSTOP
CONTROL "No", IDC_SAMPLETEXT +13, 27, 38, 14, 14, WC_BUTTON, BS_PUSHBUTTON | WS_VISIBLE | WS_TABSTOP
CONTROL "No", IDC_SAMPLETEXT +14, 50, 38, 14, 14, WC_BUTTON, BS_PUSHBUTTON | WS_VISIBLE | WS_TABSTOP
CONTROL "No", IDC_SAMPLETEXT +15, 73, 38, 14, 14, WC_BUTTON, BS_PUSHBUTTON | WS_VISIBLE | WS_TABSTOP
CONTROL "Start", IDC_START_TIMER, 132, 30, 38, 14, WC_BUTTON, BS_PUSHBUTTON | WS_VISIBLE | WS_TABSTOP
CONTROL "Stop", IDC_STOP_TIMER, 185, 30, 38, 14, WC_BUTTON, BS_PUSHBUTTON | WS_VISIBLE | WS_TABSTOP
CONTROL "No", IDC_SAMPLETEXT +16, 5, 22, 12, 10, WC_ENTRYFIELD, ES_CENTER | ES_MARGIN | ES_ANY | WS_VISIBLE | WS_TABSTOP
PRESPARAMS PP_BACKGROUNDCOLORINDEX , 15L
CONTROL "No", IDC_SAMPLETEXT +17, 28, 22, 12, 10, WC_ENTRYFIELD, ES_CENTER | ES_MARGIN | ES_ANY | WS_VISIBLE | WS_TABSTOP
PRESPARAMS PP_BACKGROUNDCOLORINDEX , 15L
CONTROL "No", IDC_SAMPLETEXT +18, 51, 22, 12, 10, WC_ENTRYFIELD, ES_CENTER | ES_MARGIN | ES_ANY | WS_VISIBLE | WS_TABSTOP
PRESPARAMS PP_BACKGROUNDCOLORINDEX , 15L
CONTROL "No", IDC_SAMPLETEXT +19, 74, 22, 12, 10, WC_ENTRYFIELD, ES_CENTER | ES_MARGIN | ES_ANY | WS_VISIBLE | WS_TABSTOP
PRESPARAMS PP_BACKGROUNDCOLORINDEX , 15L
CONTROL "No", IDC_SAMPLETEXT +20, 5, 5, 12, 10, WC_ENTRYFIELD, ES_CENTER | ES_MARGIN | ES_ANY | WS_VISIBLE | WS_TABSTOP
PRESPARAMS PP_BACKGROUNDCOLORINDEX , 15L
CONTROL "No", IDC_SAMPLETEXT +21, 28, 5, 12, 10, WC_ENTRYFIELD, ES_CENTER | ES_MARGIN | ES_ANY | WS_VISIBLE | WS_TABSTOP
PRESPARAMS PP_BACKGROUNDCOLORINDEX , 15L
CONTROL "No", IDC_SAMPLETEXT +22, 51, 5, 12, 10, WC_ENTRYFIELD, ES_CENTER | ES_MARGIN | ES_ANY | WS_VISIBLE | WS_TABSTOP
PRESPARAMS PP_BACKGROUNDCOLORINDEX , 15L
CONTROL "No", IDC_SAMPLETEXT +23, 74, 5, 12, 10, WC_ENTRYFIELD, ES_CENTER | ES_MARGIN | ES_ANY | WS_VISIBLE | WS_TABSTOP
PRESPARAMS PP_BACKGROUNDCOLORINDEX , 15L
CONTROL "Sample", IDC_DELAY_TIMER, 165, 52, 44, 12, WC_SPINBUTTON, SPBS_SERVANT | SPBS_NUMERICONLY | SPBS_JUSTLEFT | WS_VISIBLE | WS_TABSTOP
CONTROL "~Delay:", 102, 117, 52, 40, 8, WC_STATIC, SS_TEXT | DT_RIGHT | DT_TOP | DT_MNEMONIC | WS_VISIBLE
CONTROL "ms", 103, 211, 53, 16, 8, WC_STATIC, SS_TEXT | DT_CENTER | DT_VCENTER | DT_MNEMONIC | WS_VISIBLE
CONTROL "Timer", 104, 107, 20, 123, 50, WC_STATIC, SS_GROUPBOX | DT_LEFT | DT_TOP | DT_MNEMONIC | WS_VISIBLE
END

END

User avatar
/Serg/
Posts: 57
Joined: Thu Sep 01, 2005 22:34
Contact:

Postby /Serg/ » Thu Sep 01, 2005 22:36

Запустил, жду
Last edited by /Serg/ on Fri Sep 02, 2005 00:21, edited 1 time in total.

User avatar
/Serg/
Posts: 57
Joined: Thu Sep 01, 2005 22:34
Contact:

Postby /Serg/ » Fri Sep 02, 2005 00:21

Прога работает без утечек памяти, см. логи.
Значение даже еще уменьшается со временем...

Наверное, причины могут быть:
A. Компилятор?
B. Драйвер видеокарты?
C. Ошибка в глубине PM?
D. Так сложились звёзды...

:arrow:

Code: Select all

Memory Utilization for Process with PID = 4F76, name = 'STL':
    bytes      bytes    number  bytes      bytes    bytes
allocated  committed   present   each    present  swapped  description
 00000760   00000760         1   0760   00000760 00000000  PTDA
 000002F4   000002F4         1   02F4   000002F4 00000000  TCB
 00001000   00001000         1   1000   00001000 00000000  TSD
 00010000   00008000         8   1000   00008000 00000000  LDT
 000001E0   000001E0       480   01E0   000001E0 00000000  Process Page Directory
 00078000   0001D000        29   1000   0001D000 00000000  Page Tables
 051A0000   027C0000      7896   1000   01ED8000 00000000  Accessible Shared memory
 00BF0000   00096000        45   1000   0002D000 00000000  Originated Shared memory
 006E0000   00139000       113   1000   00071000 00000000  Private memory

 00089C34   00026C34                    00026C34 00000000  Total System
 00BF0000   00096000                    0002D000 00000000  Total Shared originated
 006E0000   00139000                    00071000 00000000  Total Private
 --------   --------                    -------- --------
 01359C34   001F5C34                    000C4C34 00000000  Total RAM/SWAPPER for this Process
    19815       2007                         787        0  (in Kbytes)
   19.351      1.960                       0.769    0.000  (in Mbytes)
< End of THESEUS4 (v 4.000.00) output @ 0:11:53 on 2.9.2005 >


Code: Select all

Memory Utilization for Process with PID = 4F76, name = 'STL':
    bytes      bytes    number  bytes      bytes    bytes
allocated  committed   present   each    present  swapped  description
 00000760   00000760         1   0760   00000760 00000000  PTDA
 000002F4   000002F4         1   02F4   000002F4 00000000  TCB
 00001000   00001000         1   1000   00001000 00000000  TSD
 00010000   00008000         8   1000   00008000 00000000  LDT
 000001E0   000001E0       480   01E0   000001E0 00000000  Process Page Directory
 00078000   0001E000        30   1000   0001E000 00000000  Page Tables
 05700000   02CD6000      7893   1000   01ED5000 00000000  Accessible Shared memory
 00BF0000   00096000        45   1000   0002D000 00000000  Originated Shared memory
 006E0000   00139000       113   1000   00071000 00000000  Private memory

 00089C34   00027C34                    00027C34 00000000  Total System
 00BF0000   00096000                    0002D000 00000000  Total Shared originated
 006E0000   00139000                    00071000 00000000  Total Private
 --------   --------                    -------- --------
 01359C34   001F6C34                    000C5C34 00000000  Total RAM/SWAPPER for this Process
    19815       2011                         791        0  (in Kbytes)
   19.351      1.964                       0.773    0.000  (in Mbytes)
< End of THESEUS4 (v 4.000.00) output @ 23:46:19 on 1.9.2005 >

User avatar
Eugene Gorbunoff
Site Admin
Posts: 685
Joined: Sat Apr 09, 2005 11:18
Location: St.Petersburg, Russia

Postby Eugene Gorbunoff » Sun Dec 25, 2005 14:18

Проблема была в eStyler. Разработчик пишет: the problem you mention was saolved on 2005-08-02. it was caused by a stupid mistake ... something like calling a WinReleasePS or GpiDeleteBitmap (I do not remember exactly) with a wrong parameter (hwnd or hps rather than a hps or hbmp).

User avatar
Eugene Gorbunoff
Site Admin
Posts: 685
Joined: Sat Apr 09, 2005 11:18
Location: St.Petersburg, Russia

Postby Eugene Gorbunoff » Mon May 08, 2006 02:13

В eComStation 1.2.5 проблема исправлена.


Return to “Developers / Разработчики”

Who is online

Users browsing this forum: No registered users and 2 guests

cron