Jump to content

marcocir

Members
  • Content Count

    28
  • Joined

  • Last visited

  • Days Won

    1

marcocir last won the day on June 16

marcocir had the most liked content!

Community Reputation

2 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. marcocir

    A screen mirroring utility

    Thank you all, Scrcpy is really an amazing piece of software, not only a screen mirroring, but a great solution to connect to, and use from your PC, an Android device. I only wonder if there is a way to automatically reconnect the device via wi-fi without have first to reconnect it , every time, via USB to the PC (this is a configuration - remoting an Android tablet on a PC or Mac - that should be used daily by my customers, and tell them that every morning they have to connect first the tablet to the USB cable is not the optimum) Marco
  2. marcocir

    A screen mirroring utility

    Hi all. I'm looking for a simple Windows software capable to show the screen of an Android device connected to the same wifi of my PC. Many times I've seen this type of software used in videos and during Delphi conferences by the speakers, to show to the audience the IDE of Delphi *and* an Android App running on the device at the same time, but I can't remember their names. Marco
  3. marcocir

    64 bit compiler problem

    Hi Arnaud, and thanks. I don't know if that change happened, but, as said by David, stack overflow error was there for a problem in my code: the (evil) static array had a size change when I ported the source from Delphi 10.2 to 10.3 , so the overflow problem with the stack, my bad.
  4. Thank you Bernhard. No, I couldn't use the external libraries either way. Having to use the a different version of Python from any other that was eventually registered, I set the DLL's path on the OnBeforeLoad event of the Engine. The problem was only with Python external libraries Anyway, I found a solution. 1) Follow this StackOverflow answers: https://stackoverflow.com/questions/49737721/adding-packages-to-python-embedded-installation-for-windows 2) I fixed the error, and succesfully imported and used numpy and matplotlib with the embedded version of Python adding lib\site-packages entry to pythonXX._pth file, inside embedded python folder. Now I have a zip file that I can expand on a generic PC and run my P4D application with numpy and matplotlib plots (as SVG) 😉
  5. Hi all. I have a Delphi P4D Windows application that I would to distribute as a single zip file. I use an embedded 3.8.9 64 bit version of Python in a \python folder of my application , where I have installed numpy and matplotlib, libraries that my app needs to use as well. If I try to copy the whole application folder, with \python subfolder, in another PC, and run the code where Python try to import numpy, I always get a ModuleNotFoundError : No module named 'numpy' (matplotlib is the next import module in the script, but Python script aborts on numpy import line, I think). If I don't try yo import and use these libraries my application runs just fine from the zip file. I've used Google to search for a hack but no solution seems to help: someone could suggest how to add Numpy (and MatPlotLib, I think this should be the same) to that zip file, so my customer can simply de-zip my installation file and use my Delphi application? Thanks!
  6. marcocir

    64 bit compiler problem

    Uhmmmm, I agree, but I have compiled the same exact source code, using same Delphi Compiler options. I don't know if it's normal that mov eax,.... instruction at offset $4 is of different length. Ok.., It's enough, thank you all. 😉
  7. marcocir

    64 bit compiler problem

    Yes David, I'm here to learn, if possible. My code is buggy, no problem, and static arrays are horrible in this context. So same exact code, compiled in 10.2.3 version continues to run without problems, and compiled with 10.3.3 version continues to crash with stack overflow error: work to do this summer. This runs (10.2.3): This crashes (10.3.3): Thanks for your great help.
  8. marcocir

    64 bit compiler problem

    Thanks Kas, another thing to remember! 😉
  9. marcocir

    64 bit compiler problem

    Thanks David, I completely agree, not a great example of optimization here, but bet it that this method had no problems (lucky me, ok) till now. I have, also, to dig on why the first 562k (...) moved on the stack, now are not unloaded from the stack when the method returns.
  10. marcocir

    64 bit compiler problem

    Ooops, I didn't see that you integrated your answer...
  11. marcocir

    64 bit compiler problem

    Arnaud, now I hope I get the point. Yes it is a static array of 305k (32bit) or 562k (64bit). Two passes and we are over the 1MB upper limit. First, my bad, I was convinced that passing an array that way was exactly as passing it like with a var parameter (a pointer, so, no copy of the whole array on the stack). But this is an array of a complex record, with strings, so maybe this is the falling point. Second, I have to understand why on the heart the stack isn't unloaded from the first 562k when my method returns. Sure, maybe I have to re-read some basics, sorry David, you are right, but the start of this story is that the exact same code compiled to 64 bit, since 2014 , from Delphi 10.1 to 10.3.2, without any stack overflow error (and this is a strange thing ;( ).
  12. marcocir

    64 bit compiler problem

    Ok, I've traced the problem to the asm lines of disassembly windows: The stack error is down to the selected line, where, if I've well understood that code, the generated asm tries to move stuff on the stack (rsp), in that loop (jnbe), till it gets the max stack size permitted (?), 1 mb for my app. What's the meaning of that code fragment (that I can't see in the 32 bit prolog asm)? Thanks a lot!
  13. marcocir

    64 bit compiler problem

    Thanks Arnaud. There is a reason why TProgrammaCalcio is not passed as const: I have to update Selezionato (Programma[iProx].Selezionato := 1). The question is always there: maybe it wasn't clear, but my problem isn't the speed of the code, but that 64 bit prolog asm (and not the 32 bit equivalent) seems to recall something endless and the application explodes in a stack overflow error. You are right: that method could be a bit (or a lot ) optimized, but now it can't because the simply execution of the begin line crashes the application! My asm knowledge is not so strong, so this post... p.s think that many of those panels and layouts were added as a trick to fix some fmx... 2014/2015 problems 😉
  14. marcocir

    64 bit compiler problem

    Hi Remy, absolutely. This is a medium fmx application, sort of 100.000 lines. I attach the code of method whose the begin is so bad compiled - and hope this could help. Thanks a lot AddProgrammaCompleto method.txt
  15. Hi everybody. I have a problem trying to compile a 64 bit Firemonkey Windows application in Delphi 10.3.3, app that used to compile, both 32 and 64 bits, without problems in Delphi 10.1, 10.2, 10.3.1 and 10.3.2. The first screen of disassembly window is the code generated by the Delphi 10.3.3 compiler, targeting Windows 32 bit in the IDE, for the begin line (577) of the AddProgrammaCompleto method (screen rendering of many fmx panels, layouts, ecc.). The second one is what compiler generates for the same line of code with target Windows 64 bit: as you can see there are differences, of course, but this code, the second time that is executed, ends in a stack overflow error (recursive calling itself?), letting the 64 bit version of my application unusable. My code is exactly the same, this is a simple rebuild switching from 32 to 64 bit. I'd need your help to understand if this simply a bug of the 10.3.3 64 bit windows compiler (and if there is something that I can try to "fix" it in your opinion) or if there is something in my code that, now, is bad for that compiler. Thanks N.B. Hope this is the right place for this type of problem
×