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

Re: pointers problem


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.


--
Lee

--- Gambas User List Netiquette [https://gambaswiki.org/wiki/doc/netiquette] ----
--- Gambas User List Archive [https://lists.gambas-basic.org/archive/user] ----


Follow-Ups:
Re: pointers problemvalaquarus <valaquarus@xxxxxxxxx>
References:
pointers problemvalaquarus <valaquarus@xxxxxxxxx>