Announcement

Collapse
No announcement yet.

PB9 Anomoly (Bug?)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Michael Mattias
    replied
    Hmm, workaround code + explanation in SDK kind of explains why the workaround actually "works" (I hate it when something 'works' but I don't know why)....

    The WM_MOUSEWHEEL message is sent to the focus window when the mouse wheel is rotated. The DefWindowProc function propagates the message to the window's parent. There should be no internal forwarding of the message, since DefWindowProc propagates it up the parent chain until it finds a window that processes it.
    I guess EXIT FUNCTION in the subclass proc cancels the (PB) default forwarding.

    I think it also tells me I want to do some testing, since I usually don't do squat with that message. But since I've never had a problem, I must be missing something here... or maybe I just haven't "wheeled" with a 9x-compiled application yet...

    YIKES.. I'm writing my new app in 9x.... so it must be REALLY time to test.

    Leave a comment:


  • Gösta H. Lovgren-2
    replied
    Nice workaround Dave. The Life program (I am/was working/playing/diddling (see link above) on now has the "Mouse Wheel Exit" feature removed. {grin}

    ==================================================
    "The object of war is not to die for your country
    but to make the other ******* die for his."
    General George Patton (1885-1945)
    ==================================================

    Leave a comment:


  • William Martin
    replied
    I did send the code to support. Preliminary response is that they can replicate it, and it does look like a genuine bug. R&D is chewing on it and will decide what to do.

    Bill

    Leave a comment:


  • Dave Biggs
    replied
    Not sure if this is a feature or an issue Should be sent to support for a ruling.

    Meanwhile you can avoid the premature closing of the Graphic Window by capturing the wheel..
    Code:
    #COMPILE EXE
    #DIM ALL
    #INCLUDE "WIN32API.inc"
     
    %WinPelHt = 300
    %WinPelWd = 400
     
    GLOBAL GrStaticProc AS DWORD
     
    FUNCTION GrProc(BYVAL hWnd AS DWORD, BYVAL wMsg AS DWORD, BYVAL wParam AS DWORD, BYVAL lParam AS LONG) AS LONG
      SELECT CASE wMsg
     
        CASE %WM_MOUSEWHEEL
          EXIT Function 
     
      END SELECT
     FUNCTION = CallWindowProc(GrStaticProc, hWnd, wMsg, wParam, lParam)
    END FUNCTION
    '------------------/
     
    FUNCTION PBMAIN () AS LONG
        GLOBAL hWin AS DWORD   'handle for a graphics window to use for console output.
        DIM hStatic AS LONG
        DIM I       AS INTEGER
        DIM W       AS SINGLE
     
        GRAPHIC WINDOW "PB/DLL Optimization Routine", 0, 0, CLNG(%WinPelWd), CLNG(%WinPelHt) TO hWin
         hStatic = GetWindow(hWin, %GW_CHILD)               ' Retrieve handle (static child of of graphic window)
         GrStaticProc = SetWindowLong(hStatic, %GWL_WNDPROC, CODEPTR(GrProc)) ' Subclass to catch mouse messages etc
        GRAPHIC ATTACH hWin, 0
        GRAPHIC FONT "Lucinda Console",10,1
     
        FOR i = 1 TO 10
          GRAPHIC GET CLIENT TO W, W                        ' Has window closed? - exit For Next Loop
          IF W = 0 THEN GOTO CLEANUP
          SLEEP 1000
          GRAPHIC PRINT ("I =" & STR$(i))
        NEXT i
        MSGBOX "Waiting for key..."
     
    CLEANUP:
      SetWindowLong hStatic, %GWL_WNDPROC, GrStaticProc
      GRAPHIC WINDOW END
    END FUNCTION
    '------------------/
    Some discussion of mousing around in a graphic window here:

    Leave a comment:


  • Gösta H. Lovgren-2
    replied
    Bill,

    The program terminates here as well ('PBWIN 9.00 - WinApi 05/2008 - XP Pro SP3). The same thing happens (mouse wheel exits immediately and quietly) in a graphics program I have been playing with (http://www.powerbasic.com/support/pb...ad.php?t=38601). Dominique pointed it out.

    After fooling with the program and getting nowhere, I just decided to make it a feature ("Mouse Wheel Exits Autiomatically") and move on.

    ============================
    "Dancing is silent poetry."
    Simonides (556-468bc)
    ============================

    Leave a comment:


  • Cliff Nichols
    replied
    Not sure what it means but Pedro's post of
    ADDED LATER ON:
    I closed the window while counting. The window closed and the program ran silently until completion (it shows the messagebox when done counting).
    Until I can test with XP myself (guessing the same results), I ran your test on VISTA, and both the PB8 and PB9 compiled, and no scroll, but just close the window, they completed and then closed as you would expect (except they typical "I closed, Why is it still counting????" sort of thing)

    May help, may not, but its a piece of info we did not have before

    Leave a comment:


  • Pedro Ramirez
    replied
    No problem here. I spin the wheel up and down, press it. also all other mouse buttons. it works to completion.

    Windows XP Pro in Spanish / SP3
    Graphic Card: NVidia GeForce 6200 256Mb

    ADDED LATER ON:
    I closed the window while counting. The window closed and the program ran silently until completion (it shows the messagebox when done counting).
    Last edited by Pedro Ramirez; 4 Nov 2008, 06:10 PM.

    Leave a comment:


  • Cliff Nichols
    replied
    Now that I am home, I gave the same test again on a Vista machine, and without recompiling. Then I recompiled and tried again and the same results
    Code:
    Compiled in 8.04 on XP Pro SP3 ---> No crash
    Compiled in 9.00 on XP Pro SP3 ---> No crash ---> But Window disappears and messagebox appears on schedule.
    
    So the program is not crashing, just disappearing from sight. I would look closer at what messages are you getting and what of those messages are you not handling and letting the OS handle it?
    And now that I have a moment, I figured pretty interesting results, so I would throw my error handler at it, and all I got was no error. (Since I am still working on the handler, so I figured something I had not thought of yet, so I had an idea to add, BUTTTTT.....)

    Reading the docs, I see nothing about callbacks, and from VERY limited knowledge of (what I thought was basically a picturebox on a dialog, but was wayyyy offfff....its more like a VB Form that I could print text to kinda thing)

    Unless someone has an idea, (like Ricard said) I would submit to [email protected] and see what they say?

    Seems odd to me to not be a "CRASH" (whatever that may actually mean), but more "Does not work as expected" (aka, it runs fine, but the "Dialog" disappears???)

    Leave a comment:


  • Richard Angell
    replied
    Ms

    I did not try with a wheel mouse. If that is the ingredient here that triggers then send the code to [email protected]

    Leave a comment:


  • Michael Mattias
    replied


    Gee, doesn't the way this program is terminating sound like my aforementioned 'stack fault'?

    But if it is, ain't nobody outside Venice FL gonna solve it, since demo program does not have but token access to the stack.

    Leave a comment:


  • Iain Johnstone
    replied
    Crashes for me with PB9 and XP S2. The program also disappears from Task Manager/Processes as soon as it goes off the screen, so it is not hanging around.

    Iain Johnstone

    Leave a comment:


  • Michael Mattias
    replied
    >In my case, the toy program I posted does not produce an error message under XP - it >just quietly terminates

    Yes, that is what I got.

    But I would have liked to have gotten the 'full blown "WIndows has detected...."' screen. Over the weekend I would have seen a stack fault error and would not have had to code in the TRACE stuff - because as soon as I would have seen "stack fault" I would have known what the problem was. (Or what I was sure it "had to be"). (Which it was).

    Fortunatately TRACE told me I had.... a stack fault problem, so at least I was able to find and fix it.

    Leave a comment:


  • William Martin
    replied
    Michael:

    In my case, the toy program I posted does not produce an error message under XP - it just quietly terminates. The DLL version in which I originally encountered the problem did cause Excel to produce a Windows error message though.

    But the toy program under Vista does cause Windows to produce an error message when it terminates.

    Bill

    Leave a comment:


  • Cliff Nichols
    replied
    Compiled in 8.04 on XP Pro SP3 ---> No crash
    Compiled in 9.00 on XP Pro SP3 ---> No crash ---> But Window disappears and messagebox appears on schedule.

    So the program is not crashing, just disappearing from sight. I would look closer at what messages are you getting and what of those messages are you not handling and letting the OS handle it?

    Leave a comment:


  • jcfuller
    replied
    What type of mouse? Mine is a ps2 and I can't get it to gpf using the scroll wheel.

    James

    Leave a comment:


  • Michael Mattias
    replied
    I don't get a GPF message, but the program ends prematurely without the 'Waiting for key" message box when I scrolll the wheel.. so the system must have terminated it.

    Do I need to have some system setting to get GPF messages? I ask because over the weekend, too, I did not get a message when I know I should have gotten a stack fault GPF.

    Windows/XP Pro SP3 all updates via Win/9x IDE compile/run.

    Except today I DID get GPF message boxes from Lotus (it does not like the so-called "standard richtext" created by MS-Word. But it likes what Wordpad creates)

    MCM

    Leave a comment:


  • Conrad Hoffman
    replied
    Yup, terminates on XP using ver 9.0 just as you describe. I replaced the sleep with a different delay to no avail. I wonder if it has to do with not handling the messages?

    Leave a comment:


  • Rodney Hicks
    replied
    Running Vista I get your GPF. Have to click on the window first.
    Perhaps because there's no message handling outside the inherent graphics?

    And it works for me in PBWin 8.04
    Last edited by Rodney Hicks; 4 Nov 2008, 01:39 PM. Reason: add info

    Leave a comment:


  • William Martin
    replied
    And just for good measure, I copied the two EXE files over to a Vista computer and ran them there. The PB8 version runs to completion, while the PB9 version crashes when I spin the mouse wheel, and says "Windows has detected an error" along with a promise to inform me if Microsoft figures out the problem.

    Bill

    Leave a comment:


  • William Martin
    replied
    Originally posted by Richard Angell View Post
    Works as expected here, no problems. WinME, PBWin 9.0

    Maybe you need to re-install 9.0 or have an AV that is interfering ...
    Just so I fully understand. You are spinning your mouse wheel while the graphic window is counting up? And it still continues to count up to the full '10' without aborting mid count?

    Disabling my AV seems to have no effect. And I've already installed PB9 twice with the same effect.

    Bill

    Leave a comment:

Working...
X