GflAx v2.70 function seems to crash now on XP updated PC's

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: XnTriq, helmut, xnview

_GUI_
Posts: 22
Joined: Fri Sep 08, 2006 12:22 am

GflAx v2.70 function seems to crash now on XP updated PC's

Post by _GUI_ »

Hi Pierre and all,

A couple users of one on my programs (Histogrammar), using GFL SDK VERSION 2.70, are recently experiencing problems after their XP machines seem to have been updated.

I attach 2 of these screens since I have no means to know the exact Sdk function that crashes, but seems to be something happening when the picture must be displyed into the program form involving 8-bit images GflAx functions. I also include the complete Showimage routine which is one of the points that produces the error, indicating the SDK functions used.

Do you have any idea what could be happenning? Updating the SDK could solve this? could the users update their SDK without installing again the program?

Code: Select all

Sub ShowImage(sRuta As String)
    Dim MAXX As Integer
    Dim MAXY As Integer
    
    Dim i As Integer, j As Integer, iMaxX As Integer, iMaxY As Integer
    Dim rRatio As Double
    Dim MyObjPreview As GflAx.GflAx     ' Imagen de 8 bits para representarla (gamma)

    On Error GoTo ShowImage_Error
    
    SetAction "Displaying image..."
    
    Set MyObjPreview = New GflAx.GflAx
    MyObjPreview.LoadBitmap (sRuta)     ' Cargamos en MyObjPreview el fichero que haya en la ruta
    
    MAXX = frmPrincipal.pctImagen.ScaleWidth
    MAXY = frmPrincipal.pctImagen.ScaleHeight
    
    Select Case iAdjust
        Case 1
            lWidth = MyObjPreview.Width
            lHeight = MyObjPreview.Height
            rRatio = lWidth / lHeight
            
            If rRatio > MAXX / MAXY Then
                iMaxX = MAXX
                iMaxY = Int(MAXX / rRatio)
            Else
                iMaxX = Int(MAXY * rRatio)
                iMaxY = MAXY
            End If
            
            MyObjPreview.Resize iMaxX, iMaxY
        Case 2
            MyObjPreview.Resize MAXX, MAXY
    End Select
    
    MyObjPreview.Gamma (2.2 / rGamma)
    Set frmPrincipal.pctImagen = MyObjPreview.GetPicture
    Set MyObjPreview = Nothing
        
ShowImage_Resume:
    Exit Sub
    
ShowImage_Error:
    MostrarError ("ShowImage")
    Resume ShowImage_Resume

End Sub
Image

Image

Best regards and thank you.
User avatar
xnview
Author of XnView
Posts: 44303
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: GflAx v2.70 function seems to crash now on XP updated PC's

Post by xnview »

_GUI_ wrote: Do you have any idea what could be happenning? Updating the SDK could solve this? could the users update their SDK without installing again the program?
Strange, the crash occurs in GetPicture? If you update the SDK, you need to rebuild your app
Pierre.
_GUI_
Posts: 22
Joined: Fri Sep 08, 2006 12:22 am

Re: GflAx v2.70 function seems to crash now on XP updated PC's

Post by _GUI_ »

xnview wrote:
_GUI_ wrote: Do you have any idea what could be happenning? Updating the SDK could solve this? could the users update their SDK without installing again the program?
Strange, the crash occurs in GetPicture? If you update the SDK, you need to rebuild your app
Hi Pierre, I cannot know the exact line at which the routine crashed, but I told them to update to the latest Gfl version (without re-installing my app) and it worked fine. Perhaps the old DLL's were not compatible with the XP update they recently did? or maybe some of the old DLL's got corrupt? strange. But the update worked fine.

Thank you.