Autor Tema: [bug] in libblit.dll  (Leído 9323 veces)

0 Usuarios y 1 Visitante están viendo este tema.

Desconectado Eckolin

  • Newbie
  • *
  • Mensajes: 12
  • Karma: 5
    • Ver Perfil
[bug] in libblit.dll
« en: Diciembre 31, 2010, 04:38:52 pm »
The following code caused a crash.

Código: [Seleccionar]
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:

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

                                              [ 160] 00000084 00000064          PUSH                100     

00000064
                                              [ 162] 00000002                   FRAME               


Conectado SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12517
  • Karma: 369
  • Sexo: Masculino
    • Ver Perfil
Re: [bug] in libblit.dll
« Respuesta #1 en: Diciembre 31, 2010, 05:09:58 pm »
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

Desconectado Eckolin

  • Newbie
  • *
  • Mensajes: 12
  • Karma: 5
    • Ver Perfil
Re: [bug] in libblit.dll
« Respuesta #2 en: Diciembre 31, 2010, 05:13:24 pm »
Crash happened at frnr==7 for me.

Conectado SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12517
  • Karma: 369
  • Sexo: Masculino
    • Ver Perfil
Re: [bug] in libblit.dll
« Respuesta #3 en: Diciembre 31, 2010, 07:21:08 pm »
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

Desconectado Eckolin

  • Newbie
  • *
  • Mensajes: 12
  • Karma: 5
    • Ver Perfil
Re: [bug] in libblit.dll
« Respuesta #4 en: Enero 01, 2011, 02:30:50 am »
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).
« última modificación: Enero 01, 2011, 03:02:54 am por Eckolin »

Desconectado handsource-dyko

  • Hero Member
  • *****
  • Mensajes: 568
  • Karma: 32
  • Sexo: Masculino
  • I'm the eye in the sky.
    • Ver Perfil
    • dyko designs
Re: [bug] in libblit.dll
« Respuesta #5 en: Enero 01, 2011, 04:13:21 am »
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.

Conectado SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12517
  • Karma: 369
  • Sexo: Masculino
    • Ver Perfil
Re: [bug] in libblit.dll
« Respuesta #6 en: Enero 01, 2011, 08:49:18 am »
I'll test it again...
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Desconectado Drumpi

  • Hero Member
  • *****
  • Mensajes: 6146
  • Karma: 157
  • Sexo: Masculino
  • Odio el periodo "entre proyectos"
    • Ver Perfil
    • La web de Drumpi
Re: [bug] in libblit.dll
« Respuesta #7 en: Enero 01, 2011, 08:54:55 am »
I tried too, with r147 with this output:
Código: [Seleccionar]
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)

Conectado SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12517
  • Karma: 369
  • Sexo: Masculino
    • Ver Perfil
Re: [bug] in libblit.dll
« Respuesta #8 en: Enero 01, 2011, 08:58:19 am »
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

Conectado SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12517
  • Karma: 369
  • Sexo: Masculino
    • Ver Perfil
Re: [bug] in libblit.dll
« Respuesta #9 en: Enero 01, 2011, 09:04:50 am »
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

Desconectado handsource-dyko

  • Hero Member
  • *****
  • Mensajes: 568
  • Karma: 32
  • Sexo: Masculino
  • I'm the eye in the sky.
    • Ver Perfil
    • dyko designs
Re: [bug] in libblit.dll
« Respuesta #10 en: Enero 01, 2011, 11:32:04 am »
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.

Conectado SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12517
  • Karma: 369
  • Sexo: Masculino
    • Ver Perfil
Re: [bug] in libblit.dll
« Respuesta #11 en: Enero 01, 2011, 12:13:14 pm »
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

Desconectado handsource-dyko

  • Hero Member
  • *****
  • Mensajes: 568
  • Karma: 32
  • Sexo: Masculino
  • I'm the eye in the sky.
    • Ver Perfil
    • dyko designs
Re: [bug] in libblit.dll
« Respuesta #12 en: Enero 01, 2011, 12:30:35 pm »
Strange. Maybe an OS specific issue? Or hardware related?

Conectado SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12517
  • Karma: 369
  • Sexo: Masculino
    • Ver Perfil
Re: [bug] in libblit.dll
« Respuesta #13 en: Enero 01, 2011, 12:57:43 pm »
It's crash on windows...

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

Código: [Seleccionar]
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

Desconectado Fede

  • Hero Member
  • *****
  • Mensajes: 1531
  • Karma: 71
  • Sexo: Masculino
  • Buen ambiente, buen karma.
    • Ver Perfil
Re: [bug] in libblit.dll
« Respuesta #14 en: Enero 01, 2011, 01:22:23 pm »
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.