Recent Posts

Pages: [1] 2 3 ... 10
1
Is that both the Client and Host?
line 10 looks like where I set either or but I am not sure what the context should be?
2
QB64 Discussion / Re: The future of QB64
« Last post by yereverluvinunclebert on Today at 07:25:45 AM »
No politics please - this is a technical thread.
3
QB64 Discussion / Re: Internals of String swapping
« Last post by luke on Today at 06:34:04 AM »
Naturally what should have been a few line change turns out to be an epic battle between me and the type system.

I'll return to this when I'm less frustrated.
4
Bugs / Re: Repeated calls to _LOADFONT with "monospace" can crash
« Last post by SMcNeill on Yesterday at 10:51:28 PM »
I'm not so certain we need a loop at the _FONT statement, so much as we may need to set a flag there (FontInUse) and then pause LOADFONT to stop it from running until the flag is cleared.  Due to multi threads, pausing the end of _FONT may not be as useful as pausing the start of _LOADFONT, until it's finished.

Let's see what Luke and Fell come up with, over the next few days.  I can't seem to pinpoint the issue, so maybe they'll have a little better luck with it.
5
QB64 Discussion / Re: The future of QB64
« Last post by Pete on Yesterday at 10:27:35 PM »
Maybe people who do nothing don't make mistakes, but people who vote for them do. Obama 2008 comes to mind.

Pete :D
6
Bugs / Re: Repeated calls to _LOADFONT with "monospace" can crash
« Last post by Pete on Yesterday at 10:22:04 PM »
Hi
please with what QB64IDE version is the issue coming out?
I've got a very different experience in my TOSHIBA i3 4GB RAM Windows 10 e QB64IDE version 1.2 revision [dev build] from git e490b1a !

I get the error at random times in QB64 v 1.1 on Win 10. I made an auto-run version of Steve's program and noticed that you can increase the delay times but eventually you get a crash. It could take hours, but it will happen. The solution is to keep the font statement in a loop until it completes. That would mean making something whatever library the font statements are in to handle that. That's above my pay grade, as I don't dabble in C/C++ programming.
7
QB64 Discussion / Re: Internals of String swapping
« Last post by codeguy on Yesterday at 09:58:15 PM »
Thank you. I will modify this for using skiplists. But as it stands, the memory overhead for the prior attached algorithm is acceptably low using the n/2 auxiliary merge method, yielding a 33% greater range than standard MergeSort using n auxiliary. Once the string swap is sped up, I expect this version will be significantly faster. Thanks Luke.
8
Bugs / Re: Repeated calls to _LOADFONT with "monospace" can crash
« Last post by SMcNeill on Yesterday at 07:10:04 PM »
@Tempodi -- That's the issue with these type of race conditions; they're intermittent and hard to trace/duplicate.  Your PC may be fast enough (or slow enough) that it might never experience the issue. 

Seems like what we're dealing with is a race condition where the _FONT routine is doing something which ends up erroring out when it finally finishes in the _LOADFONT routine.  The pause after _FONT allows it to finish what it's doing before _LOADFONT starts.

The only issue with a set time for a pause is how long to make that pause.  Different PCs may resolve the race condition at different times, so a set pause isn't the ideal solution.  What we need is to find the root of the issue and then trap it at the source.

So, for now, we're still digging and looking for the final source of the issue.  ;)
9
Bugs / Re: Repeated calls to _LOADFONT with "monospace" can crash
« Last post by TempodiBasic on Yesterday at 06:10:30 PM »
about Luke minimal test I got these result
1. no error
2 error if I add these lines of code

Quote
print i; " ";
_freefont F

here whole code
Code: [Select]
_FONT _LOADFONT("c:\windows\fonts\cour.ttf", 16, "monospace")
FOR i = 1 TO 100
    F = _LOADFONT("c:\windows\fonts\cour.ttf", i, "monospace")
    PRINT i; " ";
    _FREEFONT F
NEXT i
END

moreover
using  _DELAY 0.01 or _DELAY 0.1 before the FOR has no results
while using this _DELAY after _FREEFONT F in the FOR loop
it lets to work the program with no error....
It may be a latency about the malloc work behind _LOADFONT  and _FREEFONT...
what do you think about it?
10
Bugs / Re: Repeated calls to _LOADFONT with "monospace" can crash
« Last post by TempodiBasic on Yesterday at 05:50:23 PM »
I have no issue after REMMED  _LIMIT 25

here the code I use
Code: [Select]
DIM NAMEF$, q AS LONG, F AS LONG

NAMEF$ = "C:\Windows\Fonts\arial.ttf" 'micross.ttf"
'JAVATEXT.TTF" 'GABRIOLA.TTF" 'LUCON.TTF" 'impact.ttf"
q = _LOADFONT(NAMEF$, 16, "monospace")
IF q THEN
    _FONT q
ELSE
    PRINT q
END IF
ScaleScreen 0 'initialize the font settings

PRINT "Hello World"
SLEEP

ScaleScreen 50
SLEEP
ScaleScreen 200
SLEEP
ScaleScreen 150
SLEEP





SUB ScaleScreen (percent AS INTEGER)
    STATIC FontSize(4 TO 100), RanOnce
    SHARED F AS LONG, NAMEF$
    IF NOT RanOnce THEN
        RanOnce = -1
        FOR i = 4 TO 100
            '            _LIMIT 25
            F = _LOADFONT(NAMEF$, i, "monospace")
            IF F > 0 THEN
                FontSize(i) = _FONTWIDTH(F)
                _FREEFONT F
            ELSE
                PRINT F 'make and keep an array of font sizes so we don't have to keep loading them over and over
            END IF
        NEXT
    END IF
    IF percent = 0 THEN EXIT SUB
    h = _FONTWIDTH
    desiredscale = (percent / 100) * h
    FOR i = 5 TO 100
        IF FontSize(i) > desiredscale THEN EXIT FOR
    NEXT
    Ftemp = _FONT
    F = _LOADFONT(NAMEF$, i - 1, "monospace")
    _FONT F
    IF Ftemp <> 16 THEN _FREEFONT Ftemp
END SUB
it is your code with some control to get no error rising up from a loading error like a file not found!
Pages: [1] 2 3 ... 10