Python App: When it crashes, is there a way to see any program output?
|
10-09-2024, 08:03 AM
(This post was last modified: 10-09-2024 08:05 AM by StephenG1CMZ.)
Post: #1
|
|||
|
|||
Python App: When it crashes, is there a way to see any program output?
When Python tries to run a program and fails, I see a glimpse of "import main.py" or something before it crashes back to Android.
I am wondering whether adding a sleep or a wait somewhere might allow some program output to be seen...Or is the crash immediately upon running the program? Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
10-10-2024, 09:07 AM
Post: #2
|
|||
|
|||
RE: Python App: When it crashes, is there a way to see any program output?
At the moment, very few people use this application, and it's difficult to determine when exactly the crash occurs. Maybe try starting with a simple program that prints something on the screen for a slightly longer period and then waits for user input, for example:
Code: for i in range(2000): After running, it should display numbers from 0 to 1999 sequentially, which should take a few seconds. When the display is complete, the program should stop and wait for user input, so it will behave similarly to a freeze. Check if anything at all appears on the screen. Piotr Kowalewski |
|||
10-10-2024, 11:32 AM
Post: #3
|
|||
|
|||
RE: Python App: When it crashes, is there a way to see any program output?
With main.py containing a print and zsys.py containing my zsys program: It tries to execute zsys and crashes.
With zsys deleted and that loop in main.py: The loop is seen OK. With zsys in main.py, prefixing the code with a print and input: The program crashes before executing the print and input. Conclusion: Something about beginning to execute zsys (and many others) causes an immediate crash... Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
10-10-2024, 11:37 AM
(This post was last modified: 10-10-2024 12:46 PM by StephenG1CMZ.)
Post: #4
|
|||
|
|||
RE: Python App: When it crashes, is there a way to see any program output?
Just in case someone is thinking my zsys is causing the fault, here is a small list of programs known to crash:
Aclock (draws analogue clock) [now removed?] Zsys (mimics sys module) Ztime (mimics time module) Ztimer (shows elapsed time) Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
10-10-2024, 01:58 PM
(This post was last modified: 10-10-2024 02:00 PM by StephenG1CMZ.)
Post: #5
|
|||
|
|||
RE: Python App: When it crashes, is there a way to see any program output?
I have tried a simple cut-and-paste print(...) via the mobile clipboard and that is OK, so it is not simply importing any source that causes the crash. Just 100% of the programs I have tried to import, except that trivial example.
Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
10-10-2024, 02:13 PM
Post: #6
|
|||
|
|||
RE: Python App: When it crashes, is there a way to see any program output?
(10-10-2024 11:37 AM)StephenG1CMZ Wrote: Just in case someone is thinking my zsys is causing the fault, here is a small list of programs known to crash: Perhaps all these modules share a common element that causes the crash. It could be a single command that each of these modules contains, which leads to the crash on Android. One could try to exclude parts of the code through trial and error to see at which point it starts working. Piotr Kowalewski |
|||
10-10-2024, 03:45 PM
Post: #7
|
|||
|
|||
RE: Python App: When it crashes, is there a way to see any program output?
(10-10-2024 11:37 AM)StephenG1CMZ Wrote: Just in case someone is thinking my zsys is causing the fault, here is a small list of programs known to crash: As mentioned already in the other thread (SW Libraray 0n Zsys), your app runs flawlessly in the virtual Prime in Win11 and also on a Prime G2. As I stated elsewhere, the Android HP Prime App is buggy, read almost unusable. A: No connectivity B: On a Galaxy Tab S2 (Android 7.0) the app stops and disappears immediately after start C: Aclock and Zsys run flawlessly elsewhere (G2, Virtual) Even Piotr's simple proposed program crashes the App. 1. reset the Python App (in the App screen, focus on Python, reset) 2. type in that small code snippet 3. press Num 4. watch the HP Prime app disappear instantly 5. at least that program runs after restart of the Prime Did I already mention quick and d... ? For the time being, I'd recommend to not waste any time anymore with that expensive buggy software. Perhaps some time someone from Moravia checks their commercial software and understands that at least a minimum of quality control is necessary. After all these reports of a buggy, incomplete product the Prime is, I think it's a blatant piece of impudence to publish cr*p like this for 24€. Meanwhile less and less forgiving, Günter |
|||
10-11-2024, 09:09 PM
Post: #8
|
|||
|
|||
RE: Python App: When it crashes, is there a way to see any program output?
(10-10-2024 03:45 PM)Guenter Schink Wrote:(10-10-2024 11:37 AM)StephenG1CMZ Wrote: Just in case someone is thinking my zsys is causing the fault, here is a small list of programs known to crash: Hello, Indeed, there are many problems with the firmware and especially with micropython. But, not all is to be thrown away. Indeed, with the garbage collector functions of micropython, I was able to avoid a lot of pitfalls! I implemented the garbage collector functions in the DwPrime software (bitmap software still in evolution) and which allowed to avoid big crashes or the exit of the program (info: put the heap and stack parameters to the max on the G2 for my software). In short, we can do a lot of things on the hp prime g2 compared to the competition, especially thanks to its touch screen. Too bad this calculator will not know a G3. Let's hope for a nice software evolution, but hey ... I admit that if swissmicro makes us an equivalent touch machine one day, I will buy it right away. Okay, I'll stop there. See you soon. |
|||
10-11-2024, 11:17 PM
Post: #9
|
|||
|
|||
RE: Python App: When it crashes, is there a way to see any program output?
(10-11-2024 09:09 PM)albud44 Wrote: In short, we can do a lot of things on the hp prime g2 compared to the competition, especially thanks to its touch screen.Will this also be the case with the Prime G1? (10-11-2024 09:09 PM)albud44 Wrote: Too bad this calculator will not know a G3.Is this info officially acknowledged? (10-11-2024 09:09 PM)albud44 Wrote: I admit that if swissmicro makes us an equivalent touch machine one day, I will buy it right away.Sure? SM calcs have lots of potential, but the keyboard of the Prime is far superior to that of, say, the DM42. If SM manages to improve their keyboard to a level on par to that of the Prime, or even the 30b, then I'd consider buying a DM series calc again. -- Ray |
|||
10-12-2024, 07:25 AM
Post: #10
|
|||
|
|||
RE: Python App: When it crashes, is there a way to see any program output?
(10-11-2024 09:09 PM)albud44 Wrote: Indeed, there are many problems with the firmware and especially with micropython. This discussion was about the extremely buggy, thus almost unusable, expensive release for Android.The firmware itself is a different issue. Piotr has indicated that a new fw may be released in a not so distant future, fixing a couple of ... Günter |
|||
10-12-2024, 08:20 AM
Post: #11
|
|||
|
|||
RE: Python App: When it crashes, is there a way to see any program output?
(10-12-2024 07:25 AM)Guenter Schink Wrote:(10-11-2024 09:09 PM)albud44 Wrote: Indeed, there are many problems with the firmware and especially with micropython. Hello, Oops, sorry, I didn't read everything properly and could only see that it concerned the software on android! |
|||
10-12-2024, 08:29 AM
Post: #12
|
|||
|
|||
RE: Python App: When it crashes, is there a way to see any program output?
(10-11-2024 11:17 PM)Raymond Del Tondo Wrote:(10-11-2024 09:09 PM)albud44 Wrote: In short, we can do a lot of things on the hp prime g2 compared to the competition, especially thanks to its touch screen.Will this also be the case with the Prime G1? Hello, For the G1, I don't have one on hand, I simply say that since it was slower and with less memory that it limited things compared to the G2. For example, I don't know if the DwPrime software works well on the G1 because I couldn't test it, but given that there is less heap and stack for micropython, I have doubts about the fact that the DwPrime software can work correctly. For the G3, Hewlett Parkard having closed its calculator department and Moravia is not known for designing such a machine, I told myself that the G3 was a sweet dream. Concerning the keyboard stories, I don't have a swissmicro machine on hand, I rely on your experience on the subject. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)