Jump to content

jeroenp

Members
  • Content Count

    12
  • Joined

  • Last visited

Community Reputation

5 Neutral

1 Follower

Technical Information

  • Delphi-Version
    Delphi XE8

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. jeroenp

    Unused local variables

    The best open source Delphi parser I know is DelphiAST. It is the foundation https://www.tmssoftware.com/site/fixinsight.asp which catches way more code issues than the Delphi compiler itself does. DelphiAST gets you an abstract syntax tree. Code is at https://github.com/RomanYankovsky/DelphiAST
  2. jeroenp

    Single Instance of Dephi IDE?

    You can write an IDE plugin for this that switches to the existing instance, then quits the new one. But first you have to define "single instance", and how to set instances apart. For instance, I know many Delphi developers that run Delphi with various registry tree starting points. Or run one with admin privileges and the other without. Or run one as user A and another as user B. Are those different instances? A much simpler trick might be to look at the windows task bar: is there already a Delphi icon on it? Click on it and see which instances are running.
  3. I am trying to track down a problem while loading PNGs that happens, but hardly, on a few end-user sites. The crash is inside this piece of code in Delphi 10.1 Berlin unit Vcl.Imaging.pngimage.pas : {Resizes the image data to fill the color type, bit depth, } {width and height parameters} procedure TChunkIHDR.PrepareImageData(); //... {Create the device independent bitmap} ImageHandle := CreateDIBSection(ImageDC, pBitmapInfo(@BitmapInfo)^, DIB_RGB_COLORS, ImageData, 0, 0); SelectObject(ImageDC, ImageHandle); {Build array and allocate bytes for each row} fillchar(ImageData^, BytesPerRow * Integer(Height), 0); end; The VCL code has diverged from for instance https://github.com/thargor6/mb3d/blob/master/pngimage.pas and http://svn.hiasm.com/packs/delphi/code/KOLPng.pas but similar to http://www.gm-software.de/units/GMPngImage.htm (the three highest deduplicated search hits I got for "TChunkIHDR.PrepareImageData" "fillchar") What happens here is that the call to CreateDIBSection is not verified to succeed. Documentation indicates that if it fails, both the returned ImageHandle are the ImageData pointer are null. I am trying to get the calling code refactored so it saves the PNG file, hoping that it will help tracking back the actual root-cause of this problem. One question I now have if people have bumped into similar problems. Of course this is a problem involving multiple libraries, in this case at least FastReport and wPDF, as you can see from the below part of the not-fully-accurate (I think the FastFreeMem is bogus) stack trace: [008080E5]{MyApplication.exe} JclHookExcept.HookedExceptObjProc (Line 391, "JclHookExcept.pas" + 2) [0040B54F]{MyApplication.exe} System.@HandleAnyException (Line 19565, "System.pas" + 13) [009894E5]{MyApplication.exe} Vcl.Imaging.pngimage.TChunkIHDR.PrepareImageData (Line 2311, "Imaging\PNGImage\Vcl.Imaging.pngimage.pas" + 67) [00989099]{MyApplication.exe} Vcl.Imaging.pngimage.TChunkIHDR.LoadFromStream (Line 2162, "Imaging\PNGImage\Vcl.Imaging.pngimage.pas" + 48) [0098D4C4]{MyApplication.exe} Vcl.Imaging.pngimage.TPngImage.LoadFromStream (Line 4904, "Imaging\PNGImage\Vcl.Imaging.pngimage.pas" + 71) [01994896]{MyApplication.exe} frxClass.TfrxPictureView.LoadPictureFromStream (Line 6574, "frxClass.pas" + 141) [00420BDF]{MyApplication.exe} FastMM4.FastFreeMem (Line 5644, "FastMM4.pas" + 18) [019348E2]{MyApplication.exe} frxPictureCache.TfrxMemoryStream.Seek (Line 351, "frxPictureCache.pas" + 4) [004CE682]{MyApplication.exe} System.Classes.TStream.SetPosition (Line 7306, "System.Classes.pas" + 1) [01934443]{MyApplication.exe} frxPictureCache.TfrxPictureCache.GetPicture (Line 213, "frxPictureCache.pas" + 24) [0194D521]{MyApplication.exe} frxPreviewPages.DoObjects (Line 1277, "frxPreviewPages.pas" + 13) [0194D540]{MyApplication.exe} frxPreviewPages.DoObjects (Line 1281, "frxPreviewPages.pas" + 17) [0194D755]{MyApplication.exe} frxPreviewPages.TfrxPreviewPages.GetPage (Line 1341, "frxPreviewPages.pas" + 56) [01A68E3A]{MyApplication.exe} wPDF.FastReportNaarWPDF$0$ActRec.$1$Body (Line 282, "wPDF.pas" + 21) [01A6888C]{MyApplication.exe} MemoryManager.TLogMemoryStatesHelper.LogMemoryStatesBeforeAndAfter (Line 797, "MemoryManager.pas" + 14)
  4. From https://www.habarisoft.com/index.html#faq : The question asked specifically for 1.0, as 0.9.1 is a totally different protocol: https://www.rabbitmq.com/protocols.html Thanks. I will give that a try later on.
  5. Thanks. Do you have any experience with it? If so, how well is their implementation? I know that last question is hard to estimate, as I could not find AMQP test suites.
  6. Since not all Message Oriented Middleware does STOMP, I wonder if there is an AMQP 1.0 compatible Delphi library around, either open source or commercial. A Google Search did not reveal many results, and the ones I found were kind of vague on the versions of AMQP that is implemented. Any tips?
  7. I have given this some thought. My main aim is to follow in a central place like feedly.com without re-creating a new RSS feed for everything i want to follow. Basically my G+ was the central place to follow all my social media stuff, and feedly.com is my place for following news. Any thoughts on that?
  8. I could use some input on https://gist.github.com/jpluimers/b08b65991987d01e1dd1bdb4bf8a33c4 Especially on: - the abstracting of the non-UI logic from https://github.com/pleriche/FastMM4/blob/master/Demos/Usage Tracker/FastMMUsageTracker.pas - the conversion to JSON: built-in Delphi JSON support does not do records out of the box, but I feel my workaround is cumbersome. There is an example on how to use it for logging memory and processor usage on the console.
  9. One of the strengths of G+ is that you can follow posts (by commenting on them) so you get notifications on new comments. This allows a way of operation where you see just two things in a post feeds: - new posts - posts re-appear that you commented on and have new comments since the last comment This was a very powerful way of keeping up, with things and one of the reasons I limited myself almost exclusively to G+ (forums, Twitter, FaceBook, do not have this). Is it possible to have a forum stream that comes close to the above behaviour? The current RSS stream does not: it gets an entry for every new post or comment. --jeroen
  10. jeroenp

    How to use activity streams

    I tried finding out how to view activity streams and lost my way when I had to look for ACP.
  11. It would be nice if we could edit more profile feeds. Right now there is "about me", "cover photo", "profile photo", "birthday", "status updates" and "delphi version". It would be really nice to specify full name so that can be shown next to the account name, and maybe as some location too.
  12. jeroenp

    RSS feeds

    Please pin that, in addition to RSS feeds for the individual forums. I am with @dummzeuch here: If possible, change the <title>All Activity</title> bit in the RSS XML to include "Delphi Praxis [EN]" or something like that. And thanks @Daniel for making this possible at all. --jeroen
×