[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pointers problem


Le vendredi 16 octobre 2026 à 12:02 -0400, Lee a écrit :
> On 10/16/26 3:07 AM, valaquarus wrote:
> > Hi Lee,
> > thanks for your answer.
> > Here'is the documentation of libqrencode :
> > https://fukuchi.org/works/qrencode/manual/index.html ;<
> > https://fukuchi.org/works/ ;
> > qrencode/manual/index.html>
> > 
> > Why is "As Integer" in "Private Extern QRcode_free(qrcode As
> > Pointer) 'As Integer" commented out?
> > Just because I test it but found it doesn't works and to remember
> > it I just commented it.
> > 
> > You create a new structure with "Dim stQr As New QRcode", then set
> > it to Null, then assign the pointer returned from the Extern
> > No I already test that and it doesn't work, it ask for a pointer.
> > 
> > You"re right, I shall put here the whole program.
> > 
> > Here is informations about my installation :
> > 
> > 
> > [System]
> > Gambas=3.22.99 450bc2f (master)
> > OperatingSystem=Linux
> > Distribution=Manjaro Linux
> > Kernel=7.2.3-2-MANJARO
> [snip]
> > 
> > Best regards
> 
> I should have been more specific when requesting a project. I should
> have requested a demonstration project that is as small as 
> possible while still demonstrating the issue. But that's okay, it is
> not a large project archive.
> 
> Unfortunately, I get no segmentation fault at all with your project
> as it is. I changed the definition of the 
> QRcode_encodeString external function to return a QRcode structure
> (making other modifications to the code appropriate with that 
> change), and that works as well.
> 
> It appears, though, that the program displays an incorrect QR code
> according to one online generator.
> 
> The version of 'qrencode` I am using is 4.1.1-4.
> 
> [System]
> Gambas=3.22.1
> Distribution=Manjaro Linux
> Kernel=6.18.49-1-MANJARO
> 
> I can only suggest that you try creating a very simple test project
> that has the bare minimum needed to generate a QR code. Set 
> a break point and then step through the code to determine exactly
> where the segmentation fault occurs. If we can get it narrowed 
> down, we might be able to figure out what is causing it.
> 
> 
Dear Lee,
I did what you suggest, changing  QRcode_encodeString external function
to return a QRcode structure, I can confirm it works fine but I don't
know how to free the pointer and the program tells it to me : free()
 invalid pointer at closing.
I declare now Library "libqrencode:4.1.1" as my machine doesn't find
4.1.1-4.
> the program displays an incorrect QR code according to one online
> generator
How did you catch it?
I made a break point and turn around step by step, I have a
segmentation where it wants and when it wants , not in one place and
not only one place.

Best regards.
-- 
valaquarus <valaquarus@xxxxxxxxx>

Follow-Ups:
Re: pointers problemLee <t.lee.davidson@xxxxxxxxx>
References:
pointers problemvalaquarus <valaquarus@xxxxxxxxx>
Re: pointers problemLee <t.lee.davidson@xxxxxxxxx>