Микола Петрівський
Members-
Content Count
69 -
Joined
-
Last visited
Everything posted by Микола Петрівський
-
Android ADB devices offline, best practices
Микола Петрівський replied to Rollo62's topic in Cross-platform
ADB over USB has never worked for me in VirtualBox VMs. That is why I always use ADB over WiFi: https://developer.android.com/studio/command-line/adb#wireless -
If you are going to develop GUI apps for Mac, then you really need dedicated hardware with separate screen, keyboard and mouse. But if you already have good Windows PC, then the best option will be to by some cheap Mac Mini.
-
Do not forget, that any app nowadays has multiple threads, and when you break the program, currently selected thread does not necessarily will be VCL main thread. You need to select correct thread in Threads window.
-
FastMM4 large memory allocation–benchmarking VirtualAlloc
Микола Петрівський replied to Primož Gabrijelčič's topic in Tips / Blogs / Tutorials / Videos
In my tests 64-bit app is ten times faster, then 32-bit on real hardware. In VM difference is only two times, but 32-bit code is twice faster, then on host. Very interesting results. -
On-demand ARC feature discussed
Микола Петрівський replied to AlekXL's topic in RTL and Delphi Object Pascal
Interesting observation: Android ART is written in C++ and core of Unity (game engine) is also written in C++. In both cases code with manual memory management is doing all hard work, and garbage collected code (Java and C#) sits on top of it. So authors of this codebases also were perfectly aware of problems related to mixing different memory management models, and have separated them on language borders. Delphi has to be good in both low level stuff and business logic, so it had to switch to simpler memory management model.- 52 replies
-
- arc
- memory management
-
(and 3 more)
Tagged with:
-
On-demand ARC feature discussed
Микола Петрівський replied to AlekXL's topic in RTL and Delphi Object Pascal
Your code contains memory leak. After a call to "Modify", pointer to original object, inside "classic" variable, will be lost.- 52 replies
-
- arc
- memory management
-
(and 3 more)
Tagged with:
-
Delphi compiler need to be opensourced
Микола Петрівський replied to AlekXL's topic in RTL and Delphi Object Pascal
No matter what you do, sooner or later RTL will have to insert a call to UniqueString. For example when you pass your variable to a function with var parameter. For strings this is not a problem, because they are value types, their copying does not have side effects. For objects you can't guarantee, that copying is safe. You can ask programmers to mark their objects as copy safe, and add additional compiler restrictions for unsafe objects. But how many times some object will happen to have wrong mark, and how easy it will be to debug and fix it? -
GetIt Package Manager Item buttons only partially visible
Микола Петрівський replied to PeterPanettone's topic in Delphi IDE and APIs
If Embarcadero had been testing IDE for HiDPI, then they would spot the problems in IDE manifest first of all. But manifest remains broken for several releases already. So they clearly do not test for HiDPI. And in the docs you will not find any statements, that IDE is HiDPI-aware. -
When is a Delphi form actually visible to the user on Android?
Микола Петрівський replied to Yaron's topic in Cross-platform
As far, as I know, TBitmap had problems with threads in Tokyo. In Rio it should be fine. -
When is a Delphi form actually visible to the user on Android?
Микола Петрівський replied to Yaron's topic in Cross-platform
You are using Application.ProcessMessages, right? This is a well known feature of latest versions of FMX on Android. Details and workarounds are here: https://quality.embarcadero.com/browse/RSP-22888 -
Delphi Rio Android application.processMessages; dosent work
Микола Петрівський replied to a topic in FMX
Explanation from Marco why it does not work and they are not going to fix it: https://quality.embarcadero.com/browse/RSP-22888 -
Runtime Error on Closing with ScaleMM2 Memory Manager
Микола Петрівський replied to RussellW's topic in OmniThreadLibrary
Usually, you should not call memory-related functions after MM unloading. There is a bug somewhere. Maybe FastMM4 is not the first in uses clause, or something gets uninitialized too late. -
Did anybody have the guts to try XCode 10.2
Микола Петрівський replied to sjordi's topic in Cross-platform
It has iOS SDK 12.2. C++ apps do not compile with that, while Delphi apps are OK. Have not tested MacOS. -
Runtime Error on Closing with ScaleMM2 Memory Manager
Микола Петрівський replied to RussellW's topic in OmniThreadLibrary
Try FastMM4 in FullDebugMode. Probably some code tries to call interface method, but reference is nil. -
Read of address DEADBEE7. - Source of this raise?
Микола Петрівський replied to Lars Fosdal's topic in General Help
It is not so easy to detect, that current AV really is a usage of freed object. Especially if you have multiple DLLs, compiled in different versions of Delphi, or something like that. SafeMM can shed some light even in such situation, but at a cost of big memory leak. -
Read of address DEADBEE7. - Source of this raise?
Микола Петрівський replied to Lars Fosdal's topic in General Help
In such situation I usually try other debugging tools and compare results. In my list I have FastMM4 in FullDebugMode and SafeMM: https://stackoverflow.com/questions/1039646/trying-to-locate-safemm-for-delphi The last one is especially useful when you want to see precise line of code with the bug. If nothing helps, then I read this article: https://www.eurekalog.com/help/eurekalog/eaccessviolation.php And especially list of mistakes that can cause AV. Usually it is one of them. -
Have you looked in to Free Pascal Compiler? It is open source, so you can tweak output assembler as you like, but in the same time it uses Delphi language, which we all love.
-
magnification Windows 10: How see behind full screen form inside a new desktop create by a 3rd's application
Микола Петрівський replied to flashcoder's topic in General Help
If I had to interact with another desktop, I would start separate process there. Probably even separate EXE-file. Then i would send it commands somehow (tethering ?) and get results back.- 4 replies
-
- screencapture
- winapi
-
(and 3 more)
Tagged with:
-
Does application.processmessages behaviour differ between VCL and FMX?
Микола Петрівський replied to Incus J's topic in RTL and Delphi Object Pascal
You should use Synchronize as little as possible, because you are not using threads, when Synchronize is running. Usually you need it only for UI. -
Solution(s) for coder with quite poor eyesight
Микола Петрівський replied to Tommi Prami's topic in Delphi IDE and APIs
RAD Studio works like that since Berlin, probably. But on HiDPI screens everything is very small. And do not mix real Screen DPI and Windows Screen DPI, these two values do not have to be the same. -
XCodes can coexist, but only one of them will be default. RAD Studio uses default XCode to get SDK. I usually just rename nondefault XCodes to something like "XCode 1010.app", and default remains "XCode.app". Installation of new XCode via AppStore usually replaces current default one. But if you download archive, then you can choose what to do.
-
Tokyo can compile apps for Mojave, but you have to use XCode 9.X.X, because different versions of XCode have different versions of SDK. And Tokyo does not work with fresh SDK, at least not out of the box. Also, debugger on Mojave does not work. 10.3 Rio can work with any existing version of XCode, but also has troubles with debugger. You have to launch app without debugger, and then attach to running app.
-
RAD server console Ext JS UI why not written in Delphi?
Микола Петрівський replied to hsauro's topic in General Help
Probably opening a webpage in browser is easier then connecting to the server via RDP. -
heavy bug 10.2 10.3 RIO passing parameter pointers in anonymous methods
Микола Петрівський replied to a topic in RTL and Delphi Object Pascal
EurekaLog is also good. And for debug builds you can use SafeMM. -
heavy bug 10.2 10.3 RIO passing parameter pointers in anonymous methods
Микола Петрівський replied to a topic in RTL and Delphi Object Pascal
You should try other memory managers and see how your test app behaves. There are plenty of them: ScaleMM, SapMM, Nexus Memory Manager.