Hunting for bugs in OXT 0.98 and above

Any Bug Fixes to OpenXTalk should get listed here so we can keep a list and offer thanks to contributors!
User avatar
tperry2x
Posts: 2785
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Hunting for bugs in OXT 0.98 and above

Post by tperry2x »

Image

I'm bug hunting.
Apart from the issue experienced by Richmond that seems to sporadically freeze his copy of OXT Lite (can anyone else reproduce this same error)
https://www.openxtalk.org/forum/viewtop ... 5651#p5651

I'm also going through looking at historical bugs that I now hope are fixed.
So, there will probably be a list appear here... here we go.
User avatar
tperry2x
Posts: 2785
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Hunting for bugs in OXT 0.98 and above

Post by tperry2x »

If anyone can test this on MacOS Big Sur:
as-sheet.png
as-sheet.png (58.68 KiB) Viewed 7510 times
Make a new stack, a field (called "field1" in this example), and put some text inside.
Then, in the message box, try:

Code: Select all

answer cd fld "field1" as sheet
You should indeed get the alert displayed as a sheet, attached to the top of the Window on MacOS.

On Big Sur, this might not work. Can someone confirm?

EDIT: Confirmed working in Sonoma by Richmond 2/2/24
User avatar
tperry2x
Posts: 2785
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Hunting for bugs in OXT 0.98 and above

Post by tperry2x »

Bug with pasting this into a field:

If you copy this text:

Code: Select all

>>> ⁨⁩⁩ <<<
...and paste into a field on a new card, the IDE will unexpectedly quit
User avatar
tperry2x
Posts: 2785
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Hunting for bugs in OXT 0.98 and above

Post by tperry2x »

Community widgets (non com.livecode ones)
Any widgets not developed by Livecode may struggle to load in revidelibrary.8.livecodescript, because of this line:
revIDE.png
revIDE.png (48.49 KiB) Viewed 7501 times
Can simply be commented out to allow widgets to load that don't include com.livecode in their name.

Fixed in v1.0 of OXT Lite
User avatar
tperry2x
Posts: 2785
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Hunting for bugs in OXT 0.98 and above

Post by tperry2x »

[cleaned up a few spurious posts, my earlier one included]
User avatar
OpenXTalkPaul
Posts: 2393
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Hunting for bugs in OXT 0.98 and above

Post by OpenXTalkPaul »

tperry2x wrote: Thu Jan 11, 2024 2:09 pm Community widgets (non com.livecode ones)
Any widgets not developed by Livecode may struggle to load in revidelibrary.8.livecodescript, because of this line:
revIDE.png
Can simply be commented out to allow widgets to load that don't include com.livecode in their name.

Fixed in v1.0 of OXT Lite
I may have patched that at some point? Or I may have left it since most of the modules use that identifier (and it helps me see, what's what and by whom)? I'll have to check. I've searched all of the IDE for instances of the 'livecode' many times, I still find a stray one lurking in a custom property or something like that now and again. But I'm not aware of ever having a problem loading widget or library modules with org.openxtalk.* or community.* What problems have you seen?

EDIT: I didn't patch that in my IDE files, I did now, but just added to what's there:

Code: Select all

   if not pObjectTypeID begins with "com.livecode" or not pObjectTypeID begins with "org.openxtalk" then return __revIDEError("No such object type ID: " && pTarget)
I really dislike how non-natural-language many of these scripts reads, but that's the hand we've been dealt.

Anyway, with that edit should enable having mix identifiers, the old com.livecode.. classic 'classic' controls AND new org.openxtalk 'classic' controls. For example we could have a 'classic' control called 'org.openxtalk.classic.GrayFillButton'. I had already added one like that, but I just named it 'com.livecode.interface.classic.FilledButton' (it was mostly an experiment in adding a 'classic' control).

So revIDECreateObject looks like it mostly applies to classic controls and datagrids, but if we were to add our own 'classic' controls then we might need some edits there. there is some bits about the mapkit widget only being available in macOS 10.9+ towards the end of that handler, we could take that out since that mapkit widget was one of their commercial edition things (although It might not be too difficult to build our own mapkit widget).
User avatar
OpenXTalkPaul
Posts: 2393
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Hunting for bugs in OXT 0.98 and above

Post by OpenXTalkPaul »

It sounds like you want to go for the eventual full renaming of the IDE reverse dns identifiers through out. Personally it seems like a lot of work, and I was only considering doing that if we made significant changes to one of those.

BUT if we are going there at all, we would need to make some more changes like the one you mentioned.

Here's another edit I just now made towards that end...
revcommonlibrary.livecodescript @ line 462:

Code: Select all

function revStackNameIsIDEStack pStackName
   if there is a stack pStackName and the _ideoverride of stack pStackName then
      return true
   else if pStackName is among the items of "message box,answer dialog,ask dialog,home" then
      return true
   else if pStackName begins with "com.livecode." or pStackName begins with "org.openxtalk." then
      return true
   else if pStackName is among the lines of revInternal__ListLoadedLibraries() then
      return true
   else if pStackName begins with "oxt" then
      return true
   else
      return pStackName begins with "rev"
   end if
end revStackNameIsIDEStack
User avatar
tperry2x
Posts: 2785
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Hunting for bugs in OXT 0.98 and above

Post by tperry2x »

Only in as much as one of the original goals I think we had set ourselves, were to remove all the livecode branding from the IDE. While this has largely been done, you just have to look at the filenames and the internal stack names to see that it was once a livecode product.

I'm aware that's a large task though as you rightly say, but I think if we are serious at making a go of this, it probably needs to happen at some point.

It may well initially break a few things as well, but I think it's still worth doing?
User avatar
richmond62
Posts: 4242
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Hunting for bugs in OXT 0.98 and above

Post by richmond62 »

Well, just as any Livecode files don't have a .mc suffix, nor should OXT ones have .rev, .livecode, or .lcb on their ends.
https://richmondmathewson.owlstown.net/
User avatar
OpenXTalkPaul
Posts: 2393
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Hunting for bugs in OXT 0.98 and above

Post by OpenXTalkPaul »

richmond62 wrote: Sat Feb 10, 2024 2:49 pm Well, just as any Livecode files don't have a .mc suffix, nor should OXT ones have .rev, .livecode, or .lcb on their ends.
LC can recognize and open .mc .rev .livecode .livecodescript, OXT already recognizes those and a few more.
I think it should still be able to recognize the former file extensions, but use our filename extensions when moving forward.

.lcb should probably have a corresponding .xb or .eb or .exb (EXtension Builder) too. .lc (for the php-like 'server' engine) should probably get a corresponding .xts (?)

I wasn't going to worry about any things not visible within the IDE like those filenames. After all, this WAS once a LiveCode/Community sponsored project (If it was our project from inception we would've made different choices). I don't see any point in pretending it wasn't, we just need to differntiate from their commercial product. Debranding, removing references their commercial externals and extensions, adding our own things like darkMode, playSentence support, etc. I think is enough. I've been using our own identifiers for anything newly added.
User avatar
OpenXTalkPaul
Posts: 2393
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Hunting for bugs in OXT 0.98 and above

Post by OpenXTalkPaul »

If we changed identifiers on built-in Extension Builder modules, EVERY extension would have to be recompiled with Extension Builder stack, because that's how it finds any dependent Extension modules (with the 'use' keyword). That alone is a lot. And would break compatibility with any existing extensions out in the wild (although I think there still isn't that many of those).
User avatar
OpenXTalkPaul
Posts: 2393
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Hunting for bugs in OXT 0.98 and above

Post by OpenXTalkPaul »

I wanted to mention this bug that has long been present (including in LC):
Using any of the IDE's image transforms (rotate, flip) on an Image Control that has animated GIF data, destroys all of the other frames of animation that were not currently visible. IIRC I've seen this bug-reported elsewhere, and the answer was something like 'these are just convenience image functions that only work in dev mode in the IDE' (so you don't need an image editor app I guess), but I think that's garbage. At the very least the IDE scripts could warn the user, that if they're trying to rotate or flip an animated GIF they're going to wreck their animated GIF if they do it in the IDE.
To check animated I guess that would be any image that has a frameCount property > 1
User avatar
tperry2x
Posts: 2785
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Hunting for bugs in OXT 0.98 and above

Post by tperry2x »

OpenXTalkPaul wrote: Wed Feb 28, 2024 2:47 am I wanted to mention this bug that has long been present (including in LC):
Using any of the IDE's image transforms (rotate, flip) on an Image Control that has animated GIF data, destroys all of the other frames of animation that were not currently visible. IIRC I've seen this bug-reported elsewhere, [...] At the very least the IDE scripts could warn the user, that if they're trying to rotate or flip an animated GIF they're going to wreck their animated GIF if they do it in the IDE.
To check animated I guess that would be any image that has a frameCount property > 1
Thanks for reporting this Paul. I've only just stumbled on it.
I've tested this and perhaps my solution is a bit of a harsh approach, I don't know.
disabled-flip-for-gif.png
disabled-flip-for-gif.png (244.64 KiB) Viewed 6440 times
If you have a gif image selected, then upon trying to select the 'flip' or 'rotate' options, they are now disabled.
This does stop someone wrecking their gif. Ideally, I'd like it to be able to flip / rotate the gif and keep the animation frames, rather than wrecking it though.
User avatar
richmond62
Posts: 4242
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Hunting for bugs in OXT 0.98 and above

Post by richmond62 »

Presumably your use-case refers to animated GIF images, as for static GIF images all one really needs to do is this sort of thing:

Code: Select all

import snapshot from img "myGIFimage.gif"
set the name of the last img to "xyz"
flip img "xyz" horizontal
Having fallen foul of "flipping" animated GIF images I have found the only really adequate (and tedious) way of dealing with them IFF you want to retain a flipped animated GIF is to open them up in GIMP, flip each frame, and then reassemble as a new GIF.

Frankly this has seemed like more trouble than it is worth; so tend to export GIF frames as PNG images which I can then use as backGroundPatterns for graphic rectangles . . .

(https://ezgif.com/split)

(or: https://onlinegiftools.com/flip-gif)

. . . AND, Yes, I know the repeatedly rehearsed objections to my method (heavy stacks, slower stacks), but as I no longer try to make animations for my BBC Master Compact (96 KB RAM), that doesn't not faze me much. 8-)

An animated GIF that weighed in at 209 KB, split by that online service I referred to above delivered the constituent frames as static GIF images at a collective weight of 228 KB: frankly not worth losing any sleep over that size increase, and, ultimately a lot easier to manipulate than fram-rates and so forth in animated GIF images.
-
icegif-380.gif
icegif-380.gif (203.94 KiB) Viewed 6426 times
Attachments
ezgif-1-26dd8d293e-gif-im.zip
Split frames
(225.78 KiB) Downloaded 153 times
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 2785
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Hunting for bugs in OXT 0.98 and above

Post by tperry2x »

richmond62 wrote: Sun Apr 07, 2024 10:30 am . . . AND, Yes, I know the repeatedly rehearsed objections to my method (heavy stacks, slower stacks), but as I no longer try to make animations for my BBC Master Compact (96 KB RAM), that doesn't not faze me much. 8-)
I think the only objections is that someone is going to open one of these stacks and think "Is that what OXT/OXT Lite is like - it's slow/sluggish (makes my fans on the computer come on). It can't be very efficient".

And when looking for a potential IDE and coding environment, something that seems sluggish and slow is a huge negative point in anyone's book.

Why not aim for efficiency in stacks where at all possible? Especially if those stacks are supposed to be showcasing what OXT is capable of.
richmond62 wrote: Sun Apr 07, 2024 10:30 am An animated GIF that weighed in at 209 KB, split by that online service I referred to above delivered the constituent frames as static GIF images at a collective weight of 228 KB: frankly not worth losing any sleep over that size increase, and, ultimately a lot easier to manipulate than fram-rates and so forth in animated GIF images.
-
icegif-380.gif
I'm not sure what those online services are embedding in their gifs, but they always come out huge compared to the same thing saved locally by an image-handling program you might have installed on your computer.
icegif-380-resaved.gif
icegif-380-resaved.gif (157.75 KiB) Viewed 6420 times
User avatar
richmond62
Posts: 4242
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Hunting for bugs in OXT 0.98 and above

Post by richmond62 »

an image-handling program you might have installed on your computer
Oh, I am quite sure you are correct: just was running back and forth between some cooking in the kitchen (downstairs) that needed attention every 10 minutes, a critical-thinking diagram for my wife's lectures at the Uni' tomorrow: she's a bloody good lecturer and thinker, but not all that good with making 'funny' diagrams on computers: especially using OXT Lite. ;)
-
diagram.png
diagram.png (294.55 KiB) Viewed 6416 times
-
The ONLY problem was that 7-pointed thing: I had to import an externally resourced SVG image.

So really CBA when it came to faffing around with GIMP.
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 2785
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Hunting for bugs in OXT 0.98 and above

Post by tperry2x »

Funny thing is, you could have done all that within oxt by setting the number of polygon sides.
User avatar
richmond62
Posts: 4242
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Hunting for bugs in OXT 0.98 and above

Post by richmond62 »

I did that whole thing in OXT except for the 7-pointed thingy. 8-)

Very easy indeed.
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 2785
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Hunting for bugs in OXT 0.98 and above

Post by tperry2x »

I could've sworn you could do a 7 pointed star in OXT. Must have been my imagination...
I mean, you can make it in inkscape and bring it in as an SVG...
star.png
star.png (8.77 KiB) Viewed 6413 times
star.oxtstack
(631 Bytes) Downloaded 169 times
So then of course, I'm wondering about a popup menu on the tools palette to show a variety of shapes, such as stars and such. Perhaps an assortment that you can pick from a popup menu, and just drag into the stack.
User avatar
tperry2x
Posts: 2785
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Hunting for bugs in OXT 0.98 and above

Post by tperry2x »

So, leading on from that - I also discovered another weird thing that needs fixing.
Oval graphic, with a 10px border. Nothing out of the ordinary...
a.png
a.png (57.97 KiB) Viewed 6466 times
However, then I rotate that graphic 90 degrees counterclockwise...
b.png
b.png (73.15 KiB) Viewed 6466 times
It converts the oval graphic to points, so now they are angular and no longer a circle: (side-by-side for comparison)
c.png
c.png (131.39 KiB) Viewed 6466 times
Why does that matter - and why would I want to rotate a circle?
d.png
d.png (64.37 KiB) Viewed 6466 times
Because you can set an arc and simulate a circular progress bar, but it's always facing the wrong way - so I thought I could simply rotate it, and then found this bug.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest