English
Forum

What am I doing here to create("hpic"...) wrong

 
- Page 1 -



GDL
Hi,
have one Program, the my disengaged memory(240MB) at loading short-term on 2 MB bring and thereafter again on 235 MB rise can.

through Fehlersuche found I the Übeltäter
CompileMarkSeparation
proc leiste

    windowstyle 3
    arbeitsleiste&=create("window",%hwnd,"Arbeitsleiste",1,%maxy-190,1000,90)
    name$= astart$+"\bilder\bild1.BMP"
    bild_&[9000] = @Create("HPIC", -1, name$)
    ger1&=@Create("PicButton",arbeitsleiste&,bild_&[9000],1,1,30,30,)
    name$= astart$+"\bilder\bild2.BMP"
    bild_&[8999] = @Create("HPIC", -1, name$)
    ger2&=@Create("PicButton",arbeitsleiste&,bild_&[8999],31,1,30,30,)
    name$= astart$+"\bilder\bild3.BMP"
    bild_&[8998] = @Create("HPIC", -1, name$)
    bog1&=@Create("PicButton",arbeitsleiste&,bild_&[8998],61,1,30,30,)
    name$= astart$+"\bilder\bild4.BMP"
    bild_&[8997] = @Create("HPIC", -1, name$)
    bog2&=@Create("PicButton",arbeitsleiste&,bild_&[8997],91,1,30,30,)
    name$= astart$+"\bilder\bild5.BMP"
    bild_&[8996] = @Create("HPIC", -1, name$)
    bog3&=@Create("PicButton",arbeitsleiste&,bild_&[8996],121,1,30,30,)
    name$= astart$+"\bilder\bild6.BMP"
    bild_&[8995] = @Create("HPIC", -1, name$)
    bog4&=@Create("PicButton",arbeitsleiste&,bild_&[8995],151,1,30,30,)
    name$= astart$+"\bilder\bild7.BMP"
    bild_&[8994] = @Create("HPIC", -1, name$)
    wei1&=@Create("PicButton",arbeitsleiste&,bild_&[8994],181,1,30,30,)
    name$= astart$+"\bilder\bild8.BMP"
    bild_&[8993] = @Create("HPIC", -1, name$)
    wei2&=@Create("PicButton",arbeitsleiste&,bild_&[8993],211,1,30,30,)
    name$= astart$+"\bilder\bild9.BMP"
    bild_&[8992] = @Create("HPIC", -1, name$)
    wei3&=@Create("PicButton",arbeitsleiste&,bild_&[8992],241,1,30,30,)
    name$= astart$+"\bilder\bild10.BMP"
    bild_&[8991] = @Create("HPIC", -1, name$)
    wei4&=@Create("PicButton",arbeitsleiste&,bild_&[8991],271,1,30,30,)
    name$= astart$+"\bilder\bild11.BMP"
    bild_&[8990] = @Create("HPIC", -1, name$)
    wei5&=@Create("PicButton",arbeitsleiste&,bild_&[8990],301,1,30,30,)
    name$= astart$+"\bilder\bild12.BMP"
    bild_&[8989] = @Create("HPIC", -1, name$)
    wei6&=@Create("PicButton",arbeitsleiste&,bild_&[8989],331,1,30,30,)
    name$= astart$+"\bilder\bild13.BMP"
    bild_&[8988] = @Create("HPIC", -1, name$)
    wei7&=@Create("PicButton",arbeitsleiste&,bild_&[8988],361,1,30,30,)
    name$= astart$+"\bilder\bild14.BMP"
    bild_&[8987] = @Create("HPIC", -1, name$)
    wei8&=@Create("PicButton",arbeitsleiste&,bild_&[8987],391,1,30,30,)
    name$= astart$+"\bilder\bild19.BMP"
    bild_&[8986] = @Create("HPIC", -1, name$)
    kw1&=@Create("PicButton",arbeitsleiste&,bild_&[8986],421,1,30,30,)
    name$= astart$+"\bilder\bild20.BMP"
    bild_&[8985] = @Create("HPIC", -1, name$)
    kw2&=@Create("PicButton",arbeitsleiste&,bild_&[8985],451,1,30,30,)
    name$= astart$+"\bilder\bild15.BMP"
    bild_&[8984] = @Create("HPIC", -1, name$)
    sig1&=@Create("PicButton",arbeitsleiste&,bild_&[8984],481,1,30,30,)
    name$= astart$+"\bilder\bild16.BMP"
    bild_&[8983] = @Create("HPIC", -1, name$)
    sig2&=@Create("PicButton",arbeitsleiste&,bild_&[8983],511,1,30,30,)
    name$= astart$+"\bilder\bild18.BMP"
    bild_&[8982] = @Create("HPIC", -1, name$)
    ap&=@Create("PicButton",arbeitsleiste&,bild_&[8982],541,1,30,30,)
    name$= astart$+"\bilder\bild17.BMP"
    bild_&[8981] = @Create("HPIC", -1, name$)
    bm&=@Create("PicButton",arbeitsleiste&,bild_&[8981],571,1,30,30,)
    tas&=@Create("Button",arbeitsleiste&,"Ta",601,1,30,30,)
    text&=@Create("Button",arbeitsleiste&,"Text",631,1,50,30,)
    name$= astart$+"\bilder\bild21.BMP"
    bild_&[8980] = @Create("HPIC", -1, name$)
    dwei&[1]=@Create("PicButton",arbeitsleiste&,bild_&[8980],690,1,60,36)
    name$= astart$+"\bilder\bild22.BMP"
    bild_&[8979] = @Create("HPIC", -1, name$)
    dwei&[2]=@Create("PicButton",arbeitsleiste&,bild_&[8979],755,1,60,36)
    name$= astart$+"\bilder\bild23.BMP"
    bild_&[8978] = @Create("HPIC", -1, name$)
    dwei&[3]=@Create("PicButton",arbeitsleiste&,bild_&[8978],820,1,36,60)
    name$= astart$+"\bilder\bild24.BMP"
    bild_&[8977] = @Create("HPIC", -1, name$)
    dwei&[4]=@Create("PicButton",arbeitsleiste&,bild_&[8977],875,1,36,60)
    name$= astart$+"\bilder\bild25.BMP"
    bild_&[8976] = @Create("HPIC", -1, name$)
    winkel&[1]=@Create("PicButton",arbeitsleiste&,bild_&[8976],1,35,30,30)
    name$= astart$+"\bilder\bild26.BMP"
    bild_&[8975] = @Create("HPIC", -1, name$)
    winkel&[2]=@Create("PicButton",arbeitsleiste&,bild_&[8975],31,35,30,30)
    sleep 5000				 sonst bricht der Speicher endproc


with sleep 5000 on this place fractures the memory not any more one.apiece small The Sleepzeit umso moreover fractures the memory one.

Hello
Georg
 
Windows7 Xprofan 8,9,10 [...]  [...] 
12/02/06  
 



 
- Page 1 -



Rolf
Koch
*lol*
no alike whether small or tall, simply always only The same Variable BILD& without Arrayzähler.
 
12/03/06  
 




Rolf
Koch
but Stopp:
How sees PICBUTTON from (becomes well ne Subproc his?) - Perhaps happens there Yes what (something not released or so)?
 
12/03/06  
 



 
- Page 2 -



GDL
Hello Rolf,
The Images are a container and go later then additional on new erstellte Controls likewise automatically transfer.
The Anfangsbutton only Auswahlbutton for new Eisenbahnkomponenten.

have now each Variation durchprobiert. have sleep too on whom beginning the Procedure set circa what To testing. here's selbiges.I suspect it depends with the declare bild_&[9000] together. The computer need hold somewhere Time ,since the Proc groin same to window... called becomes.

Hello
Georg
 
Windows7 Xprofan 8,9,10 [...]  [...] 
12/03/06  
 




GDL
Since no Error Message comes and the Proggi correct runs iss it indeed same. me fiels hold only on, there with my PII computer, too without sleep, ne 10 sec. Gedenkminute potted becomes.
Werds later time Files auslagern.

thanks over again.

Hello
Georg
 
Windows7 Xprofan 8,9,10 [...]  [...] 
12/03/06  
 



Hello Georg...

with TNT can at create of/ one Memory bitmap very well see, the with grafischen Objects not only in the virtual memory your Prozesses worked becomes, separate in yet plenty größerem Maße in the of CSRSS.EXE

what happens at started one Prozesses? The Process should quick available stand => The dynamic priority is very high...

my theory:
CSRSS runs with normal priority. your Process klaut means at started CSRSS Prozessorzeit => reaches, The before of CSRSS allocated get, cannot in the erforderlichen Time again released go..
a) with Sleep Gibts You Prozessorzeit for x-Millisekunden ex, CSRSS comes then again on The row and can finally saubermachen.
b) dynamic priority verringert itself (if nothing particularly happens) with the Laufzeit the Prozesses. Sometime is the dynamic priority so lowly, the CSRSS again in that rumble comes and clear whom before genutzten memory aside.

The problem lying means not (directly) on your Program.

has someone a better Statement?

PS: 30*2KB can so not absolutely calculate.
- Each Page in memory is about 4kB big.
- Heapkontrollstrukturen must there too yet hinzugerechnet go
- lever takes Space lane
- ..
 
12/03/06  
 




GDL
Hello Andreas,

your theory deckt itself Yes with my supposition.
only happens it too already with one pic, if before declare bild&[9000].
with declare bild&[10] and 10 pics is everything aale.

Hello
Georg
 
Windows7 Xprofan 8,9,10 [...]  [...] 
12/03/06  
 



what power whom your Process with declare bild&[9000]? it initialized memory, and not straight little. there's means someone heavy beschäftig. happens the in the Initialisierungsphase, can CSRSS whom for the Show of grafischen Elementen provided memory not unlock, there CSRSS To this Time below the priority of your Process lying.
can the unfortunately not to check on, I your complete Program not have.
 
12/03/06  
 




Rolf
Koch
the meant I Yes with bild&. however understand I your border these Images Program bereitzuhalten.
unfortunately wisely I do not, how much memory for apiece one aray provided becomes. Should Roland answer. because 9000 is really very plenty.
I consider strain, How You The Images instead of by aray somehow differently capture can.
 
12/03/06  
 




GDL
be straight thereby Modellbahnsteuerung for computer with Win98 and 64MB RAM flotter hinzubekommen. there are but no Fehlermeldungen in all this Make.
If you under Competitions The latest Installversion in the last Posting fetch have you got everything complete.
After the Einlogen(asxdf) under Auswahlbutton plan is the program in the Rohform.

Hello
Georg
 
Windows7 Xprofan 8,9,10 [...]  [...] 
12/03/06  
 



Werd time try, whether it by me runs.
As I said, I here kackfrech simply time so behaupte is, that not your Process WinXP? verpulvert, separate CSRSS.

Greeting

Andreas
 
12/03/06  
 




Rolf
Koch
I see strain, your Images having anyhow Image+Nr.Bmp.
Versuchs still time so:
CompileMarkSeparation
name$= astart$+"\bilder\bild2.BMP"
bild&=@Create("HPIC", -1, name$)
ger1&=@Create("PicButton",arbeitsleiste&,bild&,1,1,30,30,)
destroywindow bild&
name$= astart$+"\bilder\bild2.BMP"
bild& = @Create("HPIC", -1, name$)
ger2&=@Create("PicButton",arbeitsleiste&,bild&,31,1,30,30,)
destroywindow&

you have now no aray, this is clear. however can You Yes later in the program still very beautiful bild& according to action again the right Image zufügen:
example:
it'll the 10th Image again needed:
(action would here 10 and would in zahlenausleser$ stored)
CompileMarkSeparation
presentment$=astart$+"\Images\bild"+zahlenausleser$+".BMP"
bild& = @Create("HPIC", -1, name$)
neuerbutton&=@Create("PicButton",arbeitsleiste&,bild&,31,1,30,30,)
destroywindow bild&

Aufjedenfall should You of such grossen Arrays (9000!) stood off win.
 
12/03/06  
 




GDL
be straight thereby me a Bildcontainer with solid Images To make and change The Verschiebetechnik then ex. come then with 200 Images from.
CompileMarkSeparation
num1&=1
clear result%

whilenot num1& > objekt&        Erzeugte Objekte abfragen

    x%=1
    y%=1
    CheckMouse objekt_&[num1&],x%,y%,lang_&[num1&],breit_&[num1&]

    If result% = 1

        settext kfenster&,oname_$[num1&]
        num&=num1&
        clear result%

        whilenot %Mousepressed = 0

            UseCursor 3
            destroywindow(objekt_&[num1&])
            num&=num1&
            settext kfenster&,oname_$[num1&]
            xpos_&[num1&]=%mousex
            ypos_&[num1&]=%mousey
            xpos_1&[num1&]=%mousex+xbalken%
            ypos_1&[num1&]=%mousey+ybalken%

            ifnot ttext&[num1&]=1

                objekt_&[num1&]=control("STATIC","",style_&[num1&],xpos_&[num1&],ypos_&[num1&],lang_&[num1&],breit_&[num1&],%hwnd,0,%hinstance,$0)
                casenot left$(oname_$[num&],3)="Ger":Sendmessage(objekt_&[num1&],$172,0,bild_&[num1&])        hier werden die Pics momentan gebraucht

            else

                objekt_&[num1&]=create("text",%hwnd,oname_$[num1&],xpos_&[num1&],ypos_&[num1&],lang_&[num1&],breit_&[num1&])
                setfont objekt_&[num1&],font&

            endif

        wend

        UseCursor 0

    Endif

    num1&=num1&+1

wend

if %MouseKey=2

    xn%=%mousex
    yn%=%mousey
    drawtext 10,%maxy-80,("aktuelle Erstellkoordinate: x "+right$(("00"+str$(%mousex)),3)+"  y  "+right$(("00"+str$(%mousey)),3))

../function-references/XProfan/endif/'>endif


It's all right , must only The Objekterzeugung yet Change.

Hello
Georg
 
Windows7 Xprofan 8,9,10 [...]  [...] 
12/03/06  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.981 Views

Untitledvor 0 min.
rquindt11/22/15
Uwe Lang02/27/14
Axel Berse02/20/13

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie