Jump to content

duzzell

Members
  • Content Count

    13
  • Joined

  • Last visited

Everything posted by duzzell

  1. I found nothing. I reinstalled FMXLinux from GetIt and everything works.
  2. The story... I've already reinstalled Delphi 12.1 since installing it originally. That was because of a Linux problem. Reinstalling 'fixed' the problem. I just uninstalled and reinstalled Delphi. No special cleaning operations. But now another Linux problem has cropped up. I see over and over people running Delphi on a VM. I tried that a few years back on a Mac. I forget the details but it had 16 GB RAM and an open source VM system (Parallels? or maybe free VMWare?). Delphi's jerky performance on the VM drove me nuts. I finally decided to go back to giving Delphi its own machine. I'm don't want to take the time right now to go back to a VM, even though it sounds like a good idea. Instead I'm going to spend my weekend going thru my Linux configuration with a fine toothed comb, trying to find what I'm doing wrong, and fix it. So you just opened my eyes. I've got an ongoing, persistent Linux problem. I'd 'forgotten' about my other Linux problem until I talked to you.
  3. I haven't changed anything about the stock MasterDetail app. FMX.Forms is declared in both the project file and the main unit. I've done no tinkering. I have added paths but not changed any of the existing ones, I believe. Your empty project behaves exactly as mine does, giving the same errors. I will check my paths against yours... Thanks for taking your time to help me.
  4. I have a Linux deployment profile (Ubuntu) configured. Connection to it succeeds. If I make a new project, say MasterDetailApplication, building succeeds for all platforms but Linux. The project file uses FMX.Forms. I see errors: Package unit 'FMX.Forms' cannot appear in contains or uses clauses... Undeclared identifier 'Application'... I'm using the FMXLinux installed by the Delphi 12.1 web installer. I have not tried installing FMXLinux from GetIt.
  5. I'm seeing this same error with Delphi 12.1 compiling for Linux. @JGMS did this clear up for you?
  6. Hello Using Delphi 12.1, I have a library that under Win64 generates runtime access violations when NativeUInt is used to cast between pointers and integers. This has not generated errors under Win32: Result := Pointer(NativeUInt(FElements)+(NativeUInt(Index)*ElementSize)); This code looks fine to me and others, so my first question is why is the error happening now? I understand that in Delphi 12+ NativeInt (and probably NativeUInt) cannot be used for overloading, but that does not mean to me that they can't be used for casting. I can fix code like the above by making it explicit: {$IFDEF CPU64BIT} Result := Pointer(UINT64(FElements)+(UINT64(Index)*ElementSize)); {$ELSE} Result := Pointer(UINT32(FElements)+(UINT32(Index)*ElementSize)); {$ENDIF CPU64BITS} The problem here is that there's a lot of this type of casting in the library and I'll never be sure I've changed all of them. I took a hint from this SO post (https://stackoverflow.com/questions/7630781/delphi-2007-and-xe2-using-nativeint) and added code to the .inc file included in every .pas file: {$IFDEF CPU64BITS} type NativeInt = INT64; NativeUInt = UINT64 {$ELSE} type NativeInt = INT32; NativeUInt = UINT32; {$ENDIF CPU64BITS} However, the inc file is included in each .pas file ahead of the interface uses clause. It appears that in Delphi type declarations are not allowed ahead of the uses clause. So my second question is whether there is a way I can fix this problam without having to edit every single file in the library. It seems to me like I must have missed a switch or directive that would do what I need. Thanks
  7. Well, I was going to settle for Beyond Compare. But I found that when I choose Beyond Compare as the Default internal viewer, then choose External viewer as preferred, the MMX Structured Diff Viewer is displayed. So I got what I want. Thanks
  8. In Delphi 12.1, I try to make the MMX Structured Diff View the default: - select Structured Diff Viewer - click default button (or not, it doesn't matter) - choose External viewer - click Save The IDE ignores my selections and continues to display the default internal viewer. When I re-open the Difference Viewer dialog, Internal view is selected, as if my changes were not saved. I know this is not your doing but do you have any ideas about what I may be doing wrong? Thanks
  9. I've been using pre-release versions of the code and different versions of Delphi were handled by deeply nested defines that did not seem quite right to me. I'm using the release version now, the defines work correctly, and I had to undo some of the changes I had made. Also, the new syntax highlighting in Delphi 12 that reflects the current state of defines was a big help.
  10. Remy, your comment about RawByteString possibly being redelared made me look for other things I wouldn't have thought of, and in a used file I found this line: NativeInt = Integer; That would explain why the errors occur ontly for win64. Even though this is the same technique as in the fix I attempted, the whole idea of redeclaring a known type is so bizzare to me that I didn't look to see whether it had already be done elsewhere in the code. Thanks a million, Remy. You make me so glad I posted the question.
  11. Here are a few longer excerpts. These errors are occurring so often that I think there must be something in my setup that is causing them. The errors have been of similar format: Project raised exception class $C0000005 WITH MESSAGE c0000005 ACCESS_VIOLATION. 1) {$IFDEF FPC} {$PUSH} {$WARN 4055 off : Conversion between ordinals and pointers is not portable} {$WARN 4056 off : Conversion between ordinals and pointers is not portable} {$ENDIF} function ZRawToUnicode(const S: RawByteString; const CP: Word): UnicodeString; begin if Pointer(S) = nil then Result := '' //DU {$IFDEF CPU32BITS} else Result := PRawToUnicode(Pointer(S), PLengthInt(UInt32(S) - StringLenOffSet)^{$IFDEF WITH_TBYTES_AS_RAWBYTESTRING}-1{$ENDIF}, CP); {$ENDIF CPU32BITS} {$IFDEF CPU64BITS} else Result := PRawToUnicode(Pointer(S), PLengthInt(UInt64(S) - StringLenOffSet)^{$IFDEF WITH_TBYTES_AS_RAWBYTESTRING}-1{$ENDIF}, CP); {$ENDIF CPU64BITS} // else Result := PRawToUnicode(Pointer(S), PLengthInt(NativeUInt(S) - StringLenOffSet)^{$IFDEF WITH_TBYTES_AS_RAWBYTESTRING}-1{$ENDIF}, CP); end; {$IFDEF FPC} {$POP} {$ENDIF} 2) //DU {$IFDEF CPU32BITS} procedure DataEvent(Event: TDataEvent; Info: Integer); override; {$ENDIF CPU32BITS} {$IFDEF CPU64BITS} procedure DataEvent(Event: TDataEvent; Info: Int64); override; {$ENDIF CPU64BITS} // procedure DataEvent(Event: TDataEvent; Info: NativeInt); override; //DU {$IFDEF CPU32BITS} procedure TZAbstractRODataset.DataEvent(Event: TDataEvent; Info: Integer); {$ENDIF CPU32BITS} {$IFDEF CPU64BITS} procedure TZAbstractRODataset.DataEvent(Event: TDataEvent; Info: Int64); {$ENDIF CPU64BITS} //procedure TZAbstractRODataset.DataEvent(Event: TDataEvent; Info: NativeInt); var I, j: Integer; begin inherited DataEvent(Event, Info); if Event = deLayoutChange then for i := 0 to Fields.Count -1 do for j := 0 to high(FieldsLookupTable) do if (FieldsLookupTable[j].Field = Fields[i]) and (FieldsLookupTable[j].DataSource = dltResultSet) then begin FResultSetMetadata.SetReadOnly(FieldsLookupTable[j].Index, Fields[i].ReadOnly or not (pfInUpdate in Fields[i].ProviderFlags)); FResultSetMetadata.SetSearchable(FieldsLookupTable[j].Index, (pfInWhere in Fields[i].ProviderFlags)); end; end; 3) {$IFDEF FPC} {$PUSH} {$WARN 4055 off : Conversion between ordinals and pointers is not portable} {$WARN 4056 off : Conversion between ordinals and pointers is not portable} {$ENDIF} function TZKeyAndFunctionPairList.Get(Index: NativeInt): PZKeyAndFunctionPair; begin {$IFNDEF DISABLE_CHECKING} if NativeUInt(Index) > Capacity then //excluded due to IFNDEF Error(SListIndexError, Index); //excluded due to IFNDEF {$ENDIF DISABLE_CHECKING} Result := Pointer(NativeUInt(FElements)+(NativeUInt(Index)*ElementSize)); end; {$IFDEF FPC} {$POP} {$ENDIF} function TZFunctionsList.FindByKeyAndName(const aKey : Cardinal; const aName: string): Integer; var I: NativeInt; KeyAndFunctionPair: PZKeyAndFunctionPair; begin Result := -1; for I := 0 to FFunctions.Count - 1 do begin KeyAndFunctionPair := FFunctions.Get(I); if aKey = KeyAndFunctionPair.Key then <== AV stop here, caused by Get() I think if aName = KeyAndFunctionPair.Value.Name then begin Result := I; Break; end; end; end; 4) {There's a question about character size here, but I want to know why my fix allows the code to run} {$IFDEF FPC} {$PUSH} {$WARN 4055 off : Conversion between ordinals and pointers is not portable} {$ENDIF} function SQLQuotedStr(Src: PWideChar; Len: LengthInt; Quote: WideChar): UnicodeString; overload; var P, Dest, PEnd, PFirst: PWideChar; begin Dest := Nil; P := Src; PEnd := P + Len; PFirst := nil; while P < PEnd do begin if (P^=Quote) then begin if Dest = nil then PFirst := P; //DU {$IFDEF CPU32BITS} Inc(UInt32(Dest)); {$ENDIF CPU32BITS} {$IFDEF CPU64BITS} Inc(UInt64(Dest)); {$ENDIF CPU64BITS} // Inc(NativeUInt(Dest)); end; Inc(P); end; ...
  12. Hello I use a number of AWS services and I use REST interfaces to implement them. Broad question: if I embed something like the DukTape javascript engine in my Delphi 12.1 fmx app, would I be able to use the AWS javascript SDKs instead of the REST API's? If so, might that extend to other javascript APIs such as Google's and Apple's? What is the basic principle that would make or break such an approach? Thanks
  13. I need to construct a "raw email message" for AWS SES. The message will conform to the Internet Message Format, rfc 5322. Can I use Indy's TIdMessage to construct this message, similar to the way the JavaMail and Python email.mime libraries are used?
×