Re: [fpc-pascal] How is EntryInformation.OS.haltproc assigned?
On Tue, Dec 5, 2017 at 7:28 PM, Victor Campillowrote: > I don't know if you have only the problem with Manjaro Linux, but in case it > helps I just made a few test building a few Qt LCL examples with Lazarus > Trunk + FPC trunk in Xubuntu 64-bit and does not get any access violation. Thanks for testing. It looks like nobody has the exact same problem. There is a report about different crashes with QT: https://bugs.freepascal.org/view.php?id=29409 It happens only sometimes in some computers. Juha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How is EntryInformation.OS.haltproc assigned?
On 04/12/17 21:15, Juha Manninen wrote: I am testing with a 64-bit Manjaro Linux. I get an access violation when closing any LCL application built with QT bindings using FPC trunk. When using FPC 3.0.2 there was no access violation, and neither with other widgetsets. Only FPC trunk + QT posed a problem. Hi Juha, I don't know if you have only the problem with Manjaro Linux, but in case it helps I just made a few test building a few Qt LCL examples with Lazarus Trunk + FPC trunk in Xubuntu 64-bit and does not get any access violation. Best Regards. -- Victor Campillo ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How is EntryInformation.OS.haltproc assigned?
On 04.12.2017 21:15, Juha Manninen wrote: > I am testing with a 64-bit Manjaro Linux. > I get an access violation when closing any LCL application built with > QT bindings using FPC trunk. When using FPC 3.0.2 there was no access > violation, and neither with other widgetsets. Only FPC trunk + QT > posed a problem. > I remember seeing this for some time, surely half a year, when testing > FPC trunk. > An app only says: > An unhandled exception occurred at $7F180E69437C: > EAccessViolation: > $7F180E69437C > Breakpoints inside the app did not reveal anything. > > I wanted to find out what is happening and built FPC trunk with debug info. > The error happens in procedure System_exit in rtl/linux/system.pp, at line: > EntryInformation.OS.haltproc(ExitCode); > > Backtrace is not very useful: > #0 SYSTEM_EXIT at system.pp:174 > #1 fpc_do_exit at ../inc/system.inc:1076 > #2 main at project1.lpr:20 > > In debugger the data in both records "EntryInformation" and > "EntryInformation.OS" look valid. > Apparently the haltproc is not assigned. Where should it be assigned? > The only place under rtl/linux I find haltproc assigned is in > "si_dll.inc". There procedure _FPC_shared_lib_haltproc deals with > shared libraries. Not relevant here. haltproc is assigned in the RTL's Linux startup files. Depending on whether the specific platform uses assembler or Pascal startup its either rtl/linux//*prt0.as or rtl/linux//si_*.inc. The specific file depends on whether you're linking against C-libraries (cprt0.as, si_c.inc) or not or whether you're building a library (dllprt0.as, si_dll.inc) or a static program (prt0.as, si_prc.inc). In case of x86_64 the assembler files are used despite the Pascal files already existing. > After the crash I get an assembly window pointing to this line: > 760AE37C 660f6f442410 movdqa 0x10(%rsp),%xmm0 > Isn't xmm0 a SSE2 register or something? I don't think the compiler > generated such code. Yes, xmm0 is a SSE2 register, but they're part of the x86_64 ABI (both SysV and Windows) and can be used without problems as all x86_64 processers support it (with I think only the really early Athlons being exceptions). > Amazingly enough the Lazarus IDE itself when built with QT bindings > does not crash at the end. Somehow the QT bindings are quilty but how? > Any clues where I should look for the problem? Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] How is EntryInformation.OS.haltproc assigned?
I am testing with a 64-bit Manjaro Linux. I get an access violation when closing any LCL application built with QT bindings using FPC trunk. When using FPC 3.0.2 there was no access violation, and neither with other widgetsets. Only FPC trunk + QT posed a problem. I remember seeing this for some time, surely half a year, when testing FPC trunk. An app only says: An unhandled exception occurred at $7F180E69437C: EAccessViolation: $7F180E69437C Breakpoints inside the app did not reveal anything. I wanted to find out what is happening and built FPC trunk with debug info. The error happens in procedure System_exit in rtl/linux/system.pp, at line: EntryInformation.OS.haltproc(ExitCode); Backtrace is not very useful: #0 SYSTEM_EXIT at system.pp:174 #1 fpc_do_exit at ../inc/system.inc:1076 #2 main at project1.lpr:20 In debugger the data in both records "EntryInformation" and "EntryInformation.OS" look valid. Apparently the haltproc is not assigned. Where should it be assigned? The only place under rtl/linux I find haltproc assigned is in "si_dll.inc". There procedure _FPC_shared_lib_haltproc deals with shared libraries. Not relevant here. After the crash I get an assembly window pointing to this line: 760AE37C 660f6f442410 movdqa 0x10(%rsp),%xmm0 Isn't xmm0 a SSE2 register or something? I don't think the compiler generated such code. Amazingly enough the Lazarus IDE itself when built with QT bindings does not crash at the end. Somehow the QT bindings are quilty but how? Any clues where I should look for the problem? Juha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal