

Kas Ob.
Members-
Content Count
535 -
Joined
-
Last visited
-
Days Won
9
Everything posted by Kas Ob.
-
No exception handling with server crash
Kas Ob. replied to Angus Robertson's topic in ICS - Internet Component Suite
I have few things about the subject 1) The exception is raised in the OS kernel protected part, not the user part, hence the the failure for the application (or MadExcept..) to get hand on the exception. 2) When you say it doesn't happen with YuOpenSSL build, this bring to elephant in the room, YuOpenSSL build will be using/utilizing Delphi application memory manager instead of the System heap and memory manager, and there is a big difference, while FastMM is build for speed and other feature, it is very forgiving in the matter of out-bound write/access, because small or medium allocations are continuous and there is no check for overflow write or even as simple reading after freeing. 3) No sure what MadExcept does offer, but sure that EurekaLog have extended functionality to perform deep hooking and capture and report every handled exception 4) Also EurekaLog can helpful in performing some fuzzing to enhance the chance of capturing the read after free usage I think you can capture and eliminate this exception or at least get better understanding of its context, by going after YuOpenSSL build not the OpenSSL Dlls, focusing on that build in my opinion has the best chance to solve this once and for all, even when there is no exception being raised or any symptoms or memory miss usage. -
Refer to the documentation https://docs.devart.com/mydac/modify_data.htm
-
[Question/Feature] SSL/TLS fallback using magic bytes
Kas Ob. replied to FearDC's topic in ICS - Internet Component Suite
I did the same thing with in few servers, and as Remy and Angus said it should handled on lower level from the event layer, here a snippet i have in a project if (BytesRecv > 0) then begin if (FInSSLBuffer[0] = $16){ and (FInSSLBuffer[1] = $03)} then begin FConnecitonIsTLS := True; TLSInit; // end else begin // Move(FInSSLBuffer[0], FInBuffer[FInBufferCount], FInSSLBufferCount); BytesToProcess := FInSSLBufferCount; FInSSLBufferCount := 0; end; end; Though i am not experienced in ICS, i would suggest to derive (inherit) your own server and make you detection, before triggering the event thus you will have your dual usage server, and drop in place, On side note, i needed this for some reasons: 1) To remove huge amount of logging from online scripts and bots that keeps requesting plain HTTP on port 443, and i replied with and empty HTTP, when it is was HTTP. 2) I needed to add SSH and HTTP (as above), but i didn't want to go with multiple ports, so used 443 for SSH too, the same way it detected few bytes, as above it seems i used only one byte for SSL/TLS. An argument for the need to have such functionality: I needed to switch off SSL/TLS traffic and leave the plain traffic in extreme debugging/testing and watching unstable networks (WiFi) traffic on WireShark, also needed to stress the socket engine itself not the Secure layer and its CPU demanding, so for such case the ICS server could have a Boolean property to disable SSL/TLS, with default as False, and when it is True the traffic will skip all Secure layer handling, such feature will have its consequences and can be be not allowed to disable after enabling, but it is the responsibility of the developer (ICS user) to understand how and when to flip this property. Not big or needed feature, but a feature non the less. -
FYI - Several Embarcadero services are currently unavailable
Kas Ob. replied to Keesver's topic in General Help
I am sorry and deleting this distasteful joke, really sorry. -
FYI - Several Embarcadero services are currently unavailable
Kas Ob. replied to Keesver's topic in General Help
Tried to be funny for god sake, i don't remember seeing such smile ! -
FYI - Several Embarcadero services are currently unavailable
Kas Ob. replied to Keesver's topic in General Help
distasteful joke -
May be ! The workaround is very simple, give him money, like 1 dollar will do and say the magic words, that he the compilation as business transaction, still there is a tiny problem here with using actual money and he need to declare it, so buy him pizza and make sure he did eat it in front of you, pizza can't be taxed, like all consumed food in it had been consumed, for you in this case the pizza is non monetary compensation can't be taxed as money transaction.
-
FYI - Several Embarcadero services are currently unavailable
Kas Ob. replied to Keesver's topic in General Help
Exactly the point, I remember reading or accessing a page where the ELC server needed a file that should be generated and locked to an IP or a DNS or something, i really can't remember, but in that case or any case involving ELC server license with Internet parameter then the logical for Delphi IDE to some save parameters/data locally to access that server and in case of failure for extended period of time, it should check with home for valid ELC server registration or a revocation, this makes sense to be implemented in ELC server too. Revocation needed because the license/ELC server could be moved to another/different server (with different IP/DNS...) may be !? Anyway, I don't know, and as Uwe i would love to hear from who tested it with firewall on ELC server or have already knows, or may someone form Embarcadero can shed some light on this. -
FYI - Several Embarcadero services are currently unavailable
Kas Ob. replied to Keesver's topic in General Help
One more question about this though : By not having internet for Delphi IDE or the server and for long time like few weeks or months, will it still running or fail to allow the IDE to run. Because there is some shady stuff the IDE does after 12 months, the old ones that i have (at least), and i prefer not to discuss this in this forum, but concerned about that ELC, considering it is done by the same team. -
FYI - Several Embarcadero services are currently unavailable
Kas Ob. replied to Keesver's topic in General Help
Does this server call home ? Is there any documental confirmation that this server will not make outgoing connections ? -
FYI - Several Embarcadero services are currently unavailable
Kas Ob. replied to Keesver's topic in General Help
Hmmmmm, (scratching head emoji) (scratching head emoji) (scratching head emoji) (scratching head emoji) So Embarcadero might drink from the same cup, the one handed us for years ?!!! Noice ! -
Error when installing custom package - Module not found
Kas Ob. replied to JKNew's topic in Delphi IDE and APIs
Happy for you and happy more for the experience you got out of this issue ! -
Error when installing custom package - Module not found
Kas Ob. replied to JKNew's topic in Delphi IDE and APIs
NOOOOOO ! Don't go there . Just perform clean QR removal and follow its instruction to the letter to install, if QR package project file had been changed or modified then you have to either : repeat the same process you have done above, i mean removing the needed ...., or just restore the orginal QR package projects. In other words if you didn't change the QR source then delete it completely and try with clean library code. Very popular mistake that cause errors like this. is that the IDE have made some changes or you did or even there was a conflict in the runtime/design time packages when you installed a packages (QR in this case) and the IDE asked you to save the project and you clicked yes, make this conflict hidden. -
Error when installing custom package - Module not found
Kas Ob. replied to JKNew's topic in Delphi IDE and APIs
Dear, your problem is not with your package itself, yes designide may be should added by manually, but the QR package build is broken and is the cause of this issue, i don't think w64 should appear anywhere near design time packages. I suggest to completely remove (uninstall) the QR package and rebuild/install it from scratch, make sure to delete all the bpl and dcp for QR. Also if you look at the installed and loaded packages in the IDE ( IDE Menu -> Component -> Install Packages... ) you should have this window Again i don't have QR, but the same goes for all packages. If a packages is installed then it have an entry in this window. If the package is loaded then the checkbox is checked, unchecked means it is install but not loaded. So when cleaning QR make sure also all (or any) entries referring to QR are gone. -
Error when installing custom package - Module not found
Kas Ob. replied to JKNew's topic in Delphi IDE and APIs
You should change them ! See if you are using the DesignEditors then your package should be Design time only and most likely will fail to build if it using the QuickReport if not in the require section as needed, as Lajos wrote, only the IDE will find it for you, as it should be already loaded for your package to loaded by the IDE then installed. -
Error when installing custom package - Module not found
Kas Ob. replied to JKNew's topic in Delphi IDE and APIs
Now you are on the path to find the real problem. Try to solve the conflict in Those depends on your package and its imported units. -
Error when installing custom package - Module not found
Kas Ob. replied to JKNew's topic in Delphi IDE and APIs
There is no such files, these should have RTL numbers, i suggest to try the project manager, right click on all the required packages then remove them all, after that the IDE on building will ask you to add the needed ones, this for me solves such conflict in many cases/incidents in the project file, specially after upgrading/downgrading between IDE's. These will stay without numbers in the projects but will be adjusted later and internally without your interaction. -
Error when installing custom package - Module not found
Kas Ob. replied to JKNew's topic in Delphi IDE and APIs
This is a little tricky indeed, most likely your JEP is using (referencing) a unit that is included in different package, JEP is expecting another (un-named here) run time package to be loaded first. Find/identify the missing or referenced unit file and handle it, or change JEP Build control from project option, does Explicit or rebuild as needed selected ?!, start there . -
Same GUID used in interfaces, is there any purpose for this?
Kas Ob. replied to HaSo4's topic in RTL and Delphi Object Pascal
Great example ! and i want to expand on this a little System.SysUtils; type IFoo = interface ['{5DEC09C5-FADC-46A5-814F-9ED91259A37F}'] function GetFooName: string; end; IBar = interface ['{5DEC09C5-FADC-46A5-814F-9ED91259A37F}'] procedure Dummy; function GetBarName: string; end; TFooBar = class(TInterfacedObject, IFoo, IBar) function GetFooName: string; function GetBarName: string; procedure Dummy; end; function TFooBar.GetFooName: string; begin Result := 'Foo'; end; procedure TFooBar.Dummy; begin Writeln('Dummy called !'); // this is procedure without result ! // yet it might don't raise an exception here because the result in a register could be 0 or valid value end; function TFooBar.GetBarName: string; begin Result := 'Bar'; end; var i: IInterface; begin i := TFooBar.Create; Writeln((i as IFoo).GetFooName); Writeln((i as IBar).GetBarName); Readln; end. The result Dummy called ! Bar -
How do I terminate a thread that doesn't have an Execute method ?
Kas Ob. replied to dormky's topic in Algorithms, Data Structures and Class Design
Dalija , may be you are low on coffee but for sure i am ! Thread.Free is a blocking call and will not return until the Thread.Execute is finished and exited, so if an event is still holding the thread execution then fEvent.Free will not be reached until it is set/triggered, hence the the need to either trigger the event in the destructor by destroying/freeing it or trigger it explicitly before the inherited destructor then freeing it. -
How do I terminate a thread that doesn't have an Execute method ?
Kas Ob. replied to dormky's topic in Algorithms, Data Structures and Class Design
I agree on that, but about the part of plenty of code, well, that part is relative for example, the thread in question above should have TerminatedSet called in the destructor before the inherited Destroy this will make sure the thread is not blocking on an event that might not be triggered or will take long time to trigger, this is equal or the same as freeing the event (before the the inherited) and forget about it. -
How do I terminate a thread that doesn't have an Execute method ?
Kas Ob. replied to dormky's topic in Algorithms, Data Structures and Class Design
Undefined behavior ?!! -
How do I terminate a thread that doesn't have an Execute method ?
Kas Ob. replied to dormky's topic in Algorithms, Data Structures and Class Design
Well, yes, but waiting on event that will not be triggered because the thread is trying to call the inherited destructor, for me is undefined behavior, will if finish or will it not and when ? Because the event is not triggered nor freed, TThread.Free in my opinion should never ever called, all and every TThread by design should clean up after themselves, well that is my humble opinion, the whole point of leaving a class/creature meant to run only once such as thread which can effecting the whole process, should be considered as falling knife, draw the path/loop or what ever then let it run its course cleaning and exiting gracefully. -
How do I terminate a thread that doesn't have an Execute method ?
Kas Ob. replied to dormky's topic in Algorithms, Data Structures and Class Design
If TThread destructor being called while the thread is running then it is best to make sure the event handled closed and triggered (aka freed), preventing the thread from blocking on it, other wise it will go performing undefined behavior. -
DataModule should be created fine, the problem is what is on it !!? 1) The OP asked for non visible TForm, invisibility of TForm is irrelevant here, because handles for Windows classes is the prohibited in Windows Services, These Windows services are isolated from the user or interacting with the user. 2) Windows services are console application, this is very important, on top of that they are console application with modified policy to block all the GUI API https://learn.microsoft.com/en-us/windows/win32/services/interactive-services not only they can't create but also they cant open handles. 3) I created hundreds of DataModules in my services, in fact it is the cleanest or most efficient way to build Windows service, but you can't drop one VCL component on it, by that i mean a visible one or the one that create Windows GUI class, i faced some problems with a component should be as non visible component, but this component had hidden form/dialog to ask for a password if needed or programmatically asked to do so, that component was creating that input dialog in the constructor, this component had to be modified to be used in a DataModule in Windows Service. Now to guessing part to what did happen with your DataModule in ISAPI, most likely you have unit in uses clause that do some GUI initialization and does fail or something, see, i don't have the latest Delphi, but reading what have being changed and added, it might be the theming and skinning have something to do with, so in theory (i might be wrong here), you might used some component that is importing some of these units, or you have tested your module in an stand alone EXE and forgot to remove some unit from the uses clause, so i recommend to check the uses part, and track the offending component on that DataModule.