Jump to content

Rollo62

Members
  • Content Count

    1674
  • Joined

  • Last visited

  • Days Won

    22

Everything posted by Rollo62

  1. Rollo62

    How should I organize cross platform code?

    @Fr0sT.Brutal Yes, did that before. Tends to get very ugly and messy with ios and Android soon. Thats why I changed my method.
  2. Rollo62

    How should I organize cross platform code?

    I try to separate all code into platform separated untits meanwhile, even if this can get more work. But the IFDEFs tend to get messy very soon, even in small units. Even if the units are getting very small and simple, I found for myself that its very worth it to get a clean structure. unit MyUnit type TMyBaseOrAbstractClass = class or better an interface end; uses {$IF DEFINED( ANDROID )} MyUnit.Impl.Android, {$ELSEIF DEFINED( IOS )} MyUnit.Impl.iOS, {$ELSEIF DEFINED( Macos )} MyUnit.Impl.Macos, {$ELSEIF DEFINED( MSWINDOWS )} MyUnit.Impl.Win, {$ELSEIF DEFINED( Linux )} MyUnit.Impl.Linux, {$ELSE} {$MESSAGE ERROR 'MyUnit: unkown platform' } {$ENDIF} FMX.DialogService; ... unit MyUnit.Android uses MyUnit; type TMyBaseOrAbstractClass_Impl = class( TMyBaseOrAbstractClass ) end;
  3. Did you "upgrade" your old project from 32 to 64-Bit ? As the platform 64 was added, the automatic conversion of the IDE might fail. As vfbb proposes, check the libraries. Maybe even better, try to completely create a new project file, as 10.3.3 might put all necessary files into it.
  4. Thanks for testing. Strange, I have the same version, but it reliably crashes on 3D acceleration. What I found is that the whole VmWare app crashes, also when opening Paint3D or some other 3D related apps. Maybe RadStudio switches to 3D hardware acceleration mode only when a project is loaded, that would make sense. It seems something wrong with my VmWare 3D drivers here, but I haven't changed anything special. I have to check with VmWare more deeply.
  5. Is the app in the PlayStore already switched to AAB Bundles, or do you try to update APK ?
  6. Rollo62

    What is the best way LoadFromFile & Thread? (FMX)

    Ups, the scene doesn't look like that much. What you mean by "main scene" ? What I meant was just loading liles needed for the current view, not keeping in background. When switching from scene1 to scene2 you have maybe enough time to load, even with a little delay, but this is maybe not visible or you could cover this by some scene change splash image. If scenes move linear, you could hold and prepare the last and next view maybe in the background, while running the current view. If you have one view really needing 500MB, OK then I'm out
  7. Rollo62

    What is the best way LoadFromFile & Thread? (FMX)

    Still don't understand why you need to reload on-the-fly, instead of pre-load all relevant bitmap lists, and just switch them on demand.
  8. Hi there, I've got a strange exception, only with Android 32-Bit during Debugging, other platforms including IOS work well. With iOS 64 I had no issue seen, but wouldn't count on it right now. I use a TDateTime variable, and want to compare against NULL.. Since TDateTime is a Double with 8 Bytes, a simple cast to Double( Self ) should make not any harm. Maybe there are special conditions on Android, as Extended is reduced to Double, and maybe there are some conversion side effects with Double as well ? I use a class helper for adding such functionality, which is used in a million other places too. function TDateTime_Helper.ToDouble : Double; begin Result := Double( Self ); // Here it crashes, see images enclosed, they only have 2 ARM assembler lines end; and I already extended my conversion routing to separated local variables: // global variable for storage, only reading var LUNull : TDateTime = TDateTime( 0.0 ); class function TDateTime_Helper.Create_Null : TDateTime; begin Result := LUNull; // Could the global variable cause issues in a Thread ? Buts its readonly. end; function TDateTime_Helper.IsNull : Boolean; var LSelf : Double; LNull : Double; begin LSelf := Self.ToDouble; //11.03.20 added local variables, to check Android crash LNull := Create_Null.ToDouble; if SameValue( LSelf, LNull ) then Result := True else Result := False; end; I check a variable, which is called in a thread if FLastUpdate.IsNull then // called like this begin .... end I must confess that I use above scheme in many thousands of places, also heavily within threads (even higher loded), without an error before. The caller can be debugged very reliable, and the error is very reproducable When the caller comes in first, second, third time, with zero, all is fine When the caller comes in with a real Double value, I can debug and see a valid double value in the watch (e.g. FLastUpdate = 43901.1603147338 ) Inside the conversion ToDouble it crashes When entering with Zero, it looks like the images img. 1 and 2 (see the registers changing) When entering with Date, it looks like img. 3, and immediately it crashes at img. 4 What could cause such error, it sounds a little like failure of JNI Bus, but maybe I'M totally on the wrong track ? Probably there is some genius with a good hint how to fix this nasty bug.
  9. I just tired a brute-force approach to get this solved. I replaced this function TDateTime_Helper.ToDouble : Double; begin Result := Double( Self ); end; by that function TDateTime_Helper.ToDouble : Double; var LDbl : Double; begin Move( Self, LDbl, Sizeof( LDbl) ); Result := LDbl; end; And believe it or not, I have a crash-less app now. Any ideas or explanations ? I still would like to get back to the original approach, which should be more effective (untested).
  10. I do create my files with BOM too, and additionally try to keep existing status when loading alien documents. That way, all parties should be happy. I try to follow these rules: File has BOM --> Keep BOM File without BOM --> Keep without BOM Create my own file --> Always use BOM
  11. Rollo62

    Android Ver 10 and Firemonkey

    Means that it is not working at all, or that Google noted some devices are not compatible ? If the latter, you can find some good info in the PreLaunchTest page.
  12. Rollo62

    Preventing iOS to lock screen

    In Fmx this would look somewhat like this: function DoLocked(const ALock : Boolean) : Boolean; var UIApp : UIApplication; begin UIApp := TUIApplication.Wrap(TUIApplication.OCClass.sharedApplication); if ALock then begin UIApp.setIdleTimerDisabled(True); // aquire wakelock Result := True; end else begin UIApp.setIdleTimerDisabled(False); // release wakelock Result := False; end; end; I put some more functionality around that basic one, to make it workable on all platforms, and to avoid double-enabling, but I removed that from the code above.
  13. I used manual memory handling too, so the change should be fine for me. But I hope that there won't be too many strange, unexpected errors, caused by the changed Free/Dispose timing now.
  14. Rollo62

    Debug visualizers

    More than visualizers I wish some stable, reliable debug evaluation in the first place, under all platforms .
  15. Rollo62

    Capture a signature and store in DB

    Have you received UPS/DHL packages recently ? Make a test, how important the signature nowadays is ... I could even make 3 crosses, and nobody complains.
  16. I would not use it that way, since the new inline variable feature may mess up things too, even if this may work in some cases. Better be safe than sorry, and use a separate variable to monitor the status.
  17. I'm not dealing with MAcos yet, but did you has provisioning file update recently ? Such issues I usually have when they need to be renewed, so the old oned were doubled. Most of the time, the Options\Provisioning page shows wrong information, telling me that provisioning is OK while its not.
  18. Yes it was late yesterday: I can find the source here Embarcadero\Studio\20.0\source\databinding\components
  19. How BIG is big, if you only use a small part of it ?
  20. Hi there, I just found strange behaviour, where connected device doesn't show up and the old disappear. This happened before, but usually after pressing "Refresh" on the iOS Device Target, this got updated. Now I saw this, both were show at the same time (current connected, and NOT connected device) iPhoneX is currently connected, and I can use it and debug it. iPhone6 was NOT connected, not even the last 3 days, and it is stored somewhere. I'm asking myself where is this information stored, and how could I clean this shadow memory ? What I assume is that RadStudio doesn't store anything like this, but it will load the current list via PAServer all the time (maybe I'm wrong here). I already restarted RadStudio, but still the same is visible. Then XCode would be the candidate for storing all devices connected, but at least its NOT listed in the current devices page either: So the question is: where are these "old", formerly connected devices stored ? It seems there is some kind of hidden cache somewhere, does somebody know howto clean this ?
  21. @Dave Nottage Nope, sorry, I couldn't find any ActiveMobileDevice in any local nor AppData files. The whole system (Windows/Macos/XCode) was still running since yesterday, and today, w/o any device connected, it still showed the last device in the upper bar. After pressing the "Refresh" button beside this I've got an IDE message (by the way, I have seen same issue several times before, but that doesn'T do much harm). It seems to be the case when devices are lost. while IDE tries to re-load it into the view. Usually IDE works still well after this, so no big issue. I enclosed the details list enclosed, maybe this is helpful. Now, after this exception, the IDE devices list seems to be empty, as it should. I will take a look at the ActiveMobileDevice during my work, and maybe get back if I can spot something interesting. Anyway, this issue is no big deal, just annoying, thanks anyway for looking into this ... DeviceRefreshException.txt
  22. Rollo62

    Just wanted to brag a bit :-)

    @Hans♫ Congratiulations from my side too. Is this FB topic maybe related a bit ? https://en.delphipraxis.net/topic/730-linker-errors-when-including-facebook-sdk-on-ios12/?tab=comments#comment-18105 May I ask: does FB has part in that success story ? Did you make a special FB promotion, advertising to get there ? Would be great to share your experiences.
  23. Rollo62

    ActiveMQ + OpenWire for Delphi?

    ... and somebody has stolen "OpenWire" from Boian's great component frameworks ... http://www.mitov.com/products/openwire#overview
  24. Rollo62

    Android Service using local sqlite DB

    Could the "features files" have something to do with it ? https://en.delphipraxis.net/topic/1351-fmx-macos-missing-image-sqlite3-when-running-on-macos-sierra/?do=findComment&comment=11335 The answer was for Macos setting, but as fas as I understand will the featured files adding necessary librarties to all platforms when needed. The hint that Sqlite "featured files" option is needed is still not present at Docwiki, but you can fint the option in the deployment manager.
  25. Rollo62

    iOS Firebase Push Notifications

    I have no FireDAC.inc on hand right now, what did you change there ? Is there a link to libibtogo, or is it possible that you have added libibtogo. to the deployment somehow ?
×