POV-Ray : Newsgroups : povray.bugreports : Stack fault. Server Time
31 Oct 2024 19:30:05 EDT (-0400)
  Stack fault. (Message 1 to 4 of 4)  
From: Spider
Subject: Stack fault.
Date: 7 Apr 1999 14:15:24
Message: <370B91BE.FAB4477F@bahnhof.se>
Hello, I got a stack fault error while doing some macto coding.
I know it's not the depth of the loop(I loop the same way several times) but
when doing the final loop with a few #write() statements, it crashes.

Is there some kind of memory-leak in the #macro directive? I've come to belive
this after several crashes when using #macro and big #while loops.
(No, I had memory free)

povray 3.1e windows, watcom compile.
win 95 osr2.5.
povray as shell.

I can post the source for the crash, but it isn't predicatble to reproduce.(it's
a loong parse. 30-60 mins)

layout:
define a max
loop x->max
  loop y->max
    doo something

place in differennt macros.
I had a max of 250, and repeated around 15-20 times (random procedure)

Sorry that I can't help more.
all the loops were in #macro's 
-- 
//Spider
        [ spi### [at] bahnhofse ]-[ http://www.bahnhof.se/~spider/ ]
What I can do and what I could do, I just don't know anymore
                "Marian"
        By: "Sisters Of Mercy"


Post a reply to this message

From: Spider
Subject: Re: Stack fault.
Date: 7 Apr 1999 15:52:30
Message: <370B9F3F.90D64196@bahnhof.se>
ok, got it again, same place..
I'm doing a debug render, let you know when I found out some more :-/

-- 
//Spider
        [ spi### [at] bahnhofse ]-[ http://www.bahnhof.se/~spider/ ]
What I can do and what I could do, I just don't know anymore
                "Marian"
        By: "Sisters Of Mercy"


Post a reply to this message

From: Spider
Subject: Re: Stack ---OVERFLOW---
Date: 7 Apr 1999 15:52:32
Message: <370BA74A.9D3904AA@bahnhof.se>
Sorry, read the wrong line in the last post..

I did a debug render on the Stack Overflow error, and found where it crashes.
Here is the code :
note: maxX = maxY = 200
Second test with maxX = maxY = 75 also crashes, at the number 42 this time.
a test with maxX = maxY = 50 worked...


Note : before this, 17 passes through the entire array was made, to calculate
the values.
/*useful for vector output */
#macro v2str(vVector)
  concat("<", str(vVector.x,-1,10), ",", str(vVector.y,-1,10), ",",
str(vVector.z,-1,10),">")
#end


#macro WriteBoxes(sFilename)
  #fopen Out sFilename write
  #debug "\nCreating output file with union of boxes\n"
  #local s = 0.4999999;
  #write(Out, "union{\n")
    #local Y = maxY;
    #while (Y>0)
      #debug concat("\n: ",str(Y,0,0)," ")
      #local X = maxX;
      #while(X>0)
        #debug concat(str(X,0,0)," ")
        #write (Out, "box{",
v2str(<X-s,-0.001,Y-s>),",",v2str(<X+s,world[X][Y],Y+s> )
        #write (Out, " texture{") //Start texture
        #if(mod(X+Y,2))//The texture
          #write (Out, "tWhiteBox")
          #else
            #write (Out, "tBlackBox")
          #end
          #write (Out, "}}\n")//End texture and end box.
        #local X = X - 1;
      #end
      #local Y = Y - 1;
    #end
    #write (Out, "scale ", v2str(<1/maxX,1,1/maxX>), "\n" )
  #write (Out, "}\n")
  #fclose Out
#end


And in the debug output, it goes from 200 : to 189 in Y, and when the 189 row is
finished, inside the 188'th, it crashes.
Is this something with a limited number of #write operations ???

If this isn't enough code, contact me and I can send the whole include file. (I
want to clean it a bit, and add comments before releasing it. as well as some
demos)


and here are the crash data.
PVENGINE.EXE caused fault #c00000fd in PVENGINE.EXE at address 0137:004a275e

To date, 15 fatal errors have been recorded in this program.  This particular
error was recorded 3 times.

Reported By:
CrashGuard v2.0.1

Report Date:
1999-04-07 18:38:27

WindowTitle:
POV-Ray - C:\graphic\POV-Ray for Windows v3.1\spider\Ground\Demo1.pov

Last Message:
MSG(00000000, 0000, 00000000, 00000000)

Program:
C:\GRAPHIC\POV-RAY FOR WINDOWS V3.1\BIN\PVENGINE.EXE
(03/19/99 23:21 - 1774592)

Registers:
EAX=00f92014 CS=0137
EIP=004a275e EFLGS=00010246
EBX=00000001 SS=013f
ESP=00f92000 EBP=00f92054
ECX=ffffff0c DS=013f
ESI=fffffffd FS=0fa7
EDX=00f92028 ES=013f
EDI=00f9205c GS=0000

Bytes at CS:EIP:
53 52 89 c6 29 d2 29 c9 29 ed 29 c0 8a 06 3c 00

Stack dump:
ffffff0c 00f9205c fffffffd 00f92054 00472226 00000031 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00f92089 00000003 00000000

..........
PVENGINE.EXE caused fault #c00000fd in PVENGINE.EXE at address 0137:004a275e

To date, 17 fatal errors have been recorded in this program.  This particular
error was recorded 5 times.

Reported By:
CrashGuard v2.0.1

Report Date:
1999-04-07 20:22:10

WindowTitle:
POV-Ray for Windows

Last Message:
MSG(00000000, 0000, 00000000, 00000000)

Program:
C:\GRAPHIC\POV-RAY FOR WINDOWS V3.1\BIN\PVENGINE.EXE
(03/19/99 23:21 - 1774592)

Registers:
EAX=00f92014 CS=0137
EIP=004a275e EFLGS=00010246
EBX=00000001 SS=013f
ESP=00f92000 EBP=00f92054
ECX=ffffff0c DS=013f
ESI=fffffffd FS=4b3f
EDX=00f92028 ES=013f
EDI=00f9205c GS=0000

Bytes at CS:EIP:
53 52 89 c6 29 d2 29 c9 29 ed 29 c0 8a 06 3c 00

Stack dump:
ffffff0c 00f9205c fffffffd 00f92054 00472226 00000031 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00f92089 00000003 00000000




-- 
//Spider
        [ spi### [at] bahnhofse ]-[ http://www.bahnhof.se/~spider/ ]
What I can do and what I could do, I just don't know anymore
                "Marian"
        By: "Sisters Of Mercy"


Post a reply to this message

From: Spider
Subject: Re: Stack fault.
Date: 8 Apr 1999 19:20:49
Message: <370D2A01.FD890800@bahnhof.se>
Tested in linux, parses with ease.
So the error is in the windows version(or in windows)

Spider wrote:
> 
> Hello, I got a stack fault error while doing some macto coding.
> I know it's not the depth of the loop(I loop the same way several times) but
> when doing the final loop with a few #write() statements, it crashes.
> 
> Is there some kind of memory-leak in the #macro directive? I've come to belive
> this after several crashes when using #macro and big #while loops.
> (No, I had memory free)
> 
> povray 3.1e windows, watcom compile.
> win 95 osr2.5.
> povray as shell.
> 
> I can post the source for the crash, but it isn't predicatble to reproduce.(it's
> a loong parse. 30-60 mins)
> 
> layout:
> define a max
> loop x->max
>   loop y->max
>     doo something
> 
> place in differennt macros.
> I had a max of 250, and repeated around 15-20 times (random procedure)
> 
> Sorry that I can't help more.
> all the loops were in #macro's
> --
> //Spider
>         [ spi### [at] bahnhofse ]-[ http://www.bahnhof.se/~spider/ ]
> What I can do and what I could do, I just don't know anymore
>                 "Marian"
>         By: "Sisters Of Mercy"

-- 
//Spider
        [ spi### [at] bahnhofse ]-[ http://www.bahnhof.se/~spider/ ]
What I can do and what I could do, I just don't know anymore
                "Marian"
        By: "Sisters Of Mercy"


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.