News, Blogs, and Tips

Workaround for FMX Memory Leaks on Windows in 10.2.1

Marco Cantu - Wed, 08/16/2017 - 01:58

Many of our customers today write FireMonkey Windows applications. We recently got some customer reports on FMX memory leaks on Windows using RAD Studio 10.2 Release 1 (or Tokyo Release 1). The issue is reported at https://quality.embarcadero.com/browse/RSP-18774 and https://stackoverflow.com/questions/45588741/delphi-recompiling-application-with-10-2-1-causes-memory-leaks.

If you encounter such issues after installing 10.2.1, we recommend trying the workaround below. We will address this issue in the future.

To our knowledge, the memory leak doesn't happen during program execution, but on termination because a cleanup thread does not excute in time. Delphi MVP Stefan Glienke suggested a relatively simple workaround both on the Quality Portal bug report and in the StackOverflow page linked above. By calling CheckSynchronize (from System.Classes) you can have the application wait for the cleanup threads to execute. This does a quick sync, but does not cause any noticeable delay. 

There are different places where you can put this code, but the simplest one for me is a finalization block in the main form source code (no need to update the library units). This is an example of the code added to the end of the main form unit, along with activating memory leak reporting:



Another very good suggestion is to change the project file (the .dpr file), but your mileage might vary -- you can also consider fixing the library as this will fix all of your applications at once.

Categories: News, Blogs, and Tips

Debugger Callstack Resolver released

Andy’s Blog and Tools - Tue, 08/15/2017 - 09:03

Debugger Callstack Resolver is a Delphi IDE plugin that I wrote in 2011 to make the IDE’s CPU View more readable. It colors different instructions, resolves absolute and memory address jump and call targets and shows their function name if available. It also uses the *.jdbg to show more information (the dcc32 compiler’s jdbg files are for the debug build of the compiler and haven’t match the deployed version since jdbg files exist)

This plugin supports Delphi 2009 – 10.1 Berlin.

[Download]

Categories: News, Blogs, and Tips

Creators Update BPL Loading Issue and Tokyo Release 1

Marco Cantu - Mon, 08/14/2017 - 03:10

As mentioned in the release notes of Tokyo 10.2.1, the latest release of RAD Studio addresses the issues caused by Windows 10 Creators Update and related with DLL and BPL loading. The issue is caused by a change (a bug!) in the DLL loading algorithm of the operating system, an issue that Microsoft has fixed in the new coming release of Windows 10, currently known as Fall Creators Update. I've already covered the problem in a past blog post, http://blog.marcocantu.com/blog/2017-june-delphi-packages-creators-update.html. There is also some discussion on the related Quality Portal bug report at https://quality.embarcadero.com/browse/RSP-17972.

Tokyo Release 1 Fixes the Issue

In this new post I don't want to get back to the technical information already discussed there, but focus on what's changed in Delphi Tokyo Release 1. In short, Embarcadero developers modified the compilers and linkers to emit a single export table section for each BPL, to avoid each section of the export table to cause the operating system to reload the same library once more.

As a experiment, on my primary system (which is running Windows 10 Creators Update) I took a very simple one button VCL application, activated runtime packages (which causes dependencies from the RTL and VCL packages) and started it in the debugger. I used Berlin 10.1.2 and Tokyo 10.2.1 side by side and you can clearly see the difference in the image below:

The Detailed Event Logs

In the detailed log for Tokyo 10.2.1 you can see that some unloading and reloading still happens (unloading is set in bold), but the same can be seen for some Microsoft system DLLs:

Thread Start: Thread ID: 3972. Process ProjectLoad.exe (2964) Process Start: C:\Users\marco\Documents\Embarcadero\Studio\Projects\Win32\Debug\ProjectLoad.exe. Base Address: $00400000. Process ProjectLoad.exe (2964) Module Load: ProjectLoad.exe. Has Debug Info. Base Address: $00400000. Process ProjectLoad.exe (2964) Module Load: ntdll.dll. No Debug Info. Base Address: $76EF0000. Process ProjectLoad.exe (2964) Module Load: KERNEL32.dll. No Debug Info. Base Address: $75320000. Process ProjectLoad.exe (2964) Module Unload: KERNEL32.dll. Process ProjectLoad.exe (2964) Module Load: KERNEL32.dll. No Debug Info. Base Address: $75320000. Process ProjectLoad.exe (2964) Module Load: KERNELBASE.dll. No Debug Info. Base Address: $74DE0000. Process ProjectLoad.exe (2964) Thread Start: Thread ID: 6872. Process ProjectLoad.exe (2964) Thread Start: Thread ID: 12820. Process ProjectLoad.exe (2964) Module Load: vcl250.bpl. Has Debug Info. Base Address: $50A80000. Process ProjectLoad.exe (2964) Module Load: rtl250.bpl. Has Debug Info. Base Address: $00C00000. Process ProjectLoad.exe (2964) Module Unload: rtl250.bpl. Process ProjectLoad.exe (2964) Module Load: SHLWAPI.dll. No Debug Info. Base Address: $75160000. Process ProjectLoad.exe (2964) Module Load: msvcrt.dll. No Debug Info. Base Address: $75DF0000. Process ProjectLoad.exe (2964) Module Load: combase.dll. No Debug Info. Base Address: $75BB0000. Process ProjectLoad.exe (2964) Module Load: ucrtbase.dll. No Debug Info. Base Address: $76200000. Process ProjectLoad.exe (2964) Module Load: RPCRT4.dll. No Debug Info. Base Address: $76C60000. Process ProjectLoad.exe (2964) Module Load: SspiCli.dll. No Debug Info. Base Address: $739C0000. Process ProjectLoad.exe (2964) Module Load: CRYPTBASE.dll. No Debug Info. Base Address: $739B0000. Process ProjectLoad.exe (2964) Module Load: bcryptPrimitives.dll. No Debug Info. Base Address: $750F0000. Process ProjectLoad.exe (2964) Thread Start: Thread ID: 1944. Process ProjectLoad.exe (2964) Module Load: SECHOST.dll. No Debug Info. Base Address: $755C0000. Process ProjectLoad.exe (2964) Module Load: GDI32.dll. No Debug Info. Base Address: $76DD0000. Process ProjectLoad.exe (2964) Module Load: gdi32full.dll. No Debug Info. Base Address: $76AC0000. Process ProjectLoad.exe (2964) Module Load: msvcp_win.dll. No Debug Info. Base Address: $753F0000. Process ProjectLoad.exe (2964) Module Load: USER32.dll. No Debug Info. Base Address: $74FB0000. Process ProjectLoad.exe (2964) Module Load: win32u.dll. No Debug Info. Base Address: $76060000. Process ProjectLoad.exe (2964) Module Load: COMDLG32.dll. No Debug Info. Base Address: $75AC0000. Process ProjectLoad.exe (2964) Module Load: SHCORE.dll. No Debug Info. Base Address: $76E60000. Process ProjectLoad.exe (2964) Module Load: WINSPOOL.DRV. No Debug Info. Base Address: $66030000. Process ProjectLoad.exe (2964) Module Load: SHELL32.dll. No Debug Info. Base Address: $73A90000. Process ProjectLoad.exe (2964) Module Load: bcrypt.dll. No Debug Info. Base Address: $72990000. Process ProjectLoad.exe (2964) Module Load: COMCTL32.dll. No Debug Info. Base Address: $6EF40000. Process ProjectLoad.exe (2964) Module Load: CFGMGR32.dll. No Debug Info. Base Address: $76020000. Process ProjectLoad.exe (2964) Module Load: Windows.Storage.dll. No Debug Info. Base Address: $76530000. Process ProjectLoad.exe (2964) Module Load: ADVAPI32.dll. No Debug Info. Base Address: $75230000. Process ProjectLoad.exe (2964) Module Load: AppCore.dll. No Debug Info. Base Address: $75310000. Process ProjectLoad.exe (2964) Module Load: POWRPROF.dll. No Debug Info. Base Address: $73A40000. Process ProjectLoad.exe (2964) Module Load: profapi.dll. No Debug Info. Base Address: $75150000. Process ProjectLoad.exe (2964) Module Load: OLEAUT32.dll. No Debug Info. Base Address: $76D20000. Process ProjectLoad.exe (2964) Module Load: ole32.dll. No Debug Info. Base Address: $760D0000. Process ProjectLoad.exe (2964) Module Load: oledlg.dll. No Debug Info. Base Address: $63220000. Process ProjectLoad.exe (2964) Module Load: rtl250.bpl. Has Debug Info. Base Address: $00D00000. Process ProjectLoad.exe (2964) Module Unload: rtl250.bpl. Process ProjectLoad.exe (2964) Module Load: rtl250.bpl. Has Debug Info. Base Address: $00D00000. Process ProjectLoad.exe (2964) Module Load: WS2_32.dll. No Debug Info. Base Address: $751C0000. Process ProjectLoad.exe (2964) Module Load: MPR.dll. No Debug Info. Base Address: $72B60000. Process ProjectLoad.exe (2964) Module Load: imagehlp.dll. No Debug Info. Base Address: $76C30000. Process ProjectLoad.exe (2964) Module Load: OLEACC.dll. No Debug Info. Base Address: $65270000. Process ProjectLoad.exe (2964) Module Load: OPENGL32.dll. No Debug Info. Base Address: $6E800000. Process ProjectLoad.exe (2964) Module Load: VERSION.dll. No Debug Info. Base Address: $73940000. Process ProjectLoad.exe (2964) Module Load: NETAPI32.dll. No Debug Info. Base Address: $71B10000. Process ProjectLoad.exe (2964) Module Load: WINHTTP.dll. No Debug Info. Base Address: $72AB0000. Process ProjectLoad.exe (2964) Module Load: SHFOLDER.dll. No Debug Info. Base Address: $73100000. Process ProjectLoad.exe (2964) Module Load: WSOCK32.dll. No Debug Info. Base Address: $729B0000. Process ProjectLoad.exe (2964) Module Load: GLU32.dll. No Debug Info. Base Address: $6FAA0000. Process ProjectLoad.exe (2964) Module Load: netutils.dll. No Debug Info. Base Address: $70000000. Process ProjectLoad.exe (2964) Module Load: IMM32.dll. No Debug Info. Base Address: $761D0000. Process ProjectLoad.exe (2964) Module Load: MSCTF.dll. No Debug Info. Base Address: $75470000. Process ProjectLoad.exe (2964) Module Load: UxTheme.dll. No Debug Info. Base Address: $6CBE0000. Process ProjectLoad.exe (2964) Module Load: dwmapi.dll. No Debug Info. Base Address: $6AD20000. Process ProjectLoad.exe (2964) Module Load: WTSAPI32.dll. No Debug Info. Base Address: $66E80000. Process ProjectLoad.exe (2964) Module Load: WINSTA.dll. No Debug Info. Base Address: $68D20000. Process ProjectLoad.exe (2964) Module Load: TextInputFramework.dll. No Debug Info. Base Address: $6D180000. Process ProjectLoad.exe (2964) Module Load: CoreMessaging.dll. No Debug Info. Base Address: $6CEC0000. Process ProjectLoad.exe (2964) Module Load: CoreUIComponents.dll. No Debug Info. Base Address: $6CF50000. Process ProjectLoad.exe (2964) Module Load: WinTypes.dll. No Debug Info. Base Address: $6FBE0000. Process ProjectLoad.exe (2964) Module Load: NTMARTA.dll. No Debug Info. Base Address: $71F10000. Process ProjectLoad.exe (2964) Module Load: USERMGRCLI.dll. No Debug Info. Base Address: $6CEB0000. Process ProjectLoad.exe (2964)

Compare the log above to the same for an application compiled with Berlin 10.1.2:

Thread Start: Thread ID: 3512. Process Project14.exe (6928) Process Start: C:\Users\marco\Documents\Embarcadero\Studio\Projects\Win32\Debug\Project14.exe. Base Address: $00400000. Process Project14.exe (6928) Module Load: Project14.exe. Has Debug Info. Base Address: $00400000. Process Project14.exe (6928) Module Load: ntdll.dll. No Debug Info. Base Address: $76EF0000. Process Project14.exe (6928) Module Load: KERNEL32.dll. No Debug Info. Base Address: $75320000. Process Project14.exe (6928) Module Unload: KERNEL32.dll. Process Project14.exe (6928) Module Load: KERNEL32.dll. No Debug Info. Base Address: $75320000. Process Project14.exe (6928) Module Load: KERNELBASE.dll. No Debug Info. Base Address: $74DE0000. Process Project14.exe (6928) Thread Start: Thread ID: 872. Process Project14.exe (6928) Thread Start: Thread ID: 12124. Process Project14.exe (6928) Thread Start: Thread ID: 5136. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $02160000. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $01740000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $02B80000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $01740000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $02160000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $01740000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $01740000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $01740000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: vcl240.bpl. Has Debug Info. Base Address: $50A70000. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $01740000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Load: USER32.dll. No Debug Info. Base Address: $74FB0000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: win32u.dll. No Debug Info. Base Address: $76060000. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $01740000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: GDI32.dll. No Debug Info. Base Address: $76DD0000. Process Project14.exe (6928) Module Load: gdi32full.dll. No Debug Info. Base Address: $76AC0000. Process Project14.exe (6928) Module Load: msvcp_win.dll. No Debug Info. Base Address: $753F0000. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: ucrtbase.dll. No Debug Info. Base Address: $76200000. Process Project14.exe (6928) Module Load: ADVAPI32.dll. No Debug Info. Base Address: $75230000. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: msvcrt.dll. No Debug Info. Base Address: $75DF0000. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: SECHOST.dll. No Debug Info. Base Address: $755C0000. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: RPCRT4.dll. No Debug Info. Base Address: $76C60000. Process Project14.exe (6928) Module Load: SspiCli.dll. No Debug Info. Base Address: $739C0000. Process Project14.exe (6928) Module Load: CRYPTBASE.dll. No Debug Info. Base Address: $739B0000. Process Project14.exe (6928) Module Load: bcryptPrimitives.dll. No Debug Info. Base Address: $750F0000. Process Project14.exe (6928) Module Load: SHLWAPI.dll. No Debug Info. Base Address: $75160000. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Load: combase.dll. No Debug Info. Base Address: $75BB0000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: OLEAUT32.dll. No Debug Info. Base Address: $76D20000. Process Project14.exe (6928) Module Load: ole32.dll. No Debug Info. Base Address: $760D0000. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $01740000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: SHELL32.dll. No Debug Info. Base Address: $73A90000. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: CFGMGR32.dll. No Debug Info. Base Address: $76020000. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: SHCORE.dll. No Debug Info. Base Address: $76E60000. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: Windows.Storage.dll. No Debug Info. Base Address: $76530000. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: AppCore.dll. No Debug Info. Base Address: $75310000. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: POWRPROF.dll. No Debug Info. Base Address: $73A40000. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: profapi.dll. No Debug Info. Base Address: $75150000. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Load: COMDLG32.dll. No Debug Info. Base Address: $75AC0000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $01740000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $02160000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $01740000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: COMCTL32.dll. No Debug Info. Base Address: $6EF40000. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $01740000. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $02160000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $01740000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: WINSPOOL.DRV. No Debug Info. Base Address: $00930000. Process Project14.exe (6928) Module Unload: WINSPOOL.DRV. Process Project14.exe (6928) Module Load: WINSPOOL.DRV. No Debug Info. Base Address: $66030000. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $01740000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: oledlg.dll. No Debug Info. Base Address: $63220000. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $01740000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $01740000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $01740000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $02160000. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $01740000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $01740000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $02160000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $01740000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: bcrypt.dll. No Debug Info. Base Address: $72990000. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $01740000. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Unload: rtl240.bpl. Process Project14.exe (6928) Module Load: rtl240.bpl. Has Debug Info. Base Address: $00D20000. Process Project14.exe (6928) Module Load: imagehlp.dll. No Debug Info. Base Address: $76C30000. Process Project14.exe (6928) Module Load: WS2_32.dll. No Debug Info. Base Address: $751C0000. Process Project14.exe (6928) Module Load: VERSION.dll. No Debug Info. Base Address: $73940000. Process Project14.exe (6928) Module Load: MPR.dll. No Debug Info. Base Address: $72B60000. Process Project14.exe (6928) Module Load: SHFOLDER.dll. No Debug Info. Base Address: $73100000. Process Project14.exe (6928) Module Load: NETAPI32.dll. No Debug Info. Base Address: $71B10000. Process Project14.exe (6928) Module Load: WSOCK32.dll. No Debug Info. Base Address: $729B0000. Process Project14.exe (6928) Module Load: OPENGL32.dll. No Debug Info. Base Address: $6E800000. Process Project14.exe (6928) Module Load: OLEACC.dll. No Debug Info. Base Address: $65270000. Process Project14.exe (6928) Module Load: WINHTTP.dll. No Debug Info. Base Address: $72AB0000. Process Project14.exe (6928) Module Load: GLU32.dll. No Debug Info. Base Address: $6FAA0000. Process Project14.exe (6928) Module Load: IMM32.dll. No Debug Info. Base Address: $761D0000. Process Project14.exe (6928) Module Load: wkscli.dll. No Debug Info. Base Address: $73190000. Process Project14.exe (6928) Module Load: CSCAPI.dll. No Debug Info. Base Address: $6FA70000. Process Project14.exe (6928) Module Load: MSCTF.dll. No Debug Info. Base Address: $75470000. Process Project14.exe (6928) Module Load: UxTheme.dll. No Debug Info. Base Address: $6CBE0000. Process Project14.exe (6928) Module Load: dwmapi.dll. No Debug Info. Base Address: $6AD20000. Process Project14.exe (6928) Module Load: WTSAPI32.dll. No Debug Info. Base Address: $66E80000. Process Project14.exe (6928) Module Load: WINSTA.dll. No Debug Info. Base Address: $68D20000. Process Project14.exe (6928) Rebuilding Your Project Might not Be Enough

So if you have an application that uses runtime package in Tokyo on Creators Update, do you just need to rebuild it to have it load faster and be able to debug more smoothly? If you are only using runtime packages that come with RAD Studio, rebuilding is enough as the runtime package that ship with 10.2.1 have been re-compiled. If you are using additional packages of your own or for which you have the source code, you'll need to recompile also those packages -- even if they are binary compatible and would work. If you are using third party packages you don't have the source code for, you need to ask the third party vendor for a new version build with the compiler in Tokyo Release 1.

Conclusion: Can We Ask Microsoft for a Fix?

Needless to say, this compiler change shouldn't have been needed, would Microsoft had fixed the issue the introduced timely. Given how many users are affected, this should have been expected. Maybe there is still time to insist with Microsoft to release the fix they did for a future version to the current version of Windows... given how hard it is to skip a release these days.

All we at Embarcadero could do was to apply a "workaround" to the most recent release, Tokyo. We are considering providing the same fix for older versions like Berlin and Seattle -- although again this will require a large update from us and also a new build of all third party packages! 

 

Categories: News, Blogs, and Tips

Quality Portal and Tokyo Release 1

Marco Cantu - Fri, 08/11/2017 - 04:05

The RAD Studio 10.2.1 release (earlier this week) was focused on bug fixing. You can find the list of issues that have been addressed at http://edn.embarcadero.com/article/44763. The list includes 186 customer reported issues there were either fixed or cannot be reproduced any more -- so they also got fix, even if "indirectly" (that is, while fixing some related bug). If we include also duplicate items, expected behavior, and issues we decided not to fix (for some reason) or are not applicable any more, the total of Quality Portal bugs closed is 241.

This list of bugs and these counts don't include bugs reported internally and closed. All bugs touched by the release are 402 (including all resolutions). While there are a few relevant issues not handled (and we are evaluating how and when to release a fix for those) and a few only partially done (we opened a Phase 2 bug for Android performance) a lot if the issues that were resolved improve support of the latest versions of iOS and Xcode, Creators Update (with BPL loading -- more on this in a separate blog post) and Android performance and quality (including the June hot fix).

If we look at the overall status, this is the 30 days status (captured today):

Having pushed out a release, this is very favorable. This is the more realistic 365 days (1 year) status report (this includes bugs only, not feature requests):

What the graph tells is that we need to (literally) double our effort to address bugs and improve the product quality, but both Tokyo and Tokyo Release 1 made a good dent.

The last thing I want to draw your attention to is the list of most voted issues before Release 1:

We did address many of the issues with the highest number of votes in that list:

- Non-functional debugger with Creators Update (which is by itself a Windows issue)

- Android Tokyo app are super slow (data is in the report, but we need to and will do more to address this)

- StringToJString leak

- iOS 10.3

Among those left open, the Chinese VK is very tricky (and regional), IDE DPI awareness is bordering a feature request and something we are making steps towards (we did fix a few more HighDPI VCL issues in Tokyo Release 1) and the C++ linkers issue was addressed, at least in part (we are making more tests and might officially close it).

RAD Studio and Delphi and C++Builder customers keep pushing us to focus more on quality. Over the last couple of years QPS (Quality, Performance, Stability) was and still is today a top priority in our development effort. Some new features like Linux support were really important, therefore we need to keep striking a good balance between features, quality, and bug fixing. But quality is key.

Categories: News, Blogs, and Tips

Delphi Tokyo Release 1 or 10.2.1 is Now Available

Marco Cantu - Tue, 08/08/2017 - 04:03

You can read more about the release and its rationale in the PM article published in the community:

https://community.embarcadero.com/article/16556-rad-studio-10-2-1-released-today

For the actual release information docWiki page, including how to obtain the release, what's new, known issues, visit:

http://docwiki.embarcadero.com/RADStudio/Tokyo/en/10.2_Tokyo_-_Release_1

For a more detailed of issues fixed in this release, see the EDN article at:

http://edn.embarcadero.com/article/44763

We had to put a significant effort into some of the issues, like those caused by Creators Update and changes in iOS, so very happy to make this new version of Delphi and C++ Builder available to our customers. 

Categories: News, Blogs, and Tips

Some Data from the 2017 RAD Studio Developers Survey

Marco Cantu - Thu, 07/27/2017 - 01:42

As most of you know, the Embarcadero PM team has been running fairly extensive yearly surveys regularly. We had the last yearly survey in April 2017. In the past, the company decision has been not to share data coming from the survey, as some of it is fairly sensitive in terms of business analysis and planning. But given that not all of the information fits into this category, this year Embarcadero has decided to share some of the results of the main yearly developer's survey -- that saw several thousand people taking the time and effort to go over almost 100 questions. We plan on sharing some more information in the future, in blog posts focused on specific product features.

RAD Studio Versions Owned

One interesting question we ask our customer is to indicate not only which is the last version they own or are using, but also list all of the versions they owned. This is not historical data, as it depends on developers who took this year survey. A lot of the current customers have been using the product for a long time, but not all versions have been equally successful:

General Information Channels

Another question we want to share the answer for is which online outlets developers go to get information and learn about the product. Notice this was a question allowing multiple answers. This is the list in order of preference (from most popular to least popular), of the group of sites that got over a thousand votes:

1. Stack Overflow

2. Embarcadero Website

3. Embarcadero Community (community.embarcadero.com)

4. Embarcadero Webinars

5. Old forum (forums.embarcadero.com)

6. MVP and Other User's Blogs

7. Quality Portal (quality.embarcadero.com)

These are additional sites and information channels that received less than a thousand votes, again listed from most to least popular

8. User groups and local community forums

9. Country specific developers forums

10. Google+ Delphi Community

11. Live "in person" events

12. Facebook

13. Twitter

Appears our customers are not really social media fanatics, with the limited exception of the Google+ community.

Most Relevant Development Scenarios

These are the key focus areas our customers, in terms of product use. This is another question allowing multiple answers, and the 4 most popular were:

1. Windows VCL Desktop clients

2. FMX/mobile clients

3. FMX/desktop clients

4. JSON/REST Web Services

Building Windows VCL applications clearly remains an important focus for the largest majority of our customers, with over 90% of the survey respondents indicating VCL is relevant to their work.

Developers Revenues Tied to the use of RAD Studio

There is clearly a very varied group of developers using Delphi, C++Builder and RAD Studio, and one way to highlight it is to look at the revenues from using our products developers declared in the survey (and we hope they were honest!). From a 25% of customers not making any money or making less than 1,000 dollars a year, to a few claiming businesses over 100 million dollars!



Other Programming Languages Used

Besides Delphi and C++ languages, most of the developers using RAD Studio use other development tools and programming languages alongside. Among the other popular languages, this year JavaScript surpassed C#. This is the list from most to least popular:

1. JavaScript

2. C#

3. PHP

4. C

5. Java

6. Python

7. VB

8. VB.NET

9. Objective-C

Of course, most of these languages are used with other IDE and editors, the two most popular being:

1. Visual Studio

2. Notepad++

Target Desktop and Mobile OSes

Among the operating systems RAD Studio developers build software for, we have two separate questions, focused on desktop and mobile operating systems, with Windows and Android clearly leading the two groups. The versions break out is fairly interesting, with Windows XP still significantly high (even if decreasing a lot since the last survey).

On the mobile front, data is more or less as expected, with iOS receiving much more focus than its installed user base numbers and the "Other" category significantly dropping from past surveys.

Version Control

Which version control are RAD Studio developers using? I found it worrisome that the second most used VCS is "none" -- at about 30% of the total! Come on, even for a single developer on simple projects, not using a version control system is hard to justify these days:

1. Subversion

2. No Version Control System

3. Git

4. Microsoft's TFS

5. Other

Cloud Services

Another question we asked was about cloud services developers use. This is the list in order from the most popular of the top picks, although there is a mix of real cloud services and file system services:

1. Amazon Web Services (growing from previous year)

2. DropBox

3. Windows Azure (growing from previous year)

4. Google Drive

5. Google Docs

Commonly used Database Engines

Another very interesting question is about the most popular databases among the developers using RAD Studio. No big surprise and very stable over time (with the exception of a huge growth of MariaDB -- a database we already started supporting natively in FireDAC). This is our top ten for relational databases, again starting with the most popular:

1. Microsoft SQL Server

2. MySQL

3. SQLite

4. Firebird

5. Oracle

6. PostgreSQL

7. Access

8. InterBase

9. MariaDB

10. IBLite / IBToGo

The top pick for NoSQL engines remains MongoDB, but the second one, Redis, is a new entry -- all other trailing with only a handful of votes.

Conclusion

Our yearly developers survey provides us with a lot of useful data we use for our planning and product directions. While we cannot share all of it, there is data relevant for the community at large we started covering in this blog posts and we are more than happy to discuss in public. I'll also cover Delphi language requests and other product areas in future blog posts. Stay tuned.

Categories: News, Blogs, and Tips

Delphi Blogs of the Week #54

Marco Cantu - Fri, 07/21/2017 - 08:00

A new round up of Delphi-related news, after my two weeks of vacation around Europe.

Delphi Product Blogs and More

Quickly find add-ons with new GetIt categories by Sarina at https://community.embarcadero.com/blogs/entry/quickly-find-add-ons-with-new-getit-categories (by the way, we are open for ideas and suggestions, given the system is now fairly flexible)

The Enterprise Connector Beta has started by Sarina at https://community.embarcadero.com/blogs/entry/the-enterprise-connector-beta-has-started

Viewing Salesforce Data in RAD Studio Data Explorer by Sarina at https://community.embarcadero.com/article/16541-viewing-salesforce-data-in-rad-studio-data-explorer

#FireMonkey RAD Studio Overview Download Link: http://forms.embarcadero.com/sFireMonkeyRADStudioOverview

Targeting Chrome OS with Delphi via Android and Linux by Jim McKeeth at https://community.embarcadero.com/blogs/entry/targeting-chrome-os-with-delphi-via-android-and-linux

Notable Blog Posts

Send an Email with an Attachment in iOS, Android, and Windows using RAD Studio by Roy Woll at https://www.woll2woll.com/single-post/2017/04/24/Send-an-Email-with-an-Attachment-FireMonkey

ScannerMApp: a QR/barcode scanner app with Delphi, ZXing and TFrameStand by Andrewa Magni at https://blog.andreamagni.eu/2017/06/scannermapp-a-qrbarcode-scanner-app-with-delphi-zxing-and-tframestand/

Using Google Sign-In for Firebase SDK on Android by Allen Drennan at https://blog.grijjy.com/2017/07/20/using-google-sign-in-for-firebase-sdk-on-android/

SIMD Assembly Optimization by Erik van Bilsen at https://blog.grijjy.com/2017/07/10/simd-assembly-optimization/

Building a (real) Linux daemon with Delphi - Part 1 by Paolo Rossi at http://blog.paolorossi.net/2017/07/11/building-a-real-linux-daemon-with-delphi-part-1-2/

4 Years at Embarcadero Technologies by Jim at http://delphi.org/2017/07/4-years-at-embarcadero/

Encode JSON to a FireDAC Memory Table without REST Request by Craig at http://chapmanworld.com/2017/07/07/encode-json-to-a-firedac-memory-table-without-rest-request/

Stay tunes for more news.

Categories: News, Blogs, and Tips

Delphi Blogs of the (Week) Month #53

Marco Cantu - Thu, 06/29/2017 - 04:08
Embarcadero News

Embarcadero Partners with CData to Offer Enterprise Connectors (press release at http://www.businesswire.com/news/home/20170621005319/en). You can read more on this blog post from Sarina, https://community.embarcadero.com/blogs/entry/new-enterprise-connectors-for-delphi-and-c-builder-join-the-beta. The beta of the components can be found in GetIt for Tokyo customers (Professional and above), in a new "Connectors" category. You can use them to connect with over 70 different business, enterprise and social web services. Very nicely integrated with FireDAC and the IDE.

A patch for Tokyo focused on Android is available, http://blog.marcocantu.com/blog/2017-june-102-android-patch.html

Books, books!

Cary Jensen has a new FireDAC book out. See the announcement at http://caryjensen.blogspot.it/2017/05/delphi-in-depth-firedac-is-now-available.html and a review by Stephen at https://community.embarcadero.com/blogs/entry/firedac-book-using-interbase.

Dalija has a new book project focused on Delphi Memory Management, as you can read at https://plus.google.com/u/0/+DalijaPrasnikar/posts/Kkund4GXpXv and https://plus.google.com/+DalijaPrasnikar/posts/CbEnZdx6fNY.

Blog Posts

Visualize JSON using TTreeView at https://community.embarcadero.com/blogs/entry/visualize-json-using-ttreeview

New FireDAC Database Status Page at https://community.embarcadero.com/blogs/entry/new-firedac-database-status-page

Using the Google Cloud Platform APIs at http://​https://blog.grijjy.com/2017/01/13/using-the-google-cloud-platform-apis/

FireMonkey and VCL Style Packs from DelphiStyles.com at https://community.embarcadero.com/blogs/entry/fmx-and-vcl-style-packs-from-delphistyles-com

Third Party Tools

MIDAS dropbox library at http://www.midaconverter.com/dropbox.html

PasLibVlc - use VideoLAN player in Delphi at http://prog.olsztyn.pl/paslibvlc/

The Light End

Delphi developers use spaces, right? https://stackoverflow.blog/2017/06/15/developers-use-spaces-make-money-use-tabs/

Categories: News, Blogs, and Tips

RAD Studio 10.2 Patch for Android Released

Marco Cantu - Mon, 06/26/2017 - 02:33

As Sarina already mentioned in the community site, last week Embarcadero released a second patch for Delphi and C++Builder 10.2 Tokyo. The first patch was focused on tool chain issues, while this new one addresses several issues for Android platform support. Namely, some of the fixes relate with the platform changes in editing (causing problems when using the backspace key) while other address regressions (and performance issues) introduced in 10.2 Tokyo and caused by platform changes in threading support.

You can find a list of open Quality Portal issues the patch addresses in the download page at https://cc.embarcadero.com/item/30781. This patch is available also for trial customers.

The matching source code is available only for registered users at https://cc.embarcadero.com/item/30782. Notice that the source code includes changes that affect multiple platforms, but we haven't released the updated DCU files for those other platforms. In other words, PAS and DCU will most likely be out of synch either with or without the source code patch, depending on the target platform, and you should consider enabling this new source code for Android specific projects or using it as reference only.

We know this is no ideal and this patch is intended as a temporary solution, while we complete and test a full update of the product, including all internal fixes and all platforms.

Categories: News, Blogs, and Tips

Celebrating 22 Exciting Years of Innovation with Delphi

Marco Cantu - Thu, 06/22/2017 - 02:56

Delphi was released over 22 years ago in San Francisco. More than two decades later, the Delphi design philosophy remains steadfastly the same: continual innovation and increasing productivity for developers. Throughout its history, Delphi has been one of the most successful development platforms as it continues to navigate a highly competitive space, maintain its essence as a robust integrative toolset, and serve a large community of passionate developers. Deep investments have been made in the product over the years to migrate Delphi from a Windows-centric product to a multi-device development tool supporting the five most popular operating systems: Windows, macOS, iOS, Android, and Linux.

Global Reach

Delphi developers can be found in virtually every corner of the world, and this is why a city moniker designates each of the 10.x versions to celebrate the diverse global reach and significant contributions that Delphi is making today. Since VCL has been the best object-oriented library Windows API wrapping for over 20 years, Seattle was chosen first (to honor the city near Microsoft headquarters). Next, the Berlin release acknowledged the strong developer community and partner network presence that Delphi has -- not only in Germany, but throughout all of Europe. Most recently, the Tokyo release recognizes the proud and growing community in Japan.

Tokyo Release: Running on Linux

Delphi has long had amazing support for multi-tier and server-side development on Windows. The 10.2 Tokyo release extends all of that support to the Linux operating system. This includes support for WebBroker, WebServices, DataSnap, and the new EMS modules for RAD Server. This means that many of your existing RAD Server/Windows server applications will migrate quite easily over to Linux. Only a few changes are necessary in a typical migration, thanks to the cross-platform FireDAC support. FireDAC works on both Windows and Linux to give you unparalleled access to your favorite databases. 

There's more. Gather up all of your Apache or IIS modules, your REST backend services, your Windows services, or any other server-side or console application, and easily migrate those app components from Windows to Linux.

New features continue to drive strong innovation

If you've not taken a close look lately, it's time to reacquaint yourself with the newer release of Delphi and explore some truly amazing features. These are only a few:

  • Live Preview - Let's say that you're designing an app, and you want to see how it looks on an iOS or Android device. As you work in the Form Designer, simply click a button to see your app in the Live Preview feature of Delphi -- in proper scale and clear definition. There's no need to plug in your device, and you can easily and repeatedly preview the app in either device format as you continue your development work.

  • App Tethering - Maybe you've built a desktop app, and you're also building a mobile companion app. How should these apps talk to each other? App tethering makes it very easy to connect any app on any platform to an app on any other platform -- including Mac-to-Windows, Android-to-Mac, iOS-to-Windows, and so on.

  • Parallel Programming Library - High-level, easy usable, and quick parallelization. It's the holy grail, and it's an integral part of Delphi.

  • Desktop Bridge - Need to get your desktop app into the Windows Store? Simply rebuild, since the Windows Store is available as a build target (just like any other target). No need to mess with the tedium that you may have heard about in other development platforms. We build easy-to-use, straightforward systems. And Delphi is flat-out easy.

Delphi Language Evolution -- Forever Young and Growing

The Delphi language is very powerful. Yet simple, expressive, and easily readable. Excellent for a student and yet solid and robust for the most adept professionals. It is a rich  language that is ready for the future, while retaining its solid roots of the past. The language has a long history, remains dynamic in the present, and we are certain of a brilliant future ahead. Delphi is a multi-faceted language, combining the power of object-oriented programming, advanced support for generic programming, and dynamic constructs-like attributes. And yet, for those who prefer it, full support remains for conventional procedural programming. Delphi is a tool for all trades -- with a variety of compilers and development tools that fully embrace the mobile era.

How broad is the range of the Delphi language? You name it. Desktop apps, client-server applications, massive web server modules, middleware, office automation, apps for the latest phones and tablets, industrial automation systems, and Internet virtual phone networks. These are some of the many real-world uses for Delphi.

The Delphi language, also known as Object Pascal, is a modern type-checked and object-oriented language, featuring single-inheritance and an object reference model (similar to Java and C#). Over the years, the language has grown to include records with methods, operator overloading for records, class data, nested types, sealed classes, final methods, and class helpers.

Beyond the classic OOP features, the Delphi language has gained support for generic data types and collections, anonymous methods (or closures), reflection, and attributes -- along with an extremely rich RTTI and component streaming support architecture. Part of modernizing the language was its transition towards Unicode strings as native types and the use of the ARC (Automatic Reference Counting) memory model on mobile platforms.

In terms of features, the Delphi language has no reason to envy to other more popular programming languages. Delphi is happy retaining its distinctive characteristics, its readability, and its flexibility through such a wide variety of the programming paradigms it supports.

Building a Future Together

Developers are absolutely essential to the future, in which technology will be ever more integral to everything we do. The success of Delphi is largely attributable to its community of passionate developers -- a community that cherishes the elegance and simplicity of the language, but also its ability to create powerful applications with ease and speed.

To learn more about the history of Delphi and today's landscape, read our 55-page booklet at http://online.flowpaper.com/79e6075d/Delphi22Magazine/. Enjoy.

Categories: News, Blogs, and Tips

Pictures from Italian Delphi Day last week

Marco Cantu - Mon, 06/19/2017 - 09:23

Last week I was at a large Italian conference (with almost 100 Delphi developers attending) in my city. I gave a keynote on the status and future of Delphi, and there were many other sessions given by Italian Delphi developers and some international experts (including Stefan, Dmitry, and Yuriy). See the conference site www.delphiday.it for more information and the program.

I was able to meet and talk with many attendees, several of which I've known for years, but I was also happy to find some very young developers in the audience. Here there are a few pictures (some I took and some shared by Paolo Rossi and Marco Breveglieri on social media):

Nice conference. Now I have a fairly long break, I'll be back speaking in public after the summer.

Categories: News, Blogs, and Tips

The Issue with Delphi Runtime Packages and Windows 10 Creators Update

Marco Cantu - Mon, 06/12/2017 - 10:01

Since Windows 10 Creators Update was released two months ago, we have started seeing reports of issues with runtime package (for example, https://quality.embarcadero.com/browse/ RSP-17972, where myself, Embarcadero support and R&D have chimed in), mostly while debugging applications. The issue is affecting applications that use runtime packages (BPL), not applications compiled as a single executable. In general terms, the problem affects all applications that use runtime packages, built with any version of Delphi (recent, old, or even the early ones). In most cases, the slowdown for end user application is relatively limited, however applications with runtime packages on network shares are affected. But what is happening?

The Core Issue: Optimized DLL Loading

Let's start with some background information. On the Windows operating system, dynamic linking (DLLs) support both load-time binding and full runtime binding (LoadLibrary). In both cases, when the DLL is generated it is has a table of entry points (export table). Any other library or executable referring to it has an import table referring to functions of that export table. Since the early days, when the Delphi compiler (and linker) generate a DLL or package library (BPL) by assembling multiple units in a single binary file, and do so by making functions and methods available by creating multiple sections in the export/import table. This was likely a minor linker optimization, and never had a real side effect.

Fast forward to Windows 10 Creators Update. Microsoft decided to rewrite the DLL loading code to make it parallel (different threads can load different libraries in parallel) to optimize applications loading. However this change has ended up affecting the loading of libraries with multiple sections in the export tables. Empirically, it looks like a BPL is loaded once for each segment. Now consider that most of the core Delphi BPL (rtl, vcl, fmx) have dozens and dozens of sections, and the result is libraries are loaded (and unloaded) dozens and dozens of times.

Here is a screenshot of the effect in the Event log (this is a single form FMX application):

While in this simple application on my machine it takes a couple of extra seconds, with larger applications having many runtime packages the effect on the debugger can be fairly extreme. Here is the full debugger log, with operations on packages (and other notable ones) marked in bold:

Thread Start: Thread ID: 12052. Process Project13.exe (13088) Process Start: C:\Users\marco\Documents\Embarcadero\Studio\Projects\Win32\Debug\Project13.exe. Base Address: $00400000. Process Project13.exe (13088) Module Load: Project13.exe. Has Debug Info. Base Address: $00400000. Process Project13.exe (13088) Module Load: ntdll.dll. No Debug Info. Base Address: $76F40000. Process Project13.exe (13088) Module Load: KERNEL32.dll. No Debug Info. Base Address: $74520000. Process Project13.exe (13088) Module Unload: KERNEL32.dll. Process Project13.exe (13088) Module Load: KERNEL32.dll. No Debug Info. Base Address: $74520000. Process Project13.exe (13088) Module Load: KERNELBASE.dll. No Debug Info. Base Address: $73B80000. Process Project13.exe (13088) Thread Start: Thread ID: 14596. Process Project13.exe (13088) Thread Start: Thread ID: 2688. Process Project13.exe (13088) Thread Start: Thread ID: 2076. Process Project13.exe (13088) Module Load: rtl250.bpl. Has Debug Info. Base Address: $50050000. Process Project13.exe (13088) Module Load: rtl250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Load: rtl250.bpl. Has Debug Info. Base Address: $01740000. Process Project13.exe (13088) Module Load: rtl250.bpl. Has Debug Info. Base Address: $02170000. Process Project13.exe (13088) Module Unload: rtl250.bpl. Process Project13.exe (13088) Module Unload: rtl250.bpl. Process Project13.exe (13088) Module Unload: rtl250.bpl. Process Project13.exe (13088) Module Load: OLEAUT32.dll. No Debug Info. Base Address: $74980000. Process Project13.exe (13088) Module Load: msvcp_win.dll. No Debug Info. Base Address: $76130000. Process Project13.exe (13088) Module Load: ucrtbase.dll. No Debug Info. Base Address: $743A0000. Process Project13.exe (13088) Module Load: combase.dll. No Debug Info. Base Address: $75EA0000. Process Project13.exe (13088) Module Load: RPCRT4.dll. No Debug Info. Base Address: $73A30000. Process Project13.exe (13088) Module Load: SspiCli.dll. No Debug Info. Base Address: $73A10000. Process Project13.exe (13088) Module Load: CRYPTBASE.dll. No Debug Info. Base Address: $73A00000. Process Project13.exe (13088) Module Load: bcryptPrimitives.dll. No Debug Info. Base Address: $76810000. Process Project13.exe (13088) Module Load: SECHOST.dll. No Debug Info. Base Address: $763A0000. Process Project13.exe (13088) Module Load: ADVAPI32.dll. No Debug Info. Base Address: $73AF0000. Process Project13.exe (13088) Module Load: msvcrt.dll. No Debug Info. Base Address: $75DE0000. Process Project13.exe (13088) Module Load: USER32.dll. No Debug Info. Base Address: $76870000. Process Project13.exe (13088) Module Load: win32u.dll. No Debug Info. Base Address: $74A20000. Process Project13.exe (13088) Module Load: GDI32.dll. No Debug Info. Base Address: $74A50000. Process Project13.exe (13088) Module Load: gdi32full.dll. No Debug Info. Base Address: $74640000. Process Project13.exe (13088) Module Load: imagehlp.dll. No Debug Info. Base Address: $74060000. Process Project13.exe (13088) Module Load: SHLWAPI.dll. No Debug Info. Base Address: $745F0000. Process Project13.exe (13088) Module Load: ole32.dll. No Debug Info. Base Address: $74080000. Process Project13.exe (13088) Module Load: WS2_32.dll. No Debug Info. Base Address: $73E20000. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $01940000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $031A0000. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $02570000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $01940000. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $02570000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $01940000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $01940000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $01940000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $01940000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $02570000. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $01940000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $01940000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $01940000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $01940000. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $01940000. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $01940000. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $02570000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $01940000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $031A0000. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $02570000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $02570000. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $01940000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $02570000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $01940000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $01940000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $031A0000. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $02570000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $01940000. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $031A0000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $02570000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $01940000. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $02570000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $01940000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $02570000. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Unload: fmx250.bpl. Process Project13.exe (13088) Module Load: VERSION.dll. No Debug Info. Base Address: $73990000. Process Project13.exe (13088) Module Load: NETAPI32.dll. No Debug Info. Base Address: $712F0000. Process Project13.exe (13088) Module Load: MPR.dll. No Debug Info. Base Address: $72BB0000. Process Project13.exe (13088) Module Load: SHFOLDER.dll. No Debug Info. Base Address: $737E0000. Process Project13.exe (13088) Module Load: SHELL32.dll. No Debug Info. Base Address: $74A80000. Process Project13.exe (13088) Module Load: WINHTTP.dll. No Debug Info. Base Address: $72B00000. Process Project13.exe (13088) Module Load: WSOCK32.dll. No Debug Info. Base Address: $72A00000. Process Project13.exe (13088) Module Load: OLEACC.dll. No Debug Info. Base Address: $6F3D0000. Process Project13.exe (13088) Module Load: CFGMGR32.dll. No Debug Info. Base Address: $73D50000. Process Project13.exe (13088) Module Load: OPENGL32.dll. No Debug Info. Base Address: $6F2F0000. Process Project13.exe (13088) Module Load: SHCORE.dll. No Debug Info. Base Address: $73D90000. Process Project13.exe (13088) Module Load: GLU32.dll. No Debug Info. Base Address: $70C90000. Process Project13.exe (13088) Module Load: netutils.dll. No Debug Info. Base Address: $71C70000. Process Project13.exe (13088) Module Load: Windows.Storage.dll. No Debug Info. Base Address: $769B0000. Process Project13.exe (13088) Module Load: AppCore.dll. No Debug Info. Base Address: $73B70000. Process Project13.exe (13088) Module Load: POWRPROF.dll. No Debug Info. Base Address: $760E0000. Process Project13.exe (13088) Module Load: profapi.dll. No Debug Info. Base Address: $74970000. Process Project13.exe (13088) Module Load: fmx250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Load: COMDLG32.dll. No Debug Info. Base Address: $742A0000. Process Project13.exe (13088) Module Load: COMCTL32.dll. No Debug Info. Base Address: $6F510000. Process Project13.exe (13088) Module Load: urlmon.dll. No Debug Info. Base Address: $6CE50000. Process Project13.exe (13088) Module Load: WINMM.dll. No Debug Info. Base Address: $72F20000. Process Project13.exe (13088) Module Load: d3d9.dll. No Debug Info. Base Address: $68C10000. Process Project13.exe (13088) Module Load: WINSPOOL.DRV. No Debug Info. Base Address: $6F280000. Process Project13.exe (13088) Module Load: iertutil.dll. No Debug Info. Base Address: $6CC30000. Process Project13.exe (13088) Module Load: WINMMBASE.dll. No Debug Info. Base Address: $72A10000. Process Project13.exe (13088) Module Load: WINMMBASE.dll. No Debug Info. Base Address: $001D0000. Process Project13.exe (13088) Module Unload: WINMMBASE.dll. Process Project13.exe (13088) Module Load: WINMMBASE.dll. No Debug Info. Base Address: $001D0000. Process Project13.exe (13088) Module Unload: WINMMBASE.dll. Process Project13.exe (13088) Module Load: dwmapi.dll. No Debug Info. Base Address: $6C320000. Process Project13.exe (13088) Module Load: bcrypt.dll. No Debug Info. Base Address: $729E0000. Process Project13.exe (13088) Module Load: IMM32.dll. No Debug Info. Base Address: $76370000. Process Project13.exe (13088) Module Load: UxTheme.dll. No Debug Info. Base Address: $6C2A0000. Process Project13.exe (13088) Module Load: MSCTF.dll. No Debug Info. Base Address: $761C0000. Process Project13.exe (13088) Module Load: gdiplus.dll. No Debug Info. Base Address: $6BFA0000. Process Project13.exe (13088) Thread Start: Thread ID: 2908. Process Project13.exe (13088) Module Load: TextInputFramework.dll. No Debug Info. Base Address: $6F1E0000. Process Project13.exe (13088) Module Load: CoreMessaging.dll. No Debug Info. Base Address: $6C8A0000. Process Project13.exe (13088) Module Load: CoreUIComponents.dll. No Debug Info. Base Address: $6C930000. Process Project13.exe (13088) Module Load: NTMARTA.dll. No Debug Info. Base Address: $71F60000. Process Project13.exe (13088) Module Load: WinTypes.dll. No Debug Info. Base Address: $70CF0000. Process Project13.exe (13088) Module Load: USERMGRCLI.dll. No Debug Info. Base Address: $70C00000. Process Project13.exe (13088) Thread Start: Thread ID: 14704. Process Project13.exe (13088) Thread Start: Thread ID: 11932. Process Project13.exe (13088) Thread Start: Thread ID: 12476. Process Project13.exe (13088) Module Load: CLBCatQ.DLL. No Debug Info. Base Address: $74210000. Process Project13.exe (13088) Module Load: DataExchange.dll. No Debug Info. Base Address: $5B340000. Process Project13.exe (13088) Module Load: d3d11.dll. No Debug Info. Base Address: $625F0000. Process Project13.exe (13088) Module Load: dcomp.dll. No Debug Info. Base Address: $5B250000. Process Project13.exe (13088) Module Load: dxgi.dll. No Debug Info. Base Address: $62850000. Process Project13.exe (13088) Module Load: twinapi.appcore.dll. No Debug Info. Base Address: $6F790000. Process Project13.exe (13088) Module Load: d3d10_1.dll. No Debug Info. Base Address: $6B4A0000. Process Project13.exe (13088) Module Load: d3d10_1core.dll. No Debug Info. Base Address: $69450000. Process Project13.exe (13088) Module Unload: d3d10_1core.dll. Process Project13.exe (13088) Module Unload: d3d10_1.dll. Process Project13.exe (13088) Module Load: d3d10_1.dll. No Debug Info. Base Address: $6B4A0000. Process Project13.exe (13088) Module Load: d3d10_1core.dll. No Debug Info. Base Address: $69450000. Process Project13.exe (13088) Module Load: ResourcePolicyClient.dll. No Debug Info. Base Address: $6D230000. Process Project13.exe (13088) Module Unload: ResourcePolicyClient.dll. Process Project13.exe (13088) Module Load: igd10iumd32.dll. No Debug Info. Base Address: $5C3A0000. Process Project13.exe (13088) Module Load: ncrypt.dll. No Debug Info. Base Address: $6B860000. Process Project13.exe (13088) Module Load: NTASN1.dll. No Debug Info. Base Address: $6B830000. Process Project13.exe (13088) Module Load: igdusc32.dll. No Debug Info. Base Address: $5ECD0000. Process Project13.exe (13088) Module Unload: igdusc32.dll. Process Project13.exe (13088) Module Unload: NTASN1.dll. Process Project13.exe (13088) Module Unload: ncrypt.dll. Process Project13.exe (13088) Module Unload: igd10iumd32.dll. Process Project13.exe (13088) Module Load: igd10iumd32.dll. No Debug Info. Base Address: $5C3A0000. Process Project13.exe (13088) Module Load: ncrypt.dll. No Debug Info. Base Address: $6B860000. Process Project13.exe (13088) Module Load: NTASN1.dll. No Debug Info. Base Address: $6B830000. Process Project13.exe (13088) Module Load: igdusc32.dll. No Debug Info. Base Address: $5ECD0000. Process Project13.exe (13088) Module Load: d2d1.dll. No Debug Info. Base Address: $51D40000. Process Project13.exe (13088) Module Load: CRYPT32.dll. No Debug Info. Base Address: $73EE0000. Process Project13.exe (13088) Module Load: MSASN1.dll. No Debug Info. Base Address: $74390000. Process Project13.exe (13088) Module Load: DWrite.dll. No Debug Info. Base Address: $51AF0000. Process Project13.exe (13088) Module Load: WindowsCodecs.dll. No Debug Info. Base Address: $699C0000. Process Project13.exe (13088)

Notice, again, this is not specific to Delphi 10.2 Tokyo or Delphi 10.1 Berlin, but the same applies to the XE series and even classic versions of the product. The issue is caused by a change at the operating system level.

If you are a developer using RAD Studio, we recommend holding off moving to Windows 10 Creators Update on your developer machines, but this is clearly not a solution, also also prevents you from experimenting with the latest version of Windows.

First Solution: Embarcadero to Fix the Linker

Given the issue is how runtime packages are managed by the operating system, the ultimate solutions can come only from two player: Embarcadero or Microsoft. In fact, it is coming from both sides.

On the Embarcadero side, our R&D team has worked on changing the linker in 10.2 Tokyo, so that it produces a single import table with all required entries. The problem is if we just release a new linker, all existing package libraries will still misbehave. So we need to update a fairly large portion of the product, something more commonly done in an Update (or new Release) than via a hot fix. This is by no mean a final decision and R&D and PM are weighing in the alternatives. Now, what about older version of Delphi? Given the effect on packages (from us and third parties) all requiring to be recompiled, this is a fairly difficult scenario to address for past versions of RAD Studio.

Second Solution: Microsoft to Fix the Loader

The second solution would be to Microsoft to address the issue wih the loaded, keep the optimized parallel loading but taking into account the scenario of Delphi packages (which, in fact, happens also with a handful of platform libraries, even if to a more limited extent). Now, we are very happy to share the fact that we have engaged with Microsoft on the issue and they have been very fast to tackle it. The latest 16215 "Insider Build" of Windows 10 Fall Creators Update (https://blogs.windows.com/windowsexperience/2017/06/08/announcing-windows-10-insider-preview-build-16215-pc-build-15222-mobile) addresses the issue. As you can see, using the RTM version of 10.2 Tokyo the FMX library is loaded twice. Still not exactly as it used to work, but not really causing any actual problem:

This is the complete event log as you start debugging a Windows FireMonkey application with runtime packages on build 16215. Lines related with Delphi packages are in bold:

Thread Start: Thread ID: 208. Process Project3.exe (6184) Process Start: C:\Users\Marco\Documents\Embarcadero\Studio\Projects\Win32\Debug\Project3.exe. Base Address: $00400000. Process Project3.exe (6184) Module Load: Project3.exe. Has Debug Info. Base Address: $00400000. Process Project3.exe (6184) Module Load: ntdll.dll. No Debug Info. Base Address: $76FA0000. Process Project3.exe (6184) Module Load: KERNEL32.dll. No Debug Info. Base Address: $74360000. Process Project3.exe (6184) Module Unload: KERNEL32.dll. Process Project3.exe (6184) Module Load: KERNEL32.dll. No Debug Info. Base Address: $74360000. Process Project3.exe (6184) Module Load: KERNELBASE.dll. No Debug Info. Base Address: $76DD0000. Process Project3.exe (6184) Module Load: rtl250.bpl. Has Debug Info. Base Address: $50050000. Process Project3.exe (6184) Module Load: OLEAUT32.dll. No Debug Info. Base Address: $74EA0000. Process Project3.exe (6184) Module Load: msvcp_win.dll. No Debug Info. Base Address: $76C20000. Process Project3.exe (6184) Module Load: ucrtbase.dll. No Debug Info. Base Address: $76B00000. Process Project3.exe (6184) Module Load: combase.dll. No Debug Info. Base Address: $76680000. Process Project3.exe (6184) Module Load: RPCRT4.dll. No Debug Info. Base Address: $74F40000. Process Project3.exe (6184) Module Load: SspiCli.dll. No Debug Info. Base Address: $739F0000. Process Project3.exe (6184) Module Load: CRYPTBASE.dll. No Debug Info. Base Address: $739E0000. Process Project3.exe (6184) Module Load: bcryptPrimitives.dll. No Debug Info. Base Address: $74580000. Process Project3.exe (6184) Module Load: SECHOST.dll. No Debug Info. Base Address: $746A0000. Process Project3.exe (6184) Module Load: ADVAPI32.dll. No Debug Info. Base Address: $76D50000. Process Project3.exe (6184) Module Load: msvcrt.dll. No Debug Info. Base Address: $73D00000. Process Project3.exe (6184) Module Load: USER32.dll. No Debug Info. Base Address: $764E0000. Process Project3.exe (6184) Module Load: win32u.dll. No Debug Info. Base Address: $73A10000. Process Project3.exe (6184) Module Load: GDI32.dll. No Debug Info. Base Address: $74660000. Process Project3.exe (6184) Module Load: gdi32full.dll. No Debug Info. Base Address: $73AC0000. Process Project3.exe (6184) Module Load: imagehlp.dll. No Debug Info. Base Address: $745E0000. Process Project3.exe (6184) Module Load: SHLWAPI.dll. No Debug Info. Base Address: $76CF0000. Process Project3.exe (6184) Module Load: ole32.dll. No Debug Info. Base Address: $74480000. Process Project3.exe (6184) Module Load: WS2_32.dll. No Debug Info. Base Address: $73C90000. Process Project3.exe (6184) Module Load: fmx250.bpl. Has Debug Info. Base Address: $02B40000. Process Project3.exe (6184) Module Unload: fmx250.bpl. Process Project3.exe (6184) Module Load: VERSION.dll. No Debug Info. Base Address: $73850000. Process Project3.exe (6184) Module Load: MPR.dll. No Debug Info. Base Address: $6FC30000. Process Project3.exe (6184) Module Load: SHFOLDER.dll. No Debug Info. Base Address: $6FC60000. Process Project3.exe (6184) Module Load: SHELL32.dll. No Debug Info. Base Address: $75100000. Process Project3.exe (6184) Module Load: CFGMGR32.dll. No Debug Info. Base Address: $74CC0000. Process Project3.exe (6184) Module Load: SHCORE.dll. No Debug Info. Base Address: $75010000. Process Project3.exe (6184) Module Load: Windows.Storage.dll. No Debug Info. Base Address: $74700000. Process Project3.exe (6184) Module Load: AppCore.dll. No Debug Info. Base Address: $746F0000. Process Project3.exe (6184) Module Load: POWRPROF.dll. No Debug Info. Base Address: $74430000. Process Project3.exe (6184) Module Load: profapi.dll. No Debug Info. Base Address: $76660000. Process Project3.exe (6184) Module Load: NETAPI32.dll. No Debug Info. Base Address: $6EA80000. Process Project3.exe (6184) Module Load: WINHTTP.dll. No Debug Info. Base Address: $70F70000. Process Project3.exe (6184) Thread Start: Thread ID: 6828. Process Project3.exe (6184) Module Load: WSOCK32.dll. No Debug Info. Base Address: $70D50000. Process Project3.exe (6184) Module Load: OLEACC.dll. No Debug Info. Base Address: $6FB20000. Process Project3.exe (6184) Module Load: OPENGL32.dll. No Debug Info. Base Address: $6C8D0000. Process Project3.exe (6184) Thread Start: Thread ID: 6456. Process Project3.exe (6184) Module Load: GLU32.dll. No Debug Info. Base Address: $6FAC0000. Process Project3.exe (6184) Module Load: netutils.dll. No Debug Info. Base Address: $6E4A0000. Process Project3.exe (6184) Module Load: fmx250.bpl. Has Debug Info. Base Address: $02C40000. Process Project3.exe (6184) Module Load: COMDLG32.dll. No Debug Info. Base Address: $76A10000. Process Project3.exe (6184) Module Load: COMCTL32.dll. No Debug Info. Base Address: $70D60000. Process Project3.exe (6184) Module Load: urlmon.dll. No Debug Info. Base Address: $6FF00000. Process Project3.exe (6184) Module Load: WINMM.dll. No Debug Info. Base Address: $6CEC0000. Process Project3.exe (6184) Module Load: WINSPOOL.DRV. No Debug Info. Base Address: $6C860000. Process Project3.exe (6184) Module Load: d3d9.dll. No Debug Info. Base Address: $6B960000. Process Project3.exe (6184) Module Load: iertutil.dll. No Debug Info. Base Address: $6FCE0000. Process Project3.exe (6184) Thread Start: Thread ID: 7136. Process Project3.exe (6184) Module Load: WINMMBASE.dll. No Debug Info. Base Address: $6CE90000. Process Project3.exe (6184) Module Load: dwmapi.dll. No Debug Info. Base Address: $6F4C0000. Process Project3.exe (6184) Module Load: bcrypt.dll. No Debug Info. Base Address: $71C50000. Process Project3.exe (6184) Module Load: IMM32.dll. No Debug Info. Base Address: $74E70000. Process Project3.exe (6184) Thread Start: Thread ID: 4232. Process Project3.exe (6184) Module Load: UxTheme.dll. No Debug Info. Base Address: $70620000. Process Project3.exe (6184) Module Load: MSCTF.dll. No Debug Info. Base Address: $768C0000. Process Project3.exe (6184) Module Load: gdiplus.dll. No Debug Info. Base Address: $70830000. Process Project3.exe (6184) Thread Start: Thread ID: 3124. Process Project3.exe (6184) Module Load: TextInputFramework.dll. No Debug Info. Base Address: $6C7A0000. Process Project3.exe (6184) Module Load: CoreUIComponents.dll. No Debug Info. Base Address: $6C570000. Process Project3.exe (6184) Module Load: CoreMessaging.dll. No Debug Info. Base Address: $6C4D0000. Process Project3.exe (6184) Module Load: NTMARTA.dll. No Debug Info. Base Address: $705F0000. Process Project3.exe (6184) Module Load: WinTypes.dll. No Debug Info. Base Address: $6C400000. Process Project3.exe (6184) Module Load: WinTypes.dll. No Debug Info. Base Address: $05960000. Process Project3.exe (6184) Module Unload: WinTypes.dll. Process Project3.exe (6184) Thread Start: Thread ID: 3616. Process Project3.exe (6184) Thread Start: Thread ID: 5984. Process Project3.exe (6184) Module Load: CLBCatQ.DLL. No Debug Info. Base Address: $73A30000. Process Project3.exe (6184) Module Load: DataExchange.dll. No Debug Info. Base Address: $69B60000. Process Project3.exe (6184) Module Load: d3d11.dll. No Debug Info. Base Address: $69910000. Process Project3.exe (6184) Module Load: dcomp.dll. No Debug Info. Base Address: $69800000. Process Project3.exe (6184) Module Load: dxgi.dll. No Debug Info. Base Address: $69770000. Process Project3.exe (6184) Module Load: twinapi.appcore.dll. No Debug Info. Base Address: $6CBF0000. Process Project3.exe (6184) Module Load: RMCLIENT.dll. No Debug Info. Base Address: $6CBD0000. Process Project3.exe (6184) Module Load: d3d10_1.dll. No Debug Info. Base Address: $63B40000. Process Project3.exe (6184) Module Load: d3d10_1core.dll. No Debug Info. Base Address: $63AE0000. Process Project3.exe (6184) Module Unload: d3d10_1core.dll. Process Project3.exe (6184) Module Unload: d3d10_1.dll. Process Project3.exe (6184) Module Load: d3d10_1.dll. No Debug Info. Base Address: $63B40000. Process Project3.exe (6184) Module Load: d3d10_1core.dll. No Debug Info. Base Address: $63AE0000. Process Project3.exe (6184) Module Load: ResourcePolicyClient.dll. No Debug Info. Base Address: $63A40000. Process Project3.exe (6184) Module Unload: ResourcePolicyClient.dll. Process Project3.exe (6184) Module Load: vm3dum10.exe. No Debug Info. Base Address: $63AA0000. Process Project3.exe (6184) Module Unload: vm3dum10.exe. Process Project3.exe (6184) Module Load: vm3dum10.exe. No Debug Info. Base Address: $63AA0000. Process Project3.exe (6184) Module Unload: vm3dum10.exe. Process Project3.exe (6184) Module Load: vm3dum10.exe. No Debug Info. Base Address: $63AA0000. Process Project3.exe (6184) Module Unload: vm3dum10.exe. Process Project3.exe (6184) Module Load: vm3dum10.exe. No Debug Info. Base Address: $63AA0000. Process Project3.exe (6184) Module Load: d2d1.dll. No Debug Info. Base Address: $65120000. Process Project3.exe (6184) Module Load: CRYPT32.dll. No Debug Info. Base Address: $73DC0000. Process Project3.exe (6184) Module Load: MSASN1.dll. No Debug Info. Base Address: $75000000. Process Project3.exe (6184) Module Load: DWrite.dll. No Debug Info. Base Address: $64EA0000. Process Project3.exe (6184) Module Load: WindowsCodecs.dll. No Debug Info. Base Address: $6C290000. Process Project3.exe (6184)

Perfect solution, right? Well, it does fix the issue for current and old versions of Delphi, but unfortunately not immediately. It is true Microsoft fixed the problem, but if the solution will show only in the next major release of the operating system, still several months away (Fall Creators Update), what happens to developers and users on Creators Update? We still hope and have been asking Microsoft for a fix also for the current version of Windows, and you can certainly join us in this request.

Some Temporary Workarounds

Given the two solutions above are coming but don't address the issue immediately and for all developers, it is important to focus also on a few available workarounds.

A first one is for debugging. Given the issue happens when loading the application, running it standalone and later attaching the debugger to it seems to work for most developers. Clearly, it is an annoyance, but clearly much better than waiting a lot of time or see the debugger get stuck.

A second workaround (for end users) is to consider one of the tools that fix-up and cleanup PE executables, including reorganizing the import/export tables. There are many such tools. One of them is http://www.ntcore.com/exsuite.php.

There are of course other more extreme options, like staying on Windows 10 Anniversary edition, jumping to the latest Insider release or moving from the use of runtime packages to releasing a single executable.

Conclusion

We are working on releasing our linker solution for the issue, we'll keep pushing Microsoft for a broad and more immediate fix, and we are also evaluating alternative workarounds for the short term. Stay tuned for more information.

Categories: News, Blogs, and Tips

Speaking at the Italian Delphi Day 2017 Conference Next Week

Marco Cantu - Fri, 06/09/2017 - 02:44

Next Wednesday, June 14th, I'll give a keynote at the Delphi Day conference in Piacenza, Italy, which is also the city where I live (short trip, for sure). This is a conference I used to organize in the past and that Paolo Rossi and Wintech Italia are continuing to put together, with a fairly impressive group of speakers, Embarcadero MVPs, present and former members of Delphi R&D team.

I'll give a keynote, probably not too technical, and I'm likley going to give it in Italian. But I'll be around the entire day, and likley also stop by the day before (some of the pre-conference seminars are very interesting!). For all information and to sign up (the conference cost is nominal, just pays for the food) see:

http://www.delphiday.it/

I hope to see a lot of Italian Delphi developers there, as usual.

Categories: News, Blogs, and Tips

Webinar Tomorrow: Understanding Automatic Reference Counting

Marco Cantu - Wed, 05/31/2017 - 05:51

Tomorrow, June 1st, I'll give a webinar (at 3 different time slots) focused on automatic reference counting memory model in Delphi.. This is the summary:

Automatic Reference Counting is the memory management system used by Strings & Interfaces on all platforms, and all objects on Linux and Mobile. Unlike Garbage Collection, ARC is purely determisitic and keeps the developer in control. Join Delphi Product Manager Marco Cantu for this deep dive into Automatic Reference Counting.

Yuo can register for any of thr 3 times zones at https://register.gotowebinar.com/rt/65694002494075138

I'll do live Q&A at the end. See you onoline tomorrow.

Categories: News, Blogs, and Tips

Delphi Linux Blogs of the (Week) Month #52

Marco Cantu - Tue, 05/30/2017 - 02:26

Given I haven't made one of these monthly posts in some time, I have a rather large collection of relevant blogs psots and links, and so I decided to split the blog post in two. This is focused in full on Delphi Linux, a following one will be general in scope.

Blog Posts

Creating a Linux Daemon (service) in Delphi by Craig Chapman: http://chapmanworld.com/2017/04/05/creating-a-linux-daemon-service-in-delphi/

Daemonizing a WebBroker Application on Linux by Craig Chapman: https://community.embarcadero.com/blogs/entry/daemonizing-a-webbroker-application-on-linux

Calling Linux Commands from Delphi by Craig Chapman : https://community.embarcadero.com/blogs/entry/calling-linux-commands-from-delphi

Easy install SQL Server driver in Ubuntu by Luis Navarro: https://community.embarcadero.com/blogs/entry/easy-install-sql-server-driver-in-ubuntu

Importing third-party Linux libraries on Delphi 10.2 Tokyo by Allen Drennan: https://blog.grijjy.com/2017/04/06/importing-third-party-linux-libraries-on-delphi-10-2-tokyo/

Try Delphi on Amazon Linux by Haruyuki Mohri: https://community.embarcadero.com/blogs/entry/try-delphi-on-amazon-linux/

Running Delphi Applications on Linux with Docker by Juan Antonio Ruzafa: https://yeiei.net/en/running-delphi-applications-on-linux-with-docker/

How to make Linux platform available in existent console applications: https://blog.andreamagni.eu/2017/03/how-to-make-linux-platform-available-in-existent-console-applications/

Third Party Tools

Getting Started with FmxLinux: https://www.fmxlinux.com/guide.html

Few more features on FM for Linux: https://plus.google.com/u/0/118397897778295642304/posts/dDn1SREATEN?cfem=1

All for Now

This is all for now... hoping to get back to a more consistent schedule.

Categories: News, Blogs, and Tips

Centennial Bridge: BUILD, Creators Update, Windows 10 S and More

Marco Cantu - Mon, 05/29/2017 - 07:28

As you probably know, RAD Studio 10.1 Berlin Update 2 last fall was the first IDE to offer native and direct support for the Windows Desktop Bridge (also known as Centennial Bridge). In short, using the bridge you can create Universal Windows Platform (UWP) applications that can be distributed using Microsoft Windows 10 Store. RAD Studio let's you set a few parameters and generate an APPX file ready for the store. Given I already blogged multiple times on the topic, I won't re-iterate all of the details here.

There are some interesting news from Microsoft. The summary is the Desktop Bridge is considered a successful project by the company and they plan to keep pushing it as the best approach to bring existing Windows applications to the Store.

Windows 10 S

The first interesting announcement was "Windows 10 S". See the FAQ at https://support.microsoft.com/en-us/help/4020089/windows-10-s-faq.

This is a "safe" version of Windows 10 aimed to the consumer market and intended to allow running only applications downloaded from the Windows Store, excluding old traditional apps downloaded directly to the PC. This is potentially a huge change, although it has to be seen if Windows user will go for it. In any case, Desktop Bridge applications will be included in the support, so all of your VCL and FireMonkey applications could still be used after doing some fairly minimal migration (in most cases).

Centennial at BUILD

The second interesting announcement came at the BUILD conference, where Microsoft had many sessions covering the Desktop Bridge. The main one (https://developer.microsoft.com/en-us/windows/projects/events/build/2017/ bring-desktop-apps-to-uwp-and-the-windows-store) focused on new features in Creators Update and general status and plans for the Centennial bridge. For example, Microsoft ahs extended the support to shell extensions, but only for out-of-process scenarios. The (Microsoft) speaker listed RAD Studio as one of the tools supporting the bridge:

Notice the in the session they did demonstrate deployment of a bridge application using Visual Studio, but apparently the steps are so complex they decided to skip the actual demo -- compared to a Delphi demo of APPX generation, that takes seconds!

The other part of the session I'm still a bit unclear is why you'd really need to come up with the complex architecture below, when in most cases a native application (like one built in Delphi) can leverage most of the WinRT APIs like notifications in a much more simple way. While having two applications inter-operating makes sense in some cases, in most it seems fairly overkill.

The Business Store

The other relevant initiative related with the Desktop Bridge is the ability for larger companies to create their own "business store", again using APPX applications. In other words, the same binary you could upload to the public store you can also provide to a company for internal distribution. This makes sense for specific applications, includes license tracking, and because a simpler way to install and update an application on a large number of systems. The same applies to education institutions.

More information at https://docs.microsoft.com/en-us/microsoft-store/windows-store-for-business-overview. Again, most Win32 and Win64 applications built with RAD Studio should be ready to be converted to the new format, and our IDE can help in the process.

Categories: News, Blogs, and Tips

My Visit to Australia and ADUG Symposium

Marco Cantu - Fri, 05/26/2017 - 09:33

Last week I was in Australia for the ADUG Symposium, invited by the ADUG committee. For more information about this user groups, which is one of the largest and best organized in the Delphi community, refer to https://www.adug.org.au/.

The event was nice and well organized, I ended up talking over 3 hours each day, but it was great, and we had a lot of interactions around the status of Delphi and its roadmap. The focus of my sessions was Windows 10 and the Delphi language, plus some product status. Overall there wer about 100 Delphi developers among the two events, which was very nice.

Over the week I spent time in Sydney (to visit a customer and at Code Partners office, the local Embarcadero partner), in Brisbane (another customer and the first conference), and in Melbourne (for the second conference and a meeting with the user group committee). The final weekend I had some free time in Melbourne, I used to see around and meet a couple of friends I had not seen for a long time!

Pictures and Pictures

Here are some pictures taken in the various cities I visited, more or less in chronological order. First is the view from the office of a customer I visited:

Yes, you can see the Opera House in the back. But later in the day I has some time and went there:

Following day, we got to Brisbane, where we had the first conference:

Same day we flew to Melbourne, for the next day (larger) event -- Malcolm is speaking here:

Next day I was invited to a meeting of the user group committee, to offer suggestions for events, topics, and have some chat (and some good food offered by one of the members at this house):

The same day, we got back to the city of Melbourne and over Eureka tower (the tallest tower in the Southern atmosphere). This was the view of the downtown area from the tower:

The last day I still had some fre time and ended up looking for penguins out "in the wild"... and I found some near the city, in a small protected area. It was dark, so not great pictures:

That's all. It was a nice trip... looking forward for more Delphi developers to visit around the world!

Categories: News, Blogs, and Tips

RAD Studio May 2017 Roadmap and Commentary

Marco Cantu - Thu, 05/18/2017 - 19:20

Over the last week, Embarcadero published a new official RAD Studio roadmap and an additional blog post with Product Manager comments and further information (including a section of mine).

Here are the links, in case you missed one of those:

https://community.embarcadero.com/article/news/16519-rad-studio-roadmap-may-2018

https://community.embarcadero.com/blogs/entry/may-2017-roadmap-commentary-from-product-management

Categories: News, Blogs, and Tips

New FireDAC Database Status Page

Marco Cantu - Wed, 05/10/2017 - 03:41

Since last year, beside our regular docwiki with the extensive product documentation (it has over a quarter million pages!) Embarcadero has a platforms status wiki indicating with versions of operating systems are supported -- and how that changes over different versions of RAD Studio. The page includes also information on just released operating system updates and fixes or workarounds for those.

Now we have added a new page listing the versions of the RDMBS FireDAC officially supports in different versions of RAD Studio. We plan adding similar workarounds and additional information as it becomes available, although in most cases newer database versions work fine with drivers tested for previous versions. The new page is at:

http://docwiki.embarcadero.com/Status/en/FireDAC_Database_Support

Categories: News, Blogs, and Tips