-
Content Count
58 -
Joined
-
Last visited
-
Days Won
2
ioan last won the day on January 26 2021
ioan had the most liked content!
Community Reputation
30 ExcellentAbout ioan
- Currently Viewing Forum: General Help
- Birthday February 25
Technical Information
-
Delphi-Version
Delphi 10.4 Sydney
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
I have a multithreaded service that creates a TDataModule for each thread. The DataModule has the logic for some light work on a firebird database. My service runs, depending of the hour of the day, between 0 and 300 consecutive threads and about 50-70 thousand total threads in a day. Some threads can be alive for an hour or more, some for few seconds. Most of the time the threads are just idle, waiting for a file on disk (each thread waits for a file with a specific name, no two threads try to read the same file). There are no memory leaks in the service, if I run the service as an application for a whole day in production with the ReportMemoryLeaksOnShutdown := true; and there are no leaks reported. There are no threads that remain hanging, after a certain while, they'll terminate automatically if they are alive for too long (a timeout value depending of what the job is). The problem is that after a random amount of time of running, the thread creation fails at with Access Violation DataModule := TDataModuleMain.Create(nil); and when this starts, no more threads can be created, all of them fail at the same line, the line above. The TThread.Create is as follows: constructor TPFXIncomingMessage.Create; begin inherited Create(true); FreeOnTerminate := true; DataModule := TDataModuleMain.Create(nil); FIsRecovered := false; end; Here is the call stack: EAccessViolation: Access violation at address 0000000000921298 in module 'pfxout.exe'. Read of address FFFFFFFFFFFFFFFF ---------------------------- [0000000000F1EB51] JclDebug.TJclStackInfoList.Create + $151 [0000000000F1E698] JclDebug.JclCreateStackList + $48 [0000000000F1E5A6] JclDebug.DoExceptionStackTrace + $76 [0000000000F20BA6] JclDebug.DoExceptNotify + $86 [0000000000F116C5] JclHookExcept.TNotifierItem.DoNotify + $35 [0000000000F1190B] JclHookExcept.DoExceptNotify + $BB [0000000000F11A65] JclHookExcept.HookedRaiseException + $75 [00000000008F21D3] System.@RaiseAtExcept + $103 [00000000008F2238] System.@RaiseAgain + $38 [00000000015FC969] threaddoit.TPFXIncomingMessage.Create (Line 59, "threaddoit.pas" + 5) + $42 [00000000015FFC76] outthread.TOutThread.ProcessRecRequest (Line 182, "outthread.pas" + 15) + $E [00000000015FF4CB] outthread.TOutThread.Execute (Line 88, "outthread.pas" + 6) + $0 [0000000000A1A1E3] System.Classes.ThreadProc + $43 [00000000008F2DAD] System.ThreadWrapper + $3D [00007FF95AA713D2] BaseThreadInitThunk + $22 [00007FF95C455504] RtlUserThreadStart + $34 The service is compiled for 64 bits. Before I start modifying everything, trying to fix a problem that I have no idea where it comes from, before trying to rewrite a bunch of code that should work and has no memory leaks, my question is: Are there some kind of rules that I don't know about on creating and freeing so many DataModules? I'm asking this because I had the same problem with a RemObjects SOAP service and the answer I got on the remobjects forum was: it is failed at creating _Impl forms. it is weird error and something is happened in delphi’s standard library Any ideas or advice? Thanks.
-
How does Chrome know that a input with a random name is the password field?
ioan replied to ioan's topic in General Help
I understand that, but what if I want to have some other field with the characters masked, would Chrome automatically assume that any masked field is a password field and fill in my password? I think the decision of Chrome developers to ignore "autocomplete="off" is kind of dumb. I hope they'll respect autocomplete="new-password" and not ignore it in a future version. -
How does Chrome know that a input with a random name is the password field?
ioan replied to ioan's topic in General Help
Well, never mind. This seems to work and I don't even have to create a random ass field name: autocomplete="new-password" While searching for a solution I saw the above multiple times... but I was sure I already tried it but I guess I didn't! -
How does Chrome know that a input with a random name is the password field?
ioan posted a topic in General Help
<div class="form-group row margin-bottom"> <label for="ePassword" class="col-sm-2 col-form-label">Password*</label> <div class="col-sm-6"> <input type="hidden" name="EPASSWORD" id="EPASSWORD"/> <input autocomplete="off" CLASS="form-control" spellcheck="false" TYPE="password" name="1DC647A67DB84EE7ABA987E7662DBCF2" onchange="document.getElementById('EPASSWORD').value = this.value" /> </div> </div> The name of the input text is random generated in code. How does Chrome still guesses this is the password field? Any way to trick Chrome to not know what field is the password field? -
You right! That was it, thank you! I was losing my mind 🙂
-
Yeah, I tried a simple application just to test and it does work, but in my service doesn't. Yes, I tried in a simple application and it does work. The problem is that in my service (IntraWeb service) doesn't:
-
I'm using TNetEncoding.URL.Encode to encode the following string: E+C1NU0Z0ikcOdZF158VAypoEl4nc9bTokltVV+PkfPeO3/6pmZTRo3h17SC+x6SdK4qIrNnWv3rd9RGnQ== The result is: E%2BC1NU0Z0ikcOdZF158VAypoEl4nc9bTokltVV%2BPkfPeO3%2F6pmZTRo3h17SC%2Bx6SdK4qIrNnWv3rd9RGnQ%3D%3D Trying to use TNetEncoding.URL.Decode doesn't get me back to the original string, what am I doing wrong?
-
It seems that Library Path doesn't get saved. I installed 11.1, but for the Windows 64 the Library Path wasn't transferred between installs. Trying to add the missing paths manually and then saving, doesn't save the new added paths. Can someone please try and see if they have same problem?
-
Does it require reinstalling? It does. Fuck. Anyway, yay!
-
Do you have high CPU usage even if there aren't any xml files to read? If that's the situation, I agree, there probably is a problem with your code. Do you have this loop in a separate thread? Is it in the main thread?
-
Senior Blockchain Developer (Delphi Remote work)
ioan posted a topic in Job Opportunities / Coder for Hire
Someone posted this job on Delphi subreddit and said that they can't get registered here to post it. Here it is if any of you are interested: -
Are you going to keep the documents in a database or a file each? If you are keeping them in a database, you can give access based on a login/password (call it "encryption key") to anyone you want in any way you want, any combination. Why not do that?
-
Here are the units I use. I don't remember where I got them from, it was several years ago: https://drive.google.com/file/d/180sOWUiToBllr7vxgQfhb4yaidJYPQqr/view?usp=sharing To send a SNS do something like this: uses AWS.SNSService; snsService := TsnsService.Create(nil, GlobalVar.AmazonSNSKey, GlobalVar.AmazonSNSSecret); try snsService.Publish('arn:aws:sns:us-west-2:58644269878413222:_YOUR_TOPIC_', 'Your Subject', 'Your Message'); finally snsService.Free; end; AWS-SNS.zip
-
Find exception location from MAP file?
ioan replied to A.M. Hoornweg's topic in RTL and Delphi Object Pascal
I also have several multi threaded windows services and I'm using JCL Library to track exceptions. I'm very happy with it and never had problems. You'll find my code in this post: Make sure to follow the instructions from the code comments. -
Wish you a fast full recovery! Take care!