Search found 99 matches

by Iczer
Oct 31, 2023 21:14
Forum: Beginners
Topic: Runtime error 4 (out of memory) on Redim?
Replies: 7
Views: 1570

Re: Runtime error 4 (out of memory) on Redim?

Function 'wcsncpy' is from standart include '\inc\crt\string.bi' other is macros: #Macro CleanUp_StringPTR(sPTR) Scope If sPTR <> 0 Then *sPTR = "" DeAllocate(sPTR) sPTR = 0 EndIf End Scope #EndMacro #Macro CleanUp_StringPTRArray(asPTR) Scope If Not (LBound(asPTR) = 0 And Ubound(asPTR) = -...
by Iczer
Oct 31, 2023 17:58
Forum: Beginners
Topic: Runtime error 4 (out of memory) on Redim?
Replies: 7
Views: 1570

Re: Runtime error 4 (out of memory) on Redim?

I added memory usage test before redims and got: x-> IndexSSDB_GetFolderSize :: folder Count > UBound(wszaFolders) : Redim : 65 -> 520 ---------------------------------------------------------------- > GetProcessMemoryInfo RetVal :: true .................................................................
by Iczer
Oct 30, 2023 17:07
Forum: Beginners
Topic: Runtime error 4 (out of memory) on Redim?
Replies: 7
Views: 1570

Re: Runtime error 4 (out of memory) on Redim?

Yes - it was compiled with:

Code: Select all

fbc -gen gcc -asm intel -s gui -dll -export -mt -fpu SSE -vec 2 -exx -t 16386
by Iczer
Oct 30, 2023 16:07
Forum: Beginners
Topic: Runtime error 4 (out of memory) on Redim?
Replies: 7
Views: 1570

Runtime error 4 (out of memory) on Redim?

I got strange error - Aborting due to runtime error 4 (out of memory) at line ... It's x64, not mach of size, function is not recursive, same code works... I just do not understand why it crush... what I should do to make it work? line in question: ReDim Preserve wszaFolders(1 To (folderCount Shl 1)...
by Iczer
Apr 27, 2023 15:12
Forum: General
Topic: plain html-render (replacement for embedded IE)
Replies: 2
Views: 894

plain html-render (replacement for embedded IE)

Is there a something like HTML-render that can be used in windows-GUI as replacement for embedded IE control?
Ideally - I write html,images into control and receive info on clicks (if any). No self activity, no following links and no hdd-access.
by Iczer
Mar 10, 2023 20:50
Forum: General
Topic: Callback FB function lead to crush
Replies: 4
Views: 386

Re: Callback FB function lead to crush

I need some help to translate FB snippet to C to demonstrate crush, but my C-skills... In FreeBasic: Type tagcURLCallBackBuffer strbuf As ZString Ptr size As ULong = 0 allocated As ULong = 0 Declare Constructor() Declare Constructor(ByRef iSizeToAllocate As Integer) Declare Destructor () End Type Co...
by Iczer
Mar 09, 2023 12:44
Forum: General
Topic: Callback FB function lead to crush
Replies: 4
Views: 386

Re: Callback FB function lead to crush

just tried and it not crashed Print "> CleanUp - 0" curl_slist_free_all(cURLSList) Sleep(1000,1) Print "> CleanUp - 1" curl_easy_cleanup(cURLHandle) Sleep(1000,1) Print "> CleanUp - 2" DeAllocate(cURLErrorBuffer) : cURLErrorBuffer = 0 Sleep(1000,1) Print "> CleanUp...
by Iczer
Mar 09, 2023 11:25
Forum: General
Topic: Callback FB function lead to crush
Replies: 4
Views: 386

Re: Callback FB function lead to crush

Also - this version wont crush for some reason. I just not used NEW allocation and passed pointer to userdata as @tInfo Public Function MainDebug2() As Long Export ' ........................................................................................ ' ' ............................................
by Iczer
Mar 09, 2023 10:40
Forum: General
Topic: Callback FB function lead to crush
Replies: 4
Views: 386

Callback FB function lead to crush

I used this FB callback for some time and up to curl 7.86.0 it worked without any problems. However after update to curl 7.88.1 it's use lead to crush on call to curl_easy_cleanup(). I'm almost sure it's curl problem but... to be sure: FB 1.09.0 Public Function MainDebug2() As Long Export ' ...........
by Iczer
Feb 28, 2023 21:53
Forum: Windows
Topic: How to catch SIGPIPE
Replies: 7
Views: 1305

Re: How to catch SIGPIPE

Thanks! I tried to search SIGPIPE and others signals values/defines in freebasic includes but no luck... I found it in standalone mingw-w64 includes, but there it defined only for posix. Will it work in windows? include in question: /** * This file has no copyright assigned and is placed in the Publ...
by Iczer
Feb 27, 2023 12:12
Forum: Windows
Topic: How to catch SIGPIPE
Replies: 7
Views: 1305

How to catch SIGPIPE

It seems one of curl- related libraries sometimes generate SIGPIPE signal and (in multy-thread) I need to catch it and silently dispose myself to prevent my app from crashing. Bu how I can install signal handler in FreeBasic? I tried to get inspiration from: Here's an example program that installs a...
by Iczer
Oct 22, 2022 14:12
Forum: Beginners
Topic: Strange Error on Swap()
Replies: 2
Views: 775

Re: Strange Error on Swap()

Thanks!
by Iczer
Oct 22, 2022 13:11
Forum: Beginners
Topic: Strange Error on Swap()
Replies: 2
Views: 775

Strange Error on Swap()

I'm getting strange error at Swap(): Type tagParentUDT iCount as long iCountMAX as long ptMyUDT as tagMyUDT Ptr Declare sub SomeSubName() End Type Dim As tagParentUDT Ptr ptParentUDT = New tagParentUDT ptParentUDT->iCount = 10 ptParentUDT->iCountMAX = 10 ptParentUDT->ptMyUDT = New tagMyUDT[ptParentU...
by Iczer
Sep 11, 2022 11:07
Forum: General
Topic: undefined reference to `__popcnt'
Replies: 20
Views: 1843

undefined reference to `__popcnt'

I'm trying to compile curl library with http3 support, so I compiled and added nghttp3 and ngtcp2 static libraries - it compiled successfully under mingw64 7.2. But when I added resulted curl static library to FreeBasic 1.09 (gcc 5.2, gcc 8.1) project - compilation fails with: C:/Temp/nghttp3-0.7.0/...
by Iczer
Aug 16, 2022 11:33
Forum: Libraries Questions
Topic: mingw64 compiled dll - missing version on dll properties
Replies: 2
Views: 3058

mingw64 compiled dll - missing version on dll properties

just wanted to check/compare actual version of freshly compiled libavif.dll and discovered that it has none - on right-click->properties in explorer there a no "version" tab in displayed window. Going by library sources, version should be "0.10.1.0". Did I miss something on confi...