The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,854 other subscribers

Archive for the ‘Delphi’ Category

Seems Delphi XE6 is welcomed: “Welkom RAD Studio/Delphi/C++Builder XE6!” (via: Barnsten B.V. – Google+)

Posted by jpluimers on 2014/04/15

Interesting: didn’t see this on the Embarcadero site yet, so the announcment of Welkom RAD Studio/Delphi/C++Builder XE6! by Barnsten B.V. – Google+ is a bit surprising.

Edit:

Given the XE6 webinar on the 16th (that is tomorrow!), it wasn’t that surprising, but in my memory those webinars usually were before the product became actually available.

Barnsten was a tad bit faster than me picking up these two posts that had the official announcemts:

So here are some of the Embarcadero.com links for XE6:    Read the rest of this entry »

Posted in Delphi, Delphi XE6, Development, Software Development | 1 Comment »

On turning “W1025 Unsupported language feature: ‘customattribute'” into a compiler error.

Posted by jpluimers on 2014/04/10

On turning W1025  into an error [WayBack] Why is “W1025 Unsupported language feature: ‘custom attribute’ “only a warning?… – mezen – Google+:

Stefan Glienke's profile photo

+Fabian S. Biehn This question has been answered by Nick already.
However you don’t need to turn it on in ALL projects. You change it in the base configuration, tick the Default checkbox in the bottom left corner of the settings dialog and from then on every new project will have this warning treated as error. However for existing projects you have to change it retrospectively.
You can even pass this option to the commandline compiler as explained here: http://stackoverflow.com/a/360947/587106

[WayBack] compiler construction – Delphi 2009 where is the ‘treat warnings as errors’ option? – Stack Overflow

On a related note, if you are using the command line compiler (DCC32.exe) the switch is -W^ to have warnings treated as errors. If you are using this, it’s important to note that the default command shell in Windows (cmd.exe) treats the caret (^) as an escape character, so you have to use -W^^ instead if you are executing the compiler directly from the command line, a batch file or even the from the Pre-Build or Post-Build events in the IDE.

It’s also worth mentioning that you can have only certain warnings treated as errors. The switch to do this on the command line would look something like this: -W^^WARNING-NAME. You would substitute the string that is associated with the warning you are wanting to have treated as an error.


The point about -W^ being problematic within BAT files is a good one. Using -W^^ works if you are modifying the compile line directly. Otherwise, I found that using surrounding double quotes "-W^" works, for example when building an env var that contains all compiler parameters, that env var being subsequently passed to dcc32.exe. Tested with XE, XE2, XE3, XE4.

SET CompilerParams=-B -M "-W^" -U"..\Source;%dcuoutdir%;%DUnitPath%" -I"..\Source\inc" "-N0%dcuoutdir%" -DDebugMode
"%dcc%bin\dcc32.exe" %FuTFolder%ADDTests.dpr %CompilerParams% -U"%FuTSource%" %ExtraPath32%>%DCCLogFilename%
if errorlevel 1 %Alerter% %DCCLogFilename%

 

–jeroen

Posted in Delphi, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Development, Software Development | Leave a Comment »

OS X FullDebugMode support added by Sebastian Zierer (Thanks!) in FastMM / Code / Commit [r67]

Posted by jpluimers on 2014/04/10

I just discovered that almost 2 weeks ago, the FastMM code repository added support for these defines in Mac OS X in Commit [r67].:

  • FullDebugMode
  • LogErrorsToFile
  • LogMemoryLeakDetailToFile

This is great news!

Note: this is not a full FastMM release, but since the original change by Sebastian Zierer has been done about half a year ago, the code is pretty stable.

Thanks mnasman for mentioning this on Delphi Redit, and Ralf Stocker for announcing this in the Non-Tech newsgroup.

–jeroen

via: FastMM / Code / Commit [r67].

Posted in Delphi, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, FastMM, Software Development | 2 Comments »

DDDebug Memory Profiler heading towards 1.0 (via: Stefan Meisner – Google+)

Posted by jpluimers on 2014/04/09

Just in case his blog is not yet on DelphiFeeds, there is this interesting post by Stefan Meisner – Google+ – DDDebug Memory Profiler heading towards 1.0 Version.

A license is only EUR 79!

–jeroen

Posted in Delphi, Delphi XE3, Delphi XE4, Delphi XE5, Development, Software Development | Leave a Comment »

Big Ball of Mud | Jeroen on software

Posted by jpluimers on 2014/04/09

Just bumped into this Big Ball of Mud article by (another) Jeroen on software (this Jeroen is Jeroen De Dauw).

It is a very nice article with annotations on the (very old, but still very prevalent Big Ball of Mud design pattern of which a lot of software projects suffer).

I didn’t know about the design pattern yet, but have seen it in so many places, and even helped quite a few of them to become less big, and contain less mud. If the article and paper are tool long, you can read a WikiPedia BBM abstract.

I’m glad that the .NET/Delphi based suite of projects I landed on recently – though containing quite a bit of legacy – is different. Still a lot of improvements to be made, but it is very manageable.

–jeroen

Posted in .NET, Delphi, Development, Software Development | Tagged: | 1 Comment »

The C language specification describes an abstract computer, not a real one – The Old New Thing – Site Home – MSDN Blogs

Posted by jpluimers on 2014/04/09

Interesting read:

The C language specification describes an abstract computer, not a real one – The Old New Thing – Site Home – MSDN Blogs.

In other words: any language that merges null behaviour in the underlying storage will have a problem somwehere.

So if you want to have true nullable types, your null flag should be stored outside the underlying storage.

The .NET framework 2 and up, most database management systems and many other environment support that.

But most languages don’t support it for pointer types. So there will be portions of address spaces either inaccessible, or only accessible when skipping the null pointer checks.

Note that the thread above contains some very interesting bits, for instance this one:

Matt 28 Mar 2013 5:58 PM #

@MarkY “Dereferencing null is undefined?  Cool!  I thought it was guaranteed to crash, just like a false assertion or something.  So crashing is the OS guarantee, not the language guarantee apparently.”

Nope. It’s not an OS guarantee either. The OS won’t ever normally allocate memory at address zero, but there’s nothing to stop you telling it to. Try doing “VirtualAlloc(1, 4096, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE)” on your pre-Windows8 machine.

In fact, this is the reason why null-dereferences in kernel mode are often exploitable as elevation of privilege attacks. The null-page is mappable and within the user-addressable region of memory, so if the kernel dereferences a null pointer, it reads attacker controllable data.

And btw, this is the reason why on Linux and Windows8+ you can’t map the null-page.

–jeroen

via: The C language specification describes an abstract computer, not a real one – The Old New Thing – Site Home – MSDN Blogs.

Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, Borland C++, Borland Pascal, C, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, C++, C++ Builder, Database Development, Delphi, Development, Pascal, Quick Pascal, Software Development, Turbo Pascal, VB.NET, VB.NET 10.0, VB.NET 11.0, VB.NET 8.0, VB.NET 9.0 | Leave a Comment »

Obtaining a sub-interface from an interface (via: Stack Overflow: Delphi)

Posted by jpluimers on 2014/04/08

Eric Grange (author of DWS) asked for some interface magic: delphi – Obtaining a sub-interface from an interface – Stack Overflow.

–jeroen

Posted in Delphi, Development, Software Development | Leave a Comment »

Spring4D now has projects for Appmethod, but it cannot support Appmethod in the automated build engine.

Posted by jpluimers on 2014/04/08

Recently I pushed two sets ofchanges for Spring4D with packages and test projects that support Appmethod. The test projects are configured to use Firemonkey (conditional define FMX) as that is what Appmethod is centered around.

This weekend I filed Appmethod issue AP-64 that prevents Spring4D and other open source projects to automatically build the underlying projects. Since the new Quality site does not (yet?) make reports on public reports visible to the public, the full report is at the end of this post.

The issue comes down to that Embarcadero has intentionally made the command-line compilers dysfunctional. They are there, but – as you see when running this small batch file – they all will display “This version of the product does not support command line compiling.“. It makes it impossible for open source projects to just distribute the sources, and ship a small build tool that builds and installs the compiled binaries into the available products. So this issue doesn’t only affect Spring4D. The large JCL open source project also requires the command-line compilers.

In the past, only some free or trial products came without the command-line compilers, and I personally am anxious why the command-line compilers were crippled. On the other hand – even though the compiler DLLs list themselves as version 19.50, the functionality in Appmethod basically is the same as in RAD Studio XE5.

The Spring4D team regrets the lack of command-line compiler support in Appmethod. We really hope this restriction is removed soon, preferably in this version, but – since the docteam is prepping for XE6, Delphi XE6 is around the corner (the first XE6 webinar is in slightly more than a week from now) and Appmethod is based on the most recent Delphi version – in a future version.

We could go the long path of encapsulating the DLL versions of the compilers, but those do not have a public API. Reverse engineering that would cost a lot of effort, which we’d rather put into enhancing Spring4D.

If Another thing we could do – if we’d get the compilers, or Embarcadero would build the Spring4D sources with them – is provide precompiled packages for every Appmethod version. We’d rather not do that either because of the exact same reason: extra effort that we’d rather spend on other Spring4D things.

So for now, the Spring4D team keeps the Appmethod support as is. If there are people interested, they can manually compile and install the packages and test projects from within the IDE.

–jeroen


for /f "usebackq tokens=2* delims= " %%c in (`reg query HKEY_CURRENT_USER\Software\Embarcadero\BDS\13.0 /v RootDir`) do (
dir "%%d\bin\dcc*.exe"
for %%c in ("%%d\bin\dcc*.exe") do %%c
)

Full bug report: Read the rest of this entry »

Posted in Appmethod, Delphi, Development, Software Development | 4 Comments »

Heartbleed: Serious OpenSSL zero day vulnerability revealed | ZDNet

Posted by jpluimers on 2014/04/08

The fixed OpenSSL 1.01g is already available in source and for many platforms.

When do they become available anyone using OpenSSL 1.01 or 1.02 must deploy the patched version as fast as possible.

You also need to have all your certificates re-issued.

During the vulnerability period, your private keys may have been exposed, and there is no way to tell that they were not exposed.

Note the official binaries for Win32 1.01g are not available for yet (expect them soon), but the Indy team made Win32 and Win64 versions available.

Note that OpenSuSE did a backport of the patch to 1.01e for 12.3 and 13.1. Older openSuSE versions do not have updates for this issue, but you want to upgrade anything lower than 0.98 as they contain serious other vulnerabilities.

–jeroen

via

Posted in *nix, Delphi, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 6, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Linux, OpenSSL, openSuSE, Power User, Security, Software Development, SuSE Linux | 7 Comments »

My initial thoughts on the new Community sites

Posted by jpluimers on 2014/04/06

(I just found out this post was marked “missed schedule” since April 6, 2014. It’s a [WayBack] known WordPress bug that on wordpress.com still raises it’s head every now and then. Sorry for that.)

The introduction of AppMethod wasn’t only introducing a new product based on the Object Pascal language and Firemonkey framework, it also shows which direction Embarcadero is taking with their community sites all hosted on community.embarcadero.com some of which replace parts of the EDN (Embarcadero Developer Network) sites.

These already saw the light:

Here is my initial impression on them. So below, phrasings like “it is” phrase how I feel about them.

The UI looks clean

Whereas most of the EDN sites look cluttered (some of which just look like a big landing page), the new sites look much cleaner. Less fuzz, more aimed towards their goal.

Existing EDN credentials are re-used

This is only part of the story. EDN has two credentials: a username and an email address. At the EDN sites, you can use either one. But not all community sites support that. I hope this means “not all community sites support that yet”.

So far, the Answers, Articles and Forums sections (which are hosted on the main site) understand authentication using either the username or email.

The Quality part

The community site is PHP based.

I have mixed feelings about this. On the plus side, PHP is used by many people, Embarcadero has a PHP based HTML5 Builder product (initially called Delphi for PHP, then RadPHP; well Delphi was almost called AppBuilder so that is still positive). On the negative side, even big PHP users like WordPress do horrible things with it (don’t get me started on their scheduling engine, or on breaking posts that contain source code).

Answers is new.

Answers does not have a predecessor within. It is a bit like a StackExchange site targeted at one product, but unlike StackOverflow, it feels more welcoming to new users. I hope that stays so, and that some people with capabilities like John Skeet will join it, and not the typical StackOverflow moderators  that think they can judge questions that are clearly out of their field of expertise.

I’m not yet sure how to maintain this in

Forums.

The forums server doesn’t keep articles forever: depending on the forum, the retention duration can be as little as a couple of months or less.

It means that valuable information gets lost as nobody puts this in the WayBack machine and the WayBack machine is not indexed by Google anyway.

Articles.

Currently there are the categories Tutorials, Technical Articles and Support.

Quality.

Quality is the future direction of QC. It is based on JIRA (from Atlassian). Whereas QC was developed in-house (initially bound to the then internal RAID) a long time before publicly accessible quality systems became widespread, JIRA is an external system.

QC is dated^w dead. Though [WayBack] it has a – for its age modern – WSDL API, the web interface is horrible as of nowadays standards, and even the [WayBack] Windows and [WayBack] Java clients mentioned on the [WayBack] QC home page are not a pleasant use (personally I still use the QC Plus client though it is not publicly available any more).

Embarcadero has used JIRA internally since at least 2009 (and presumably converted their internal RAID bug database to JIRA), so they have experience using it.

I love JIRA as it is the central piece in a lot of agile environments, has all its functionality on a web-based fashion backed with a publicly documented REST based  API so you can hook up native tools with ease and is in use by many closed and open source projects. There are options to host it yourself, or in the cloud or mix and match.

So I do welcome JIRA. But there are a few things that Embarcadero needs to fix:

  • Better integration with EDN login services (right now you can only login using the username you registered at EDN, but not with the email address you registered at EDN).
  • Making all reports of publicly available products also public just like on QC (I get it that bugs on products not publicly available are not visible to the public at large).

–jeroen

Posted in Appmethod, Delphi, Development, Missed Schedule, QC, SocialMedia, Software Development, WordPress | Leave a Comment »