Recent

Recent Posts

Pages: [1] 2 3 ... 10
1
2
General / Macros confuse error message line number?
« Last post by Eugene Loza on Today at 07:08:13 pm »
In some situations, like the example below, the error message points to $define instead of actual line where the error has happened:

Code: Pascal  [Select][+][-]
  1. program Project1;
  2. var
  3.   A: TObject;
  4.  
  5. {$macro on}
  6. {$define AObject:=(A as TObject)}
  7.  
  8. begin
  9.   A := TObject.Create
  10.   AObject.Tag := 0;
  11.   A.Free;
  12. end.

I wonder if there a way to effectively find the actual faulty line in code? In the example it's trivial - a forgotten semicolon and incorrect Create syntax. But when the macro is located inside of an include file and used a few dozens of times throughout a relatively large unit, debugging some trivial typos becomes slightly harder than necessary.
3
Hi,

I need compile a project in lazarus, to run in older 10.7.5 system. On the Monterey (12.5.1) all ok, but on 10.7.5 crash on start.

I tested a simple project without nothing, and the same crash.

Have some compile option to support old system, or something to-do to run on older system?


The details of the report of crash is:

Code: Pascal  [Select][+][-]
  1. Process:         launchd [68384]
  2. Path:            /Users/USER/Documents/*/test_path.app/Contents/MacOS/test_path
  3. Identifier:      com.company.test_path
  4. Version:         ??? (???)
  5. Code Type:       X86-64 (Native)
  6. Parent Process:  launchd [379]
  7.  
  8. Date/Time:       2024-04-16 13:54:00.937 -0300
  9. OS Version:      Mac OS X 10.7.5 (11G63)
  10. Report Version:  9
  11.  
  12. Interval Since Last Report:          34948118 sec
  13. Crashes Since Last Report:           50711
  14. Per-App Crashes Since Last Report:   9
  15. Anonymous UUID:                      6E8BCDDD-A4E0-4A73-9329-57670CD815D1
  16.  
  17. Crashed Thread:  Unknown
  18.  
  19. Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
  20. Exception Codes: KERN_INVALID_ADDRESS at 0x00007fff5fc01028
  21.  
  22. Backtrace not available
  23.  
  24. Unknown thread crashed with X86 Thread State (64-bit):
  25.   rax: 0x0000000000000055  rbx: 0x0000000000000000  rcx: 0x0000000000000000  rdx: 0x0000000000000000
  26.   rdi: 0x0000000000000000  rsi: 0x0000000000000000  rbp: 0x0000000000000000  rsp: 0x0000000000000000
  27.    r8: 0x0000000000000000   r9: 0x0000000000000000  r10: 0x0000000000000000  r11: 0x0000000000000000
  28.   r12: 0x0000000000000000  r13: 0x0000000000000000  r14: 0x0000000000000000  r15: 0x0000000000000000
  29.   rip: 0x00007fff5fc01028  rfl: 0x0000000000010203  cr2: 0x00007fff5fc01028
  30. Logical CPU: 2
  31.  
  32. Binary images description not available
  33.  
  34.  
  35. External Modification Summary:
  36.   Calls made by other processes targeting this process:
  37.     task_for_pid: 1
  38.     thread_create: 0
  39.     thread_set_state: 0
  40.   Calls made by this process:
  41.     task_for_pid: 0
  42.     thread_create: 0
  43.     thread_set_state: 0
  44.   Calls made by all processes on this machine:
  45.     task_for_pid: 20394575
  46.     thread_create: 0
  47.     thread_set_state: 0
  48.  
  49. Model: iMac12,1, BootROM IM121.0047.B1F, 4 processors, Intel Core i5, 2.5 GHz, 8 GB, SMC 1.71f22
  50. Graphics: AMD Radeon HD 6750M, AMD Radeon HD 6750M, PCIe, 512 MB
  51. Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1333 MHz, 0x0000, 0x484233535530303447464D384D4D44333320
  52. Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1333 MHz, 0x80AD, 0x484D5434353153364D465238432D50422020
  53. AirPort: spairport_wireless_card_type_airport_extreme (0x168C, 0x9A), Atheros 9380: 4.0.67.5-P2P
  54. Bluetooth: Version 4.0.8f17, 2 service, 18 devices, 1 incoming serial ports
  55. Network Service: Ethernet, Ethernet, en0
  56. Serial ATA Device: ST3500418AS, 500,11 GB
  57. Serial ATA Device: Samsung SSD 850 EVO 1TB, 1 TB
  58. USB Device: FaceTime HD Camera (Built-in), apple_vendor_id, 0x850b, 0xfa200000 / 3
  59. USB Device: hub_device, 0x0424  (SMSC), 0x2514, 0xfa100000 / 2
  60. USB Device: Dell USB Entry Keyboard, 0x413c  (Dell Inc.), 0x2107, 0xfa120000 / 5
  61. USB Device: BRCM2046 Hub, 0x0a5c  (Broadcom Corp.), 0x4500, 0xfa110000 / 4
  62. USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x8215, 0xfa111000 / 8
  63. USB Device: hub_device, 0x0424  (SMSC), 0x2514, 0xfd100000 / 2
  64. USB Device: USB Optical Mouse, 0x046d  (Logitech Inc.), 0xc077, 0xfd130000 / 5
  65. USB Device: Internal Memory Card Reader, apple_vendor_id, 0x8403, 0xfd110000 / 4
  66. USB Device: IR Receiver, apple_vendor_id, 0x8242, 0xfd120000 / 3
  67.  
4
Third party / Re: InstallAware Using Lazarus IDE
« Last post by msintle on Today at 06:53:01 pm »
Would anybody like to look into making Lazarus's cross-platform native code setups using InstallAware?

A single project would compile into Windows, Linux (aarch64 and AMD64), and macOS (Intel and Apple Silicon) targets.
5
LCL / Re: Form scaling
« Last post by fxeconomist on Today at 06:48:40 pm »
I don't think I have any reason to switch back. I actually used CodeTyphon because I found Lazarus documentation installed there easily.
Least on my first install, context-sensitive help worked immediately.

I migrated the project to Lazarus because there is just more stuff available, the kind of stuff I would need, like compiling for Android and 3d engines.

All options are set, including the Scaled property of the form.

But it doesn't make any sense. If the Width property is in pixels, or in pixels relative to current UHD resolution, then hardcoding a Wdith/Height inside is a bad thing, right ? Cause these numbers would be really hardcoded to the UHD resolution and wouldn't change.

The thing is in CodeTyphon the Form Designer has navigation bars on the form, so I can make the form larger while its window remains smaller. When the application starts, the form is created at its full size.

In Lazarus the Form Designer doesn't have navigation bars on the form, if I want the full form I have to keep it at full size while designing it.

This became hard, so I thought I can make the form smaller in designer and then readjust it in the .Paint method. But it's resolution hardcoded, so that will cause problems in case I want to compile for another target...
6
Third party / Re: C-evo: New Horizons 1.3.0 release
« Last post by Chronos on Today at 06:32:41 pm »
A new version 1.3.2 was released which supports High DPI screens and scale game interface according system settings.

https://app.zdechov.net/c-evo

One interesting thing about this is that C-evo as a game is pretty big project and it has a lots of hard coded user interface dimension constants so it was not as simple as scaling those constants with some scale function or LCL scaling. So I had to use different approach and I have developed scaling layer between the game and LCL called DpiControls https://app.zdechov.net/c-evo/browser/trunk/Packages/DpiControls . Thanks to that layer which contains many components like TButton, TPanel, TEdit, TForm, etc., it is possible to keep hardcoded constants and use them as points instead of pixels. With some additional bitmap handling to make precise graphics drawing, it is now possible to simply scale the game according either system settings or according to custom set DPI. So that would be another approach to add High DPI support for existing app.
7
Windows / Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Last post by msintle on Today at 06:32:02 pm »
I would be in favor if Windows was available for ARM64 and supported various devices such as Raspberry Pi, Organe Pi, etc. I mean the real one, not a substitute in the form of Windows IoT (earlier RT and even earlier CE). But these are more of a dream. Porting WinAPI from AMD64/EM64T to ARM64 is years of work (if it is technically possible). All industrial computers (and the like), if they use Windows, probably only run on AMD64/EM64T. The second thing is the processing power that Windows requires to run. However, for now, ARM is inferior to the AMD64/EM64T family in terms of computing power.

It sounds like you're unaware Windows aarch64 has been shipping on laptops (and tablets) since 2018.

The full Windows API is available and has been for more than half a decade.

Furthermore, not only can Windows aarch64 emulate x86 apps, it can also emulate amd64 apps starting with Windows 11 (although, this doesn't extend to things like major shell extensions, where native code aarch64 is required).

Microsoft released (and upgraded) Surface 9 X as an aarch64 device years ago, and in May this year they are going to launch another major upgrade for it as the consumer Surface 10 device, again implemented as an aarch64 platform - their first major consumer play for the first time on aarch64.

So yes, it is high time Free Pascal and Lazaru supports aarch64 targets on Windows - the only (and ironically, biggest) platform where they lack this support.
8
General / Re: How can i make this window ?
« Last post by Handoko on Today at 06:23:43 pm »
It is relatively easy to write a custom popup, for example this is my Frameless popup in the User Interface section in the link below:

https://wiki.freepascal.org/Portal:HowTo_Demos#User_Interface
9
LCL / Re: Form scaling
« Last post by wp on Today at 06:22:43 pm »
I don't know how CodeTyphon handles form scaling. Maybe it is not compatible to the way Lazarus does it. Is the box "Use LCL Scaling" checked after opening the project in Lazarus? In Windows, you should also make sure that "Use manifest resource" is checked and one of the "on" options in the "DPI awareness" combobox is selected.

But in general: I don't think that it is a good idea to switch between Codetyphon and Lazarus. Either use CodeTyphon, then stay with it. Or use Lazarus, then stay with it, too.
10
Cocoa / Re: CocoaInt.CocoaIconUse no longer recognized?
« Last post by dsiders on Today at 06:22:10 pm »
Code: Pascal  [Select][+][-]
  1. CocoaInt.CocoaIconUse := True;
now gives error
Quote
Idenfier not found CocoaIconUse
Has this been deprecated since removed? (Using recent stable build as downloaded by FPCUpDeluxe)

In Lazarus trunk, it is located in lcl/interfaces/cocoa/cocoaconfig.pas not cocoaint.pas.
Pages: [1] 2 3 ... 10

TinyPortal © 2005-2018