Search found 1268 matches

by #NULL
Wed Oct 13, 2021 12:22 pm
Forum: Coding Questions
Topic: Where is this memory leaking when using static strings within functions while using threads?
Replies: 2
Views: 332

Re: Where is this memory leaking when using static strings within functions while using threads?

I'm not sure I can reproduce on linux, maybe mem is growing. But aren't you accessing a single static variable from multiple threads without protection by mutex etc.? If multiple threads want to reallocate the string mem behind string and reassign the pointer, some mem might get lost, or the pointer...
by #NULL
Sat Oct 09, 2021 3:03 pm
Forum: Coding Questions
Topic: Run second sqlite query before finishing the previous query?
Replies: 7
Views: 528

Re: Run second sqlite query before finishing the previous query?

(I did not read the previous 2 posts yet) ;do some work here Since you want to process customers independently of wether they have orders, a LEFT JOINT could be what you want. Note: The LEFT JOIN keyword returns all records from the left table (Customers), even if there are no matches in the right t...
by #NULL
Fri Oct 01, 2021 10:10 am
Forum: Bugs - Windows
Topic: HttpRequest and Mysql DATABASE
Replies: 21
Views: 1530

Re: HttpRequest and Mysql DATABASE

loulou2522 wrote: Thu Sep 30, 2021 7:56 pm If i try with ADO connection the programm works well
Is that database actually compatible with mysql?
by #NULL
Wed Sep 29, 2021 10:27 am
Forum: General Discussion
Topic: ReadString slowness...
Replies: 8
Views: 770

Re: ReadString slowness...

That explains it, thanks for clarifying.
by #NULL
Wed Sep 29, 2021 9:38 am
Forum: General Discussion
Topic: ReadString slowness...
Replies: 8
Views: 770

Re: ReadString slowness...

@Fred, can you clarify what you mean by that? Of course, you can't compare a raw read without doing anything, That sounds like it should be faster. against a small read What do you mean by small read, both read the whole file/bytes, don't they? which create a new string buffer, parse every bytes to ...
by #NULL
Sat Sep 25, 2021 6:02 pm
Forum: General Discussion
Topic: LCase faster than #PB_String_NoCase
Replies: 14
Views: 1177

Re: LCase faster than #PB_String_NoCase

The difference becomes a little less pronounced if you use LCase() for test2 as well, which would be necessary if test2 is in undefined case. And NoCase already covers that. ..Or in other words, if you know one of the strings is already in a specific case then you can use LCase() on the other one on...
by #NULL
Fri Sep 24, 2021 6:26 pm
Forum: General Discussion
Topic: LCase faster than #PB_String_NoCase
Replies: 14
Views: 1177

Re: LCase faster than #PB_String_NoCase

I'm on linux as well and NoCase is faster.
by #NULL
Fri Sep 24, 2021 12:24 pm
Forum: Coding Questions
Topic: Updating gadget from thread
Replies: 4
Views: 573

Re: Updating gadget from thread

You would still have to protect cBlock with a mutext or something.
by #NULL
Tue Sep 21, 2021 7:38 am
Forum: Feature Requests and Wishlists
Topic: Debug [DebugLevel, ] <expression>
Replies: 7
Views: 973

Re: Debug [DebugLevel, ] <expression>

With EnableDebugLevelFirst it wouldn't, that's right. I hope you never design a language though. It's bad if you have to look for an EnableDebugLevelFirst in all the previous code to know what a Debug statement actually does.
by #NULL
Mon Sep 20, 2021 7:11 pm
Forum: Feature Requests and Wishlists
Topic: Debug [DebugLevel, ] <expression>
Replies: 7
Views: 973

Re: Debug [DebugLevel, ] <expression>

This code currently currently outputs '1' #val = 1 #dl = 2 DebugLevel #dl Debug #val, #dl After your change it will output nothing without any error, warning or hint. It silently breaks [debugging-]code just because you like the parameters the other way around. There is no way they would even consid...
by #NULL
Sat Sep 18, 2021 8:25 pm
Forum: Coding Questions
Topic: Vector drawing : rotation and parenting
Replies: 4
Views: 730

Re: Vector drawing : rotation and parenting

Well, when I think about it, for a bone system it is probably more intuitive use the x/y relative-to-parent position as an anchor, that already is the center of rotation, and only move backward by the cx/cy from there to get box drawing position. For this you would leave out the x - cx (and y - cy) ...
by #NULL
Sat Sep 18, 2021 8:05 pm
Forum: Coding Questions
Topic: Vector drawing : rotation and parenting
Replies: 4
Views: 730

Re: Vector drawing : rotation and parenting

When doing the rotation, the trick is to move to the center of rotation first, then rotate the coordinate system, and then move backwards as per the rotation center position to get the rotated origin and then draw the box. I used a similar trick in the object setup where i basically set the rotation...
by #NULL
Sat Sep 18, 2021 7:57 pm
Forum: Coding Questions
Topic: Vector drawing : rotation and parenting
Replies: 4
Views: 730

Re: Vector drawing : rotation and parenting

Here is a little demo how it could work. Not sure how the object definition might be different from yours, but just something you can experiment with. You could also replace some MoveCursor() with TranslateCoordinates() i think, that would be more in line with how the rotation is done. EnableExplici...
by #NULL
Fri Sep 17, 2021 7:10 am
Forum: Bugs - Windows
Topic: Invalid memory access on DisableDebugger line when using very large numbers with CreateImage
Replies: 19
Views: 1956

Re: Invalid memory access on DisableDebugger line when using very large numbers with CreateImage

Mistrel wrote: Thu Sep 16, 2021 9:29 pm Why do you think it's OK for the debugger point you to a completely different line than where the problem occurred?
What do you expect the debugger to do? You just disabled it! When something goes wrong, it points you to the last line it is aware of, which is the one with DisableDebugger.
by #NULL
Thu Sep 16, 2021 5:56 pm
Forum: Bugs - Windows
Topic: Invalid memory access on DisableDebugger line when using very large numbers with CreateImage
Replies: 19
Views: 1956

Re: PB x64 - Invalid memory access when disabling debugger before using very large numbers with CreateImage

Large numbers, including PB_Any-generated dynamic IDs are unexpected input causing undefined behaviour, unless that's supposed to be different for CreateImage, Fred has to tell. If you use dynamic stuff, then you have to update your datastructures and their dependencies when stuff changes or gets re...