Search found 12 matches

by jakobssystems
Thu Jun 26, 2025 3:27 pm
Forum: Applications - Feedback and Discussion
Topic: QR-/Barcode Detection from Webcams/RTSP Livestreams
Replies: 1
Views: 1163

QR-/Barcode Detection from Webcams/RTSP Livestreams

Hi everybody, recently I have finished a nice Purebasic progamm (with two cpp helper .so Libs). A CLI QR-/Barcode Detection from USB-Webcams or RTSP Livestreams. With virtual keyboard and some other nice features (e.g. making automatic product pictures).

https://codeberg.org/tomas-jakobs/qr-code ...
by jakobssystems
Mon Apr 21, 2025 5:02 pm
Forum: Windows
Topic: Windows service
Replies: 19
Views: 16423

Re: Windows service

I cannot directly anser your question, but today I've made my own Windows app SCM "serviceable".
Everyting is within an include file windows_service.pbi to keep my main program clean and uncluttered, maybe you check it out?

https://codeberg.org/tomas-jakobs/rest-api-skeleton
by jakobssystems
Sun Apr 13, 2025 8:36 pm
Forum: Coding Questions
Topic: Problems in Windows with HTTP-REST API Skeleton
Replies: 20
Views: 1216

Re: Problems in Windows with HTTP-REST API Skeleton

Update: Windows version is up and running after a partial rewrite of the Threadmodel.

Thank you @infrate, you pushed me into the right Direction.

And @idle I took a peek into the Atomic Webserver but this is directly using the Socket in Windows. It tries to be a fully blown Webserver and has a lot ...
by jakobssystems
Sun Apr 13, 2025 12:07 pm
Forum: Coding Questions
Topic: Problems in Windows with HTTP-REST API Skeleton
Replies: 20
Views: 1216

Re: Problems in Windows with HTTP-REST API Skeleton

First thank you all for your input.. right now i am rewriting my thread handling this weekend... so please give some time to answer.
by jakobssystems
Fri Apr 11, 2025 6:59 pm
Forum: Coding Questions
Topic: Problems in Windows with HTTP-REST API Skeleton
Replies: 20
Views: 1216

Re: Problems in Windows with HTTP-REST API Skeleton


It does not crash here at the CloseConnection() line (WIn10 x64 PB 621b2 x86)
But it crashed once in Select NetworkServerEvent()
So I modified it a bit and then it runs smooth:


Adopted your modification but it still keeps crashing here. The first request/response runs, but then it fails.
I am ...
by jakobssystems
Fri Apr 11, 2025 3:01 pm
Forum: Coding Questions
Topic: Problems in Windows with HTTP-REST API Skeleton
Replies: 20
Views: 1216

Re: Problems in Windows with HTTP-REST API Skeleton

this is my last try to clean up everything:


Structure ClientData
ClientID.i
AlreadyCleanedUp.i
EndStructure




If *client

; Check If already cleaned up somewhere Else
If *client\AlreadyCleanedUp = 1
ProcedureReturn
Else

;Set Flag to true in order to prevent 2x ...
by jakobssystems
Fri Apr 11, 2025 11:06 am
Forum: Coding Questions
Topic: Problems in Windows with HTTP-REST API Skeleton
Replies: 20
Views: 1216

Re: Problems in Windows with HTTP-REST API Skeleton

infratec wrote: Fri Apr 11, 2025 9:27 am Instead of

Code: Select all

If *client :  FreeMemory(*client) : EndIf
You should use:

Code: Select all

If *client :  FreeStructure(*client) : EndIf
But that is not a reason for the crash (I think)
FreeStructure in the Cleanup Procedure leads to crash Invalid Memory access (read error at address ... )
by jakobssystems
Fri Apr 11, 2025 9:59 am
Forum: Coding Questions
Topic: Problems in Windows with HTTP-REST API Skeleton
Replies: 20
Views: 1216

Re: Problems in Windows with HTTP-REST API Skeleton


Any chance to try to remove all unneeded part while still preserving the issue ?


Here we go, kicked everything out.
first request is served... 2nd or 3rd request crashes ... in Windows only... in the Cleanup Procedure when it is closed in CloseNetworkConnection
I am checking if client ...
by jakobssystems
Fri Apr 11, 2025 7:55 am
Forum: Coding Questions
Topic: Problems in Windows with HTTP-REST API Skeleton
Replies: 20
Views: 1216

Re: Problems in Windows with HTTP-REST API Skeleton

Good Morning,

I can bring it down to "CloseNetworkConnection" in my rest-api-skeleton.pb, cleaning procedure:


; Clean Up ClientHandling Routine
Procedure CleanupClient(clientID.i, *buffer, *client.ClientData, *tempbuffer)

; Check first before trying to close Connections and free memory
If ...
by jakobssystems
Fri Apr 11, 2025 1:13 am
Forum: Coding Questions
Topic: Problems in Windows with HTTP-REST API Skeleton
Replies: 20
Views: 1216

Re: Problems in Windows with HTTP-REST API Skeleton

thank you for your quick check and suggesttion. Poking behind is prevented with alloc size +1 everywhere. In adition to this I eleminated a race condition in my Main loop when creating threads on PB_NetworkEvent_Connect. This works now with charme handling many parallel threads on GNU/LInux. But ...
by jakobssystems
Thu Apr 10, 2025 8:09 pm
Forum: Coding Questions
Topic: Problems in Windows with HTTP-REST API Skeleton
Replies: 20
Views: 1216

Re: Problems in Windows with HTTP-REST API Skeleton

Now checked against PureBasic 6.21 Beta on Windows 10 baremetal and virtualized Windows 2019 - no success.
Checked my code again, tried multiple compiler options, added more defensive checks (cause I expect broken requesting clients) but again, no success.
For me the NetworkServer of PureBasic is ...
by jakobssystems
Thu Apr 10, 2025 5:30 pm
Forum: Coding Questions
Topic: Problems in Windows with HTTP-REST API Skeleton
Replies: 20
Views: 1216

Problems in Windows with HTTP-REST API Skeleton

Hi there,

this is my first post and my first purebasic steps, please be polite when I am missing someting

I've written an small skeleton for an http rest-api server in purebasic:
https://codeberg.org/tomas-jakobs/rest-api-skeleton

In GNU/Linux (Debian sid and stable) everything works fine and is ...