[bug] in libblit.dll

Started by Eckolin, January 01, 2011, 12:38:52 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Eckolin

The following code caused a crash.


import "mod_grproc"
import "mod_video"
import "mod_map"
import "mod_draw"
import "mod_rand"
import "mod_say"
private
    frnr=0;

begin
    set_mode(800,600,32);
    set_fps(0,0);
    for (x=0;x<250;++x)
        put_pixel(rand(0,800),rand(0,600),rgb(rand(200,250),rand(200,250),rand(200,250)));
    end
    loop
        frnr++;
        say(frnr);
        for (x=0;x<30;x++)
            particle(400.0,300.0,(float)rand(-10,10),(float)rand(-5,-10),rgb(rand(150,255),rand(150,255),rand(150,255)));
        end
        frame(5000);
    end
end


process particle(float xcor,float ycor,float dx,float dy, int color);
private
    lifetime=100;
begin
    graph=new_map(10,10,32);
say(graph);
    drawing_map(0,graph);
    drawing_color(color);
    draw_fcircle(3,3,rand(3,5));
    loop
        lifetime--;
        size+=rand(-2,1);
        if (lifetime<0)
            size-=2;
            //alpha-=3;
            if (size<5)
                break;
            end
        end
        x=xcor;
        y=ycor;
        xcor+=dx;
        ycor+=dy;
        dx*=0.96;
        dy+=0.06;
        dy*=0.96;
        frame;
    end
frame;
onexit
    if (graph) unload_map(0,graph);graph=0;end
end


I have had crashes like this before, but they seem difficult to reproduce. I'm using a fairly recent version of Bennu (29 november 2010)

Last lines in debugger output also suggest a bug in blitting:


                                              [ 158] 000000FF 00000035          ------              D:\Programming\Projects\problem\fireworks.prg:53 -> frame;

                                              [ 160] 00000084 00000064          PUSH                100     

00000064
                                              [ 162] 00000002                   FRAME               



SplinterGU

when crash? here are working and don't crash...

maybe you must wait the next release...
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Eckolin

Crash happened at frnr==7 for me.

SplinterGU

here:

1188
1189
1190
1191
1192
1193
1194
1195
1196
1197

and I close it.
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Eckolin

#4
For me the crash was at 1209. I've had someone else run it on his machine, it crashes there too. I suspect it's a problem with the scaling code, as this problem also occured when using size_x, size_y in another program. (And it no longer crashes when I comment out the size changes).

I'd like to ask those who read this thread to run it for themselves for a while (10 minutes or so).

handsource-dyko

It crashed by me too. I've used BGDI 1.0.0 (Nov 29 2010 01:31:19). It carshed at 1119. It cashed after a few seconds. It consistantly
crashes at 1119. I've noticed from the screenshot that you're also using a dutch windows version like me.

SplinterGU

Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Drumpi

I tried too, with r147 with this output:
1
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
2
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
3
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089


With r181 I get 1119, but crashed too. I'm using Wxp x64.
Just a fast try, not changing code or else, just compile and run.
Hala, como con 1001 procesos sólo va a 9 FPS, vamos a meterle 32 veces más, a ver si revienta.
(Drumpi epic moment)

SplinterGU

my version for frmr==4580 and continue...

my version is linux version... I'll let it continue...
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

SplinterGU

my version go frmr == 10604 and continue...

I think that I fix this bug... not blitter problem, pixel (drawing functions) problem...

But I think that I fix it time ago... maybe I made a bad .rar package.
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

handsource-dyko

Yeah, maybe it's in the drawing routines. I've played around with some of the primitive drawing fuctions, and they seem to work differently from what I expected from the documentation. delete_draw can sometimes crash in certain situations.

SplinterGU

I'm here again... I return from my father house.

I remove say(graph) for more speed in the test.

The test was continue running, I kill it... the last frmr say:

275700
275701
275702
275703
275704
275705
275706
275707
275708
Terminado (killed)

this don't crash in linux.
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

handsource-dyko

Strange. Maybe an OS specific issue? Or hardware related?

SplinterGU

It's crash on windows...

I isolate the error... this crash for me... please, anybody can confirm please?


import "mod_grproc"
import "mod_video"
import "mod_map"
import "mod_say"

begin
    set_mode(800,600,32);
    set_fps(0,0);
    particle(400,300);
    particle(400,300);
    particle(400,300);
    particle(400,300);
end


process particle(int x,int y);
begin
    graph=new_map(10,10,32);
    size=1;
    say( graph+"|"+size+"|"+x+"|"+y+"|");
    frame;
onexit
    if (graph) unload_map(0,graph);graph=0;end
end
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Fede

Yes, it crash

r189 wxp64.

Show this "say":

1000|1|400|300|
1001|1|400|300|
1002|1|400|300|
1003|1|400|300|

Si quieres ser sabio, aprende a interrogar razonablemente, a escuchar con atención, a responder serenamente y a callar cuando no tengas nada que decir.