Jump to content

chkaufmann

Members
  • Content Count

    145
  • Joined

  • Last visited

Everything posted by chkaufmann

  1. chkaufmann

    TIdHTTPServer.OnCommandGet - Timeout

    Follow up question: I create my own request object in my OnCommandGet event. Is there a way to have a reference to this in the current TIdContext or do I have to build my own list/container for this? Christian
  2. chkaufmann

    TIdHTTPServer.OnCommandGet - Timeout

    I still try to locate the problem. Right now I have the situation, that a request blocks all following request. So I want to cancel it as save as possible. In the main thread I know my TIdHTTPServer component and I know the TIdContext of the request I want to remove. What is the savest way to do it from "outside the request"?
  3. chkaufmann

    Application blocking (suspended)

    I have a strange problem, not sure if it is because of Win10 or Delphi Rio 10.3.2. For some users my application gets blocked completely when not used for some time and when there are other applications running on that computer. Now I found out, that my application has a green leaf symbol in the task manager with the hint "UWP process group is suspending". Now I don't find a clear answer but it looks like my application is sent to a suspended mode by Windows in some cases. - How can I avoid that? - Are there any Windows messages I have to handle so I can ensure my application is not blocking? Christian
  4. chkaufmann

    TIdFtp - Disconnect by server

    Hi, I use a TIdFtp component to upload files to a server in a background thread. The main application creates changed file irregularly, sometimes there is up to 30 minutes between two uploads, sometimes there are up to a 100 files at the same time. My problem is that a some point the server disconnects and calling IdFtp.Put() fails. Is there no message from the server when it disconnects? Can a get this information from the server somehow? Or what is the best way to handle that? My first approach was doing Connect/Put/Disconnect for each file but I have one user who has a problem with his web provider because of this - when uploading too many files at the same time. Christian
  5. chkaufmann

    Application blocking (suspended)

    In the end, that's what I was afraid of 😞. Any hints on how to isolate that? Especially on a users computer since I never had it on my own machine. The number of places something wrong happens are almost endless in a huge application. All I know is, often when it happens, the computer comes back from screen saver mode. Christian
  6. chkaufmann

    Error "Connection reset by peer" #10054

    Hi, I wrote a remote storage for files and manage it using an Indy TIdHttp component with some post request (get file, put file, delete file). So far this works fine local and with a remote server but when I try the script with my hosting provider I get a "Connection reset by peer" for some requests. I can reproduce it when I try to put a specific file. I always use a TIdMultiPartFormDataStream with some text variables and a file upload. I always get an error 5000 and an empty response in this case and the error message "Connection reset by peer". I already had some emails with my provider and the ensure, that there is no firewall or anything blocking my requests. And now comes the most difficult part: I tried to reduce my main application to a small sample application just with this specific request and now the request runs fine, file is uploaded and saved. So as next I put the test request in the MainForm.FormCreate event and it works as well, even when I call it more than once. I always recreate my TIdHttp component but the question remains, why do I get this error? And what could I do to isolate the problem? Christian
  7. chkaufmann

    Application blocking (suspended)

    Thanks for the link, but my questions remain since I cannot tell the user to buy a faster computer and/or not to run any other applications. Somebody writes "Only Apps will be suspended." So my question is, why my application is considered as an app? I didn't find any flag in the project settings for this. I compiled it as regular VCL Win32 application. And when my application is suspended, why is it blocked and not activated again automatically? Somehow it looks like the message queue is not handled anymore. Christian
  8. chkaufmann

    IDE Background Work

    Hi, since using Rio 2 in some cases when the IDE starts to compile in background it blocks for a few seconds and then the IDE stops and disapears without any further notice. Most of the time it happens when I'm typing new code which obviously is not valid. I would like to turn off this background work as good as possible. I don't need error insight. Sometimes I need Ctrl-Space for identifier completion but I could live with a list of identifiers that were there when I hit F9 the last time. What is the list of options I have to turn off? Christian
  9. Hi, I have a component with a string property that contains extra information. Instead of a simple text it can be a memo with many lines. What is the easiest way to have this property opened in a memo editor instead of a simple single line edit? Do I have to create my own property editor or is there a default one I can define for it? Christian
  10. chkaufmann

    Editor for Memo (String) property

    Sure! It's an old component I wrote ten years ago and don't ask me why I created a String property in the first place. I changed it and all works fine now. Christian
  11. In "Tokyo" there was a different icon on the tab when a source file was modified. In Rio I see no icon or marker for "modified" on the tab. I checked my settings "Show image on tabs" is selected. Are there any other settings I have to look for? Christian
  12. chkaufmann

    No marker for modified source files

    Thanks. The colored bar is better than nothing. I hope the icons will come back in some update. Maybe I'm getting old, but today I try to avoid too many different 3rd party stuff where ever possible. Christian
  13. Hi, I have a project group with four applications. Since I switched to Rio, using F9 or Ctrl-F9 sometimes goes wrong. "Logo12" is my active project but it compiles not only this one but one of the others as well. Here is my .grouproj file. I don't see anything, that could cause the problem: <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <ProjectGuid>{BAB4E504-1645-40A4-8EFD-7B3797E49F2A}</ProjectGuid> </PropertyGroup> <ItemGroup> <Projects Include="Logo12.dproj"> <Dependencies/> </Projects> <Projects Include="Logo12Tests.dproj"> <Dependencies/> </Projects> <Projects Include="Logo12Kuba.dproj"> <Dependencies/> </Projects> <Projects Include="Logo12KubaDe.dproj"> <Dependencies/> </Projects> </ItemGroup> <ProjectExtensions> <Borland.Personality>Default.Personality.12</Borland.Personality> <Borland.ProjectType/> <BorlandProject> <Default.Personality/> </BorlandProject> </ProjectExtensions> <Target Name="Logo12"> <MSBuild Projects="Logo12.dproj"/> </Target> <Target Name="Logo12:Clean"> <MSBuild Projects="Logo12.dproj" Targets="Clean"/> </Target> <Target Name="Logo12:Make"> <MSBuild Projects="Logo12.dproj" Targets="Make"/> </Target> <Target Name="Logo12Tests"> <MSBuild Projects="Logo12Tests.dproj"/> </Target> <Target Name="Logo12Tests:Clean"> <MSBuild Projects="Logo12Tests.dproj" Targets="Clean"/> </Target> <Target Name="Logo12Tests:Make"> <MSBuild Projects="Logo12Tests.dproj" Targets="Make"/> </Target> <Target Name="Logo12Kuba"> <MSBuild Projects="Logo12Kuba.dproj"/> </Target> <Target Name="Logo12Kuba:Clean"> <MSBuild Projects="Logo12Kuba.dproj" Targets="Clean"/> </Target> <Target Name="Logo12Kuba:Make"> <MSBuild Projects="Logo12Kuba.dproj" Targets="Make"/> </Target> <Target Name="Logo12KubaDe"> <MSBuild Projects="Logo12KubaDe.dproj"/> </Target> <Target Name="Logo12KubaDe:Clean"> <MSBuild Projects="Logo12KubaDe.dproj" Targets="Clean"/> </Target> <Target Name="Logo12KubaDe:Make"> <MSBuild Projects="Logo12KubaDe.dproj" Targets="Make"/> </Target> <Target Name="Build"> <CallTarget Targets="Logo12;Logo12Tests;Logo12Kuba;Logo12KubaDe"/> </Target> <Target Name="Clean"> <CallTarget Targets="Logo12:Clean;Logo12Tests:Clean;Logo12Kuba:Clean;Logo12KubaDe:Clean"/> </Target> <Target Name="Make"> <CallTarget Targets="Logo12:Make;Logo12Tests:Make;Logo12Kuba:Make;Logo12KubaDe:Make"/> </Target> <Import Project="$(BDS)\Bin\CodeGear.Group.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Group.Targets')"/> </Project> Any hints or tips what goes wrong? Christian
  14. chkaufmann

    Ide Rio: "Compile" not only one project

    It's the "Open File" Manager. I can still use it, but I don't set it as default for opening projects. Before I filtered on *.groupproj files there because almost all projects I have there is more than one .dpr. But now I open the .dproj files and set the most important ones as favorites on the welcom page. Christian
  15. chkaufmann

    Ide Rio: "Compile" not only one project

    I had to deactivate the GExperts project manager. Now I can open a .dproj and the previous will be closed. Not perfect, but one problem less. Christian
  16. chkaufmann

    Ide Rio: "Compile" not only one project

    Yes, I noticed that now. But when I open the .DPR file, it doesn't close the last one, it just adds the new project in the same ProjectGroup1.groupproj. So again I have more than one project in the group :-(. I know we have many new features in Delphi, but sometimes I wish to see IDE stability as it was in D7.... Christian
  17. chkaufmann

    Ide Rio: "Compile" not only one project

    Ok. My .dproj file has about 1800 lines. What should I look for? Christian
  18. chkaufmann

    Ide Rio: "Compile" not only one project

    I tried this (only one project per group). But then I run into the problem that the IDE loads this project in a new group (ProjectGroup1.grouproj) the next time I start it and when I compile I have to save the group. Do you just work with .dproj files directly? Christian
  19. chkaufmann

    Ide Rio: "Compile" not only one project

    Am I the only one who ever saw this problem? Christian
  20. chkaufmann

    Error 204 with FastMM4

    Hi, when I shutdown one of my applications I get an error 204. But I get it only if I include FastMM4 in FullDebugMode. The error happens in unit System.pas, method TInstHashMap.Finalize on the row with: while PopInstItem.Free do ; I'm a bit lost, how to find the error because the memory leak report is empty now. Where should I start to search for the problem? I only have it in one application, other applications shut down with no error. Christian
  21. chkaufmann

    Error 204 with FastMM4

    Using google with the right key words I found this: https://github.com/pleriche/FastMM4/issues/63 https://quality.embarcadero.com/browse/RSP-22897 Just a workaround but it solved my problem. Christian
  22. In my application I have some long running tasks and I'm not sure what is the better way to abort these. I have a global context (per thread) where I set an "aborted" flag when the user pressed "Cancel". 1) Should I check this flag in each loop (while, for, repeat)? 2) Should I check the flag in the most called loops only and then throw an abort exception? I tend to do 1) because then I have better control over the code flow, but what do you think? Christian
  23. chkaufmann

    How to abort tasks

    Yes that's clear, but for me the question remains if I should check the flag in each loop down through all code or if I should work with abort exception. Christian
  24. Hi, http://docwiki.embarcadero.com/RADStudio/Rio/en/Overview_of_Generics here it says, that this is not possible: IItem = interface function ChildItems<I: IInterface>: IEnumerable<I>; end; All I found is this: https://stackoverflow.com/questions/16533131/delphi-interface-generic-function-is-there-a-work-around so not really nice (readable) solutions. Does anybody have other suggestions? Christian
  25. chkaufmann

    TIdHTTPServer.OnCommandGet - Timeout

    I use "FHttpServer.Contexts.Count" for status information and it happens, that the counter doesn't go to zero. So I don't know, if it's during read/write or in my code. So the first thing I have to do is to count in the OnCommandGet handler as well, so I know if it's in my code or not. max_execution_time: If I would like to do something like that I would had to handle the request in another again probably? Something like a background worker from the Omnithread library? Then I can set a wait event and cancel execution after a certain amount of time.
×