Recent

Recent Posts

Pages: [1] 2 3 ... 10
1
Databases / IBX 2.3.3 and INET errors
« Last post by RedOctober on Today at 01:06:45 am »
I'm investigating "Unable to write to connection" errors.  In the firebird.log I see many lines like the following:

INET/inet_error: read errno = 10054, aux server host = JLS1, address = fe80::34c3:aee1:b467:95fc%6/55461

One app, using Delphi and FireDAC components, these errors are tolerated (maybe retried?) and my app keeps running.

In the other app, using Lazarus 1.8.4, FPC 3.0.4 and IBX 2.3.3  these errors are not tolerated, and my app throws a "Unable to write to connection" error, and the app is unusable after that.

Is there a setting in the IBX 2.3.3 components (or somewhere else) that says "Try again 10 times if an INET error occurs" ?

Maybe @tonyw can comment?


2
Networking and Web Programming / Re: Why can't I get ssl to work????
« Last post by trev on Today at 12:14:17 am »
FPC version? Operating system?
3
General / Re: TStringlist is not split correctly
« Last post by winni on Today at 12:09:44 am »
Hi!

Changed your first code to a procedure and loaded the const text
The result is 4 / 4 / 4 / 4

Changed  your first code to rrunning program. Without compiler errors.
Threw out the stream and the try.
Result is 4 / 4 / 4 / 4

fpc 3.04, lin 64

Winni
4
macOS / Mac OS X / Re: Unable to start application
« Last post by Jonas Maebe on Today at 12:00:08 am »
It looks like an issue with a modinit function, probably from a dynamic library. Can you try starting it with the environment variable DYLD_PRINT_INITIALIZERS=1 set to see from which library it comes?
5
macOS / Mac OS X / Unable to start application
« Last post by Grahame Grieve on October 23, 2020, 11:50:34 pm »
while I can run some applications, one of them fails to start:

#0 __pthread_kill at :-1
#1 pthread_kill at :-1
#2 abort at :-1
#3 __report_load at :-1
#4 ImageLoaderMachO::doModInitFunctions at :-1
#5 ImageLoaderMachO::doInitialization at :-1
#6 ImageLoader::recursiveInitialization at :-1
#7 ImageLoader::processInitializers at :-1
#8 ImageLoader::runInitializers at :-1
#9 dyld::runInitializers at :-1
#10  at :0
#11  at :0

This happens after some of my unit initialization code has run, but before all of it has run. But not during a unit initialization - step out of the last one that runs ok, but stepping from there never finds any code before this error happens.

What can I do to investigate?

details: Lazarus = 2.1.0, FPC = 3.3.1, MacOS = 10.15.7. Code = https://github.com/grahamegrieve/fhirserver/blob/master/server/FHIRServerFPC.lpi. It runs ok on windows and linux, so it's something OSX related but there's lot's of possibilities.

Full debugger output:

>> settings set -- frame-format "frame #${frame.index}: ${frame.pc}, {${frame.sp}}, {${frame.fp}} &&//FULL: {${line.file.fullpath}} &&//SHORT: {${line.file.basename}} &&//LINE: {${line.number}} &&//MOD: {${module.file.basename}} &&//FUNC: {${function.name-with-args}} <<&&//FRAME\n"
(lldb) settings set -- frame-format "frame #${frame.index}: ${frame.pc}, {${frame.sp}}, {${frame.fp}} &&//FULL: {${line.file.fullpath}} &&//SHORT: {${line.file.basename}} &&//LINE: {${line.number}} &&//MOD: {${module.file.basename}} &&//FUNC: {${function.name-with-args}} <<&&//FRAME\n"
>> settings set -- thread-format "thread #${thread.index}: tid=${thread.id%tid}: ${frame.pc}, {${frame.sp}}, {${frame.fp}} &&//FULL: {${line.file.fullpath}} &&//SHORT: {${line.file.basename}} &&//LINE: {${line.number}} &&//MOD: {${module.file.basename}} &&//FUNC: {${function.name-with-args}} <<&&//FRAME{, stop reason = ${thread.stop-reason}}\n"
(lldb) settings set -- thread-format "thread #${thread.index}: tid=${thread.id%tid}: ${frame.pc}, {${frame.sp}}, {${frame.fp}} &&//FULL: {${line.file.fullpath}} &&//SHORT: {${line.file.basename}} &&//LINE: {${line.number}} &&//MOD: {${module.file.basename}} &&//FUNC: {${function.name-with-args}} <<&&//FRAME{, stop reason = ${thread.stop-reason}}\n"
>> settings set -- thread-stop-format "thread #${thread.index}: tid=${thread.id%tid}: ${frame.pc}, {${frame.sp}}, {${frame.fp}} &&//FULL: {${line.file.fullpath}} &&//SHORT: {${line.file.basename}} &&//LINE: {${line.number}} &&//MOD: {${module.file.basename}} &&//FUNC: {${function.name-with-args}} <<&&//FRAME{, stop reason = ${thread.stop-reason}}\n"
(lldb) settings set -- thread-stop-format "thread #${thread.index}: tid=${thread.id%tid}: ${frame.pc}, {${frame.sp}}, {${frame.fp}} &&//FULL: {${line.file.fullpath}} &&//SHORT: {${line.file.basename}} &&//LINE: {${line.number}} &&//MOD: {${module.file.basename}} &&//FUNC: {${function.name-with-args}} <<&&//FRAME{, stop reason = ${thread.stop-reason}}\n"
>> target stop-hook add -o "thread list"
(lldb) target stop-hook add -o "thread list"
Stop hook #1 added.
>> settings set -- stop-line-count-after 0
(lldb) settings set -- stop-line-count-after 0
>> settings set -- stop-line-count-before 0
(lldb) settings set -- stop-line-count-before 0
>> settings set -- stop-disassembly-count 0
(lldb) settings set -- stop-disassembly-count 0
>> settings set -- target.env-vars "USER=grahamegrieve"
(lldb) settings set -- target.env-vars "USER=grahamegrieve"
>> settings set -- target.env-vars "PATH=/usr/bin:/bin:/usr/sbin:/sbin"
(lldb) settings set -- target.env-vars "PATH=/usr/bin:/bin:/usr/sbin:/sbin"
>> settings set -- target.env-vars "LOGNAME=grahamegrieve"
(lldb) settings set -- target.env-vars "LOGNAME=grahamegrieve"
>> settings set -- target.env-vars "SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.peYB4OazWr/Listeners"
(lldb) settings set -- target.env-vars "SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.peYB4OazWr/Listeners"
>> settings set -- target.env-vars "HOME=/Users/grahamegrieve"
(lldb) settings set -- target.env-vars "HOME=/Users/grahamegrieve"
>> settings set -- target.env-vars "SHELL=/bin/zsh"
(lldb) settings set -- target.env-vars "SHELL=/bin/zsh"
>> settings set -- target.env-vars "__CF_USER_TEXT_ENCODING=0x1F5:0:15"
(lldb) settings set -- target.env-vars "__CF_USER_TEXT_ENCODING=0x1F5:0:15"
>> settings set -- target.env-vars "TMPDIR=/var/folders/ws/60wjzhsn6d31zr63zf5f74yc0000gn/T/"
(lldb) settings set -- target.env-vars "TMPDIR=/var/folders/ws/60wjzhsn6d31zr63zf5f74yc0000gn/T/"
>> settings set -- target.env-vars "XPC_SERVICE_NAME=lazarus.freepascal.ide.6572"
(lldb) settings set -- target.env-vars "XPC_SERVICE_NAME=lazarus.freepascal.ide.6572"
>> settings set -- target.env-vars "XPC_FLAGS=0x0"
(lldb) settings set -- target.env-vars "XPC_FLAGS=0x0"
>> target create /Users/grahamegrieve/work/fhirserver/exec/64/FhirServerFPC
(lldb) target create /Users/grahamegrieve/work/fhirserver/exec/64/FhirServerFPC
Current executable set to '/Users/grahamegrieve/work/fhirserver/exec/64/FhirServerFPC' (x86_64).
>> settings set -- target.run-args -tests -gui
(lldb) settings set -- target.run-args -tests -gui
>> breakpoint set --func fpc_break_error -K false
(lldb) breakpoint set --func fpc_break_error -K false
Breakpoint 1: no locations (pending).
>> breakpoint set --func fpc_runerror -K false
WARNING:  Unable to resolve breakpoint to any actual locations.
(lldb) breakpoint set --func fpc_runerror -K false
Breakpoint 2: no locations (pending).
>> breakpoint set --func fpc_raiseexception -K false
WARNING:  Unable to resolve breakpoint to any actual locations.
(lldb) breakpoint set --func fpc_raiseexception -K false
Breakpoint 3: where = FhirServerFPC`FPC_RAISEEXCEPTION, address = 0x000000010000cf00
>> breakpoint command add 3
>> p/x $rdi
>> p/x $rdx
>> p ((char ***)$rdi)[0][3]
>> p ((char **)$rdi)[1]
>> DONE
>> version
(lldb) breakpoint command add 3
(lldb) version
>> breakpoint command add 2
>> p/x $rdi
>> DONE
>> version
lldb-1200.0.32.1
Apple Swift version 5.3 (swiftlang-1200.0.29.2 clang-1200.0.30.1)
(lldb) breakpoint command add 2
(lldb) version
>> breakpoint command add 1
>> p/x $rdi
>> DONE
>> version
lldb-1200.0.32.1
Apple Swift version 5.3 (swiftlang-1200.0.29.2 clang-1200.0.30.1)
(lldb) breakpoint command add 1
(lldb) version
>> process launch -n
lldb-1200.0.32.1
Apple Swift version 5.3 (swiftlang-1200.0.29.2 clang-1200.0.30.1)
(lldb) process launch -n
Process 17032 launched: '/Users/grahamegrieve/work/fhirserver/exec/64/FhirServerFPC' (x86_64)
Process 17032 stopped
* thread #1: tid=0xf311f: 0x00007fff6da1033a, 0x00007ffeefbfc1b8, 0x00007ffeefbfc1e0 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libsystem_kernel.dylib &&//FUNC: __pthread_kill <<&&//FRAME, stop reason = signal SIGABRT
  thread #2: tid=0xf313c: 0x00007fff6da0b4ce, 0x000070000d519b18, 0x000070000d519b40 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libsystem_kernel.dylib &&//FUNC: __workq_kernreturn <<&&//FRAME
  thread #3: tid=0xf313d: 0x00007fff6da09dfa, 0x000070000d59c608, 0x000070000d59c660 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libsystem_kernel.dylib &&//FUNC: mach_msg_trap <<&&//FRAME

Process 17032 stopped
* thread #1: tid=0xf311f: 0x00007fff6da1033a, 0x00007ffeefbfc1b8, 0x00007ffeefbfc1e0 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libsystem_kernel.dylib &&//FUNC: __pthread_kill <<&&//FRAME, stop reason = signal SIGABRT
    frame #0: 0x00007fff6da1033a, 0x00007ffeefbfc1b8, 0x00007ffeefbfc1e0 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libsystem_kernel.dylib &&//FUNC: __pthread_kill <<&&//FRAME
>> frame variable -P 1 -D 5
>> version
Target 0: (FhirServerFPC) stopped.
(lldb) frame variable -P 1 -D 5
(lldb) version
>> thread backtrace -c 10
>> version
lldb-1200.0.32.1
Apple Swift version 5.3 (swiftlang-1200.0.29.2 clang-1200.0.30.1)
(lldb) thread backtrace -c 10
* thread #1: tid=0xf311f: 0x00007fff6da1033a, 0x00007ffeefbfc1b8, 0x00007ffeefbfc1e0 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libsystem_kernel.dylib &&//FUNC: __pthread_kill <<&&//FRAME, stop reason = signal SIGABRT
  * frame #0: 0x00007fff6da1033a, 0x00007ffeefbfc1b8, 0x00007ffeefbfc1e0 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libsystem_kernel.dylib &&//FUNC: __pthread_kill <<&&//FRAME
    frame #1: 0x00007fff6dacce60, 0x00007ffeefbfc1c0, 0x00007ffeefbfc1e0 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libsystem_pthread.dylib &&//FUNC: pthread_kill <<&&//FRAME
    frame #2: 0x00007fff6d997808, 0x00007ffeefbfc1f0, 0x00007ffeefbfc220 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libsystem_c.dylib &&//FUNC: abort <<&&//FRAME
    frame #3: 0x00007fff6b4c17e4, 0x00007ffeefbfc230, 0x00007ffeefbfc6f0 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libcrypto.dylib &&//FUNC: __report_load <<&&//FRAME
    frame #4: 0x0000000106cc31d3, 0x00007ffeefbfc700, 0x00007ffeefbfc850 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: dyld &&//FUNC: ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) <<&&//FRAME
    frame #5: 0x0000000106cc35de, 0x00007ffeefbfc860, 0x00007ffeefbfc870 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: dyld &&//FUNC: ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) <<&&//FRAME
    frame #6: 0x0000000106cbdffb, 0x00007ffeefbfc880, 0x00007ffeefbfc8d0 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: dyld &&//FUNC: ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) <<&&//FRAME
    frame #7: 0x0000000106cbc0b4, 0x00007ffeefbfc8e0, 0x00007ffeefbfe030 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: dyld &&//FUNC: ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) <<&&//FRAME
    frame #8: 0x0000000106cbc154, 0x00007ffeefbfe040, 0x00007ffeefbfe080 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: dyld &&//FUNC: ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) <<&&//FRAME
    frame #9: 0x0000000106cadef2, 0x00007ffeefbfe090, 0x00007ffeefbff770 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: dyld &&//FUNC: dyld::runInitializers(ImageLoader*) <<&&//FRAME
(lldb) version
>> thread list
>> version
lldb-1200.0.32.1
Apple Swift version 5.3 (swiftlang-1200.0.29.2 clang-1200.0.30.1)
(lldb) thread list
Process 17032 stopped
* thread #1: tid=0xf311f: 0x00007fff6da1033a, 0x00007ffeefbfc1b8, 0x00007ffeefbfc1e0 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libsystem_kernel.dylib &&//FUNC: __pthread_kill <<&&//FRAME, stop reason = signal SIGABRT
  thread #2: tid=0xf313c: 0x00007fff6da0b4ce, 0x000070000d519b18, 0x000070000d519b40 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libsystem_kernel.dylib &&//FUNC: __workq_kernreturn <<&&//FRAME
  thread #3: tid=0xf313d: 0x00007fff6da09dfa, 0x000070000d59c608, 0x000070000d59c660 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libsystem_kernel.dylib &&//FUNC: mach_msg_trap <<&&//FRAME
(lldb) version
lldb-1200.0.32.1
Apple Swift version 5.3 (swiftlang-1200.0.29.2 clang-1200.0.30.1)


6
General / Re: PE file injection
« Last post by winni on October 23, 2020, 11:35:21 pm »
Hi!

The number of colors in Win 3.1 was depending on the proprietray driver of your graphic adaptor.

But there was no default way how your graphic card had to do that.
In those times true color was rare and expensive.
There were funny things around like 15 bit (3x5 bit).

The best way to find something compatible today is indeed SVGA.

Winni
7
General / Re: TStringlist is not split correctly
« Last post by jamie on October 23, 2020, 11:34:26 pm »
As I told earlier, I found a bug in TStringlist. But this is general in pascal, not only Lazarus / FPC.
I have this piece of code:
Code: Pascal  [Select][+][-]
  1. program project1;
  2.  
  3. uses classes, sysutils;
  4.  
  5. var slTest  : TStringlist;
  6.     slRegel : TStringlist;
  7.     index   : integer;
  8. begin
  9.   slTest  := TStringlist.create;
  10.   slRegel := TStringlist.create;
  11.   try
  12.     slTest.LoadFromFile('test.txt');
  13.     slRegel.Delimiter := ';';
  14.     slRegel.QuoteChar := '"';
  15.     slRegel.StrictDelimiter := true;
  16.     for index := 0 to slTest.count - 1 do
  17.     begin
  18.       slRegel.DelimitedText := slTest[index]);
  19.       writeln(inttostr(slRegel.Count))
  20.     end;
  21.     readln();
  22.   finally
  23.     slregel.free;
  24.     sltest.free;
  25.   end;
  26.  
  27. end.                                          
  28.  
This is my textfile:
Code: Text  [Select][+][-]
  1. field11;field12        ;field13;field14
  2. field21;field22        ;field23;field24
  3. field31;"field32"      ;field33;field34
  4. field41;field42        ;field43;field44
  5.  
When I run this sample, the following results in:
4
4
5
4

The reason is the double quotes together with a few spaces afterwards. TStringlist creates an extra entry.

Am I right or not?

The workaround is:
Code: Pascal  [Select][+][-]
  1. slRegel.DelimitedText := StringReplace(slTest[index],'"','',[rfReplaceAll]);
  2.  

But using strictdelimiter should it work with this workaround.

It's a known problem with the stinglist, at least it's very well known to me..
it seems to work in Delphi but not in fpc when encountering spaces like that and getting an extra line inserted.

Which is why I wrote my own TlinesString class based from Tstrings. It basically works the same but it actually functions correctly.

Its does not handle strings internally like a Stringlist does but instead builds a text table as a single chunk of memory, unlike what stringlist does.

 But you still need stringlist if you want to store arbitrary data in it where as what I did values like #0 are not allowed in strings as a value.

I voiced my opinion already about this and all I got was rocks thrown back at me. so here we are..

I suggest maybe writing your own parser of SPLIT does not work correctly for you in the helpers.

8
Databases / Re: IBX 2.3.3 a tale of two servers
« Last post by RedOctober on October 23, 2020, 11:29:40 pm »
I'm the original poster.  The error has returned, even worse this time.  Adding the .exe name to the "File" exclusions AND the "Process" exclusions in Windows Defender has not helped.  RUBI crashes so often it is unusable, at least via .Rdp over the internet, 10 KM away.  I have not yet done any extensive testing using RUBI over .Rdp within the clinic.

9
FPvectorial / Group elements in svg output ?
« Last post by BobT on October 23, 2020, 11:21:53 pm »
Using fpvectorial, is it possible to generate an svg document / file with grouped elements ? My immediate goal is to be able to group simple rectangle shapes each with their own text element as a label, but a general solution capable of deeper levels of groupiing would have other uses as well.
10
General / Re: PE file injection
« Last post by 440bx on October 23, 2020, 11:05:21 pm »
P.S. Tested my program on Win32s. It works, but looks ugly without driver, that supports 256 colors. Does Win 3.1 even support 256 colors? It's built-in SVGA driver is broken. Where can I find working one?
It's been way too long since I was involved with Win 3.1, in spite of that, I am fairly sure that it did support 256 colors.  As far as finding an SVGA driver for it, I doubt there is a video card around that makes a Win 3.1 driver available.

A possible alternative, which I have _not_ tried with Win 3.1, is to install it in a virtual machine.  VMware workstation has a "default" SVGA driver for the O/Ss it supports.  That _might_ satisfy your needs.  Note, this is just a guess based on my experience with VMware, I don't really know what it can do with Win 3.1.

HTH.
Pages: [1] 2 3 ... 10

TinyPortal © 2005-2018