Jump to content

Rollo62

Members
  • Content Count

    1950
  • Joined

  • Last visited

  • Days Won

    25

Everything posted by Rollo62

  1. 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.
  2. 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.
  3. 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).
  4. 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
  5. 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.
  6. 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.
  7. 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.
  8. Rollo62

    Debug visualizers

    More than visualizers I wish some stable, reliable debug evaluation in the first place, under all platforms .
  9. 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.
  10. 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.
  11. 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.
  12. Yes it was late yesterday: I can find the source here Embarcadero\Studio\20.0\source\databinding\components
  13. How BIG is big, if you only use a small part of it ?
  14. 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 ?
  15. @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
  16. 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.
  17. Rollo62

    ActiveMQ + OpenWire for Delphi?

    ... and somebody has stolen "OpenWire" from Boian's great component frameworks ... http://www.mitov.com/products/openwire#overview
  18. 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.
  19. 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 ?
  20. Rollo62

    In-App Clipboard

    Not sure what exactly you are looking for, but wouldn't it be an option to register a custom, "secret" clipboard format, maybe with encrypted data ? https://blog.dummzeuch.de/2018/12/18/register-an-use-a-custom-clipboard-format-in-delphi/
  21. Hi there, I took some time to check with 32/64-Bit on older devices, and found that Bluetooth was not running on my old Nexus 7. The Nexus 7 (on Android 6.0.1) is a real 32-Bit device, so I searched into the wrong direction. The real reason was that Location was not enabled (while location permission was granted, as it should). I didn't find much useful answer, only this note. The rule seems to be: you have to set at least coarse location permission on Android 6.0.1 (32-Bit) you have to enable location sensor additionally How about behaviour in other versions < or > Android 6.0.1 ? This is a little disturbing fact to me, since I always considered that Bluetooth need the coarse Location permission only because of BLE is able to retrieve its own location info in its own network, like Beacon technology (my personal assumption). Now it seems that really physically location sensor must be running in the Phone/Tablet too (why). Usually I have this active anyway in my test devices, so I never been falling into such trap before, so I learned something new today. I wonder if this is caused by the old Android 6.0.1 only, which had many BLE issues, or if this is a general requirement in any OS version ? Maybe there is some deeper documentation what explains this odd behaviour.
  22. Thanks Dave, that looks like the "explanation". Very good to know this note from Android. Makes not much sense to me either, so we have to believe that this is an important step in security. Unfortunately I cannot explain such info to my customers, so I stick to my own version: that BLE might span up its own "location" network via Beacons. At least my customers could follow and understand such explanation as reason for location permission.
  23. Yes, but location "permisson" is different to location "permission + location really enabled". When the user starts with location permission, and then switch off after location, BLE will stop. There are several ways to retrieve location: via GPS sensor, via WiFi triangulation, via Bluetooth Beacon, etc. So why should Bluetooth require GPS sensor ? I must check my permission system, maybe I requested coarse AND fine location, I will check if thast makes the difference. Probably I mixed up some configurations from different projects.
  24. Yes, permission is required, that is clear. But it seems that additionally location in the phone (GPS sensor) must be also enabled to use Bluetooth, thats my point. I just checked with more modern Phones. Yes, Location needs permission AND location needs to be enabled in the Galaxy S9+ phone (Android 9). Thats strange, because I remember that it was not always needed to enable location, to use Bluetooth, anyway I'm not 100% sure about that. So I have to check with different phones how things behave.
×