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 ...
Search found 12 matches
- Thu Jun 26, 2025 3:27 pm
- Forum: Applications - Feedback and Discussion
- Topic: QR-/Barcode Detection from Webcams/RTSP Livestreams
- Replies: 1
- Views: 1163
- 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
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
- 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 ...
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 ...
- 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.
- 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 ...
- 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 ...
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 ...
- 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
FreeStructure in the Cleanup Procedure leads to crash Invalid Memory access (read error at address ... )infratec wrote: Fri Apr 11, 2025 9:27 am Instead ofYou should use:Code: Select all
If *client : FreeMemory(*client) : EndIf
But that is not a reason for the crash (I think)Code: Select all
If *client : FreeStructure(*client) : EndIf
- 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 ...
- 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 ...
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 ...
- 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 ...
- 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 ...
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 ...
- 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 ...
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 ...