Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Bluescreen when using Pixels[x,y,0];

  1. #1

    Bluescreen when using Pixels[x,y,0];

    Hello folks,

    I am trying to upgrade the finished parts of my game to actual Asphyre Version and now there is the following problem:

    I need to check single color of pixels when moving the mouse to decide if the mouse is over an "object" or not.

    When using the following (sample)code, my computer shows me a bluescreen and reboots:

    if Images1.Image['introbtn1'].Pixels[MouseX,MouseY,0] <> Images1.Image['introbtn1'].MaskedColor then
    MouseOverBtn := true
    else
    MouseOverBtn := false;

    What is wrong here? I need to check the color under the mouseposition. If it is not the MaskedColor (not visible elements) then I know the mouse is over my button or something similar.

    In PowerDraw3Pre this worked perfectly.

    Or is there a problem with TAsphyreImages?

    Any hint is welcome.

    Greetings,
    Dirk
    <a href="http://www.greatgamesexperiment.com/game/Valgard/?utm_source=gge&amp;utm_medium=badge_game"><img border="0" alt="GGE" title="GGE" src="http://static.greatgamesexperiment.com/badge/game/valgard/gge400x56.png"></a>

  2. #2

    Bluescreen when using Pixels[x,y,0];

    I've tried to reproduce the error and no success, Pixels appears to work fine. Make sure "introbtn1" *IS* the name of your image (try accessing the same image using Images1[MyImageIndex]) and also check if the pixel you are trying to access is within images boundaries. If the image you are accessing doesn't have name "introbtn1" - it'll be "nil". In case you already checked all this, then a sample code would help. Finally, does the same thing happen in Software Renderer?

  3. #3

    Bluescreen when using Pixels[x,y,0];

    Hi LifePower,
    to find out if it is my fault I tried a little thing with your Hasteroids Demo.

    The bluescreen also appears if I add only one line to your code:

    procedure TMainForm.Timer1Render(Sender: TObject);
    begin
    if (not PowerDraw1.DeviceActive) then Exit;

    with PowerDraw1.Device do
    begin
    Clear(clBlack);

    BeginScene();

    OEngine1.Render(VScreen1);
    PEngine1.Render(VScreen1);

    TextureMap(Images1[2], pBounds4(100, 100, 64, 64), cColor1({clWhite}0), tPattern(0), effectSrcAlpha);

    Fonts1[0].TextOut('PixelCol: ' + IntToStr(Images1[2].Pixels[10,10,0]), 4, 14, $FF00FF00);


    Fonts1[0].TextOut('FPS: ' + IntToStr(Timer1.FrameRate), 4, 4, $FF00FF00);
    Fonts1[0].AlignedOut('Press ESC to exit, SPACE to switch Hardware/Software', 0, 440, taCenter, taBeginning, $FF00FF00);
    Fonts1[0].AlignedOut('and finally, ALT + ENTER to switch from windowed to full-screen mode.', 0, 458, taCenter, taBeginning, $FF7FEF00);

    EndScene();


    Present();
    end;
    end;

    Am I doing something wrong?

    Here my PC specs:

    Toshiba TECRA S1
    Centrino 1,7 Ghz
    ATI Mobility Radeon 9000 (latest driver)
    Windows XP Prof (latest updates)
    Direct X 9.0c

    I did not try it on other PCs. This will be the next step to find out more.
    But since this is my developement machine, I am very interested in finding out the reason why Pixels does not work here.

    Greetings,
    Dirk
    <a href="http://www.greatgamesexperiment.com/game/Valgard/?utm_source=gge&amp;utm_medium=badge_game"><img border="0" alt="GGE" title="GGE" src="http://static.greatgamesexperiment.com/badge/game/valgard/gge400x56.png"></a>

  4. #4

    Bluescreen when using Pixels[x,y,0];

    Ok, tried it on another PC now.

    result is nearly the same. NO bluescreen, but the game hangs up.
    So I don't think the problem lies in hardware.

    Specs of 2nd PC:

    Athlon XP 2000
    GeForce Ti 4200 (latest drivers)
    Windows XP Prof

    It would be very nice if you can help me with this.
    How did you test Pixels-function? You said it seems to work fine. Maybe I am too blinded from programming to find the "easy solution".

    Greetings,
    Dirk
    <a href="http://www.greatgamesexperiment.com/game/Valgard/?utm_source=gge&amp;utm_medium=badge_game"><img border="0" alt="GGE" title="GGE" src="http://static.greatgamesexperiment.com/badge/game/valgard/gge400x56.png"></a>

  5. #5

    Bluescreen when using Pixels[x,y,0];

    Rather than trying on other PC you should check with Software Renderer.
    I'm going to release new version of Asphyre and you should experiment with one of its examples.

  6. #6

    Bluescreen when using Pixels[x,y,0];

    Pixels-function in Software mode seems to work with your sample.

    When trying to start my game in Software mode, all I see is a white screen... Don't know why.

    Greets,
    Dirk
    <a href="http://www.greatgamesexperiment.com/game/Valgard/?utm_source=gge&amp;utm_medium=badge_game"><img border="0" alt="GGE" title="GGE" src="http://static.greatgamesexperiment.com/badge/game/valgard/gge400x56.png"></a>

  7. #7

    Bluescreen when using Pixels[x,y,0];

    High LifePower,

    I played around a bit with the new releas 0100 and found out the following:

    Pixels in Hardware Mode crashes the system on WinXP Prof.

    Pixels in Hardware Mode under Win 2000 Prof seems to work.

    I tried 4 PCs now, 3 of them with Win XP Prof and they crash.
    The only one which works is a Win 2000 Prof PC.

    Any idea? Which OS do you have installed?

    Greetings,
    Dirk
    <a href="http://www.greatgamesexperiment.com/game/Valgard/?utm_source=gge&amp;utm_medium=badge_game"><img border="0" alt="GGE" title="GGE" src="http://static.greatgamesexperiment.com/badge/game/valgard/gge400x56.png"></a>

  8. #8

    Bluescreen when using Pixels[x,y,0];

    I'm running WinXP and the problem you are mentioning doesn't happen. I'm pretty out of options here so I would really ask you if you can assemble a small compilable example of what you're doing and send it by e-mail to me for further testing. My e-mail address appears in the beginning of most source files.

    Thanks!
    Lifepower

  9. #9

    Bluescreen when using Pixels[x,y,0];

    As I already said,
    you can take any of your sample programs and add a line which prints out the color of a pixel every frame.

    The example posted before in this topic crashes my systems.

    I have found the problem with software renderer. I had the asphyreex.dll from pre-version still in windows\system32-Dir. After I deleted it, I was able to use software mode.

    But I still don't know why Pixels in HW-mode crashes my systems. In software-mode it works well and prints out the correct color-value.
    As soon as I change to HW-mode the system crashes.

    When I use Pixels[x,y,1] instead of Pixels[x,y,0] the system stays stable, but always shows color $0. Maybe this helps you to find out something more.

    OK, I hope you can find something out. If it was only one PC I would think it is maybe some kind of WinXP-config problem, but I can't use Pixels on two other WinXP-Systems.

    I will try different other settings etc. Maybe I will find the problem. I know it is hard for you to find out something when the problem does not occur on your system. I will "feed" you with anything I find out.
    <a href="http://www.greatgamesexperiment.com/game/Valgard/?utm_source=gge&amp;utm_medium=badge_game"><img border="0" alt="GGE" title="GGE" src="http://static.greatgamesexperiment.com/badge/game/valgard/gge400x56.png"></a>

  10. #10

    Bluescreen when using Pixels[x,y,0];

    Hello again,

    I'm driving mad with this problem.

    I am wondering if I have overseen something, so could you please post a snap of code how to use Pixels-function?

    Found out something more...

    The systems does NOT crash when I define a TAsphyreImage2, load a bitmap from file (not from vtdb into imagelist) and then try to access a single pixel. This works!

    In my point of view the problem could be here:

    TAsphyreImages is a list of TAsphyreImage. In declaration of TAsphyreImage the functions GetPixel, SetPixel etc are abstract, which means they will be implemented first time in TAsphyreImage2.
    So the visual component on my form uses property Pixels from TAsphyreImage, which tries to call functions which are not implemented in this class. Is this the problem?

    But if so, why does it work on your system??
    <a href="http://www.greatgamesexperiment.com/game/Valgard/?utm_source=gge&amp;utm_medium=badge_game"><img border="0" alt="GGE" title="GGE" src="http://static.greatgamesexperiment.com/badge/game/valgard/gge400x56.png"></a>

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •