Beta release of Inform App for Linux

I have some hope that all of these problems were fixed by the same line of code.

Here is a link to another beta release.

Do make sure to uninstall the last beta release before installing this one, by the way.

I tested the deb build for this one on the same debian unstable system as the last one. I can test the flatpak later today if needed.

The basic stuff is fixed. I can open my old project (which I reverted back to its untouched state first, so the test is the same) and compile and run it.

Releasing still has the same “Error opening file /somewhere/project.inform/Build/StatusCblorb.html: No such file or directory”, but I’ve now isolated what that comes from a bit more. It’s nothing to do with a new vs old project, it appears as soon as there’s a “release along with a solution” in the source. Releasing along with cover art, a “Standard” website, the source text, or the “Quixe” interpreter is fine, just “a solution” breaks it, no idea if that’s i7 itself or the ide doing things wrong.

Opening something that’s not a project still crashes for me.

When playtesting my scene, the color scheme is a but unfortunate, I have dark deep blue on a dark gray background for my own input (flatpak).

This one’s actually a bug in Inblorb, and I’ve tracked down a solution. I assume it’ll be fixed in the official Inform 10.1.0.

I skipped over reading this the first time around. It’s fixed now. I don’t know if I’ll do another beta release before the real one, but in the real release you should be able to open as many non-Inform folders as you like and get an error message instead of a crash every time :smile:

Thanks!

1 Like

Unfortunately, this is a known bug and the theming system needs a bit of an overhaul before it can be fixed. There’s more info in Release candidate of Inform 7 IDE for GNOME - testing help wanted - #34 by ptomato

1 Like

on theming system, a minor but annoying bug is that the font size is correctly applied to the documentation pane, but not the source pane.

Best regards from Italy,
dott. Piergiorgio.

OK, same problem I’ve had before with gnome-inform7 is now happening with inform7-ide. After I’ve created a file with an apostrophe in the name, the code which saves recently opened files doesn’t escape the name properly, which means it crashes the next time I try to open a new project while looking up the “recent files” list.

Since there are multiple extensions in the Friends of I7 repo with apostrophes, most of them by me, this is quite problematic. I am thinking of removing the apostrophes.

What’s worse is I’m having trouble finding where the cache is hidden so I can nuke it.

Edit: Found it. It’s

~/.local/share/recently_used.xbel

Here’s the crash:

(inform7-ide:47771): GLib-GIO-ERROR **: 11:19:57.313: g_menu_item_set_detailed_action: Detailed action name 'app.open-recent(('file:///home/neroden/programming/inform-projects/Nathanael's%20Test%20Extension.i7x','inform7_extension'))' has invalid format: 61:expected ',' after first tuple element
Trace/breakpoint trap

This is with the .deb. I have absolutely no idea how to install flatpaks, I tried and gave up.

Frankly I am not dependent on the “recent files” list and I would be OK with as simplistic a solution as skipping over files with “problem filenames” when saving the recent files list, I just need it to stop crashing.

Closely related bug: Try “Open Extension” from the menu on one of the extensions with an apostrophe in the name. Instant crash. I think it’s very worthwhile to escape the apostrophes/single-quotes. I’ll see if I can find the relevant code in the git repo.

(I realized the IDE was picking up the setup from my previous attempted install, where, like a number of other people, I made the Extensions folder into a git checkout for the Friends of I7 extensions repo. Anyway, this will happen whenever there’s an extension with an apostrophe in the name.)

(inform7-ide:58555): GLib-GIO-ERROR **: 11:41:09.122: g_menu_item_set_detailed_action: Detailed action name 'app.open-recent(('file:///home/neroden/Inform/Extensions/Nathanael%20Nerode/Nathanael's%20Debug%20Tools.i7x','inform7_extension'))' has invalid format: 70:expected ',' after first tuple element

FWIW, the flatpak failure:

The application com.inform7.IDE depends on runtimes from:
  https://dl.flathub.org/repo/
Configure this as new remote 'flathub' [Y/n]: y
error: Remote "ide1-origin" not found

Update: Ok, I got the flatpak working with the magic incantations

flatpak install --user --bundle *.flatpak
flatpak run com.inform7.IDE

…and verified that the apostrophe crash occurs reliably with the flatpak too. So it’s not a flatpak-vs-deb issue. Even more fun, since the flatpak and deb version share reliance on recently-used.xbel, the breakage in one can prevent the other from launching.

It appears that the gtk_recent_manager_add_full does not accept the output of g_file_get_uri.

g_file_get_uri is doing its job according to specs, it appears. URIs can contain unescaped apostrophes. RFC 3986 - Uniform Resource Identifier (URI): Generic Syntax (RFC3986)

There is no particular specification for gtk_recent_manager_add_full, so it’s also legit for it to not accept apostrophes, it seems. :sigh:

The best thing to do is, I suspect, is – in the functions update_recent_story_file and update_recent_extension_file, possibly elsewhere – to take the URL output from g_file_get_url, then escape the apostrophes (replacing with %27), before passing ito into gtk_recent_manager_add_full.

Or it’s possible that a complete wrapper of g_file_get_url is the way to go. I know writing string handlers in C is a huge pain in the neck.

However, a crude hack which would stop the persistent crashing is simply to check the output from g_file_get_url to make sure it doesn’t contain an apostrophe and bail out if it does.

Update: I’m trying to write a wrapper which escapes the apostrophe.

OK, Much more substantial update. I’ve written a patch which escapes the apostrophes.

Fifth version – compiles with no warnings.
escape-apostrophes.diff.txt (5.3 KB)

I haven’t been able to test this.

Update: I’ve got Inform 7 building, but I haven’t figured out how to copy the pieces over to inform7-ide yet. I’ve got the meson build system up and running for inform7-ide, but I haven’t managed to figure out how to copy over all the correct files from Inform 7 itself, so I can’t actually get it building.

I managed to run the build system far enough to get it compiling and fixed some obvious bugs. So I would be ready to test it.

Unfortunately, then the build process crashes with:

[6/6] Linking target src/test-inform7
problem:  An internal error has occurred: Unable to open model CSS material for reading. The error was detected at line 332 of "/home/neroden/programming/inform-build/inweb/foundation-module/Chapter 5/HTML.w". This should never happen, and I am now halting in abject failure.
  What has happened here is that one of the checks Inform carries out internally, to see if it is working properly, has failed. There must be a bug in this copy of Inform. It may be worth checking whether you have the current, up-to-date version. If so, please report this problem via www.inform7.com/bugs. As for fixing your source text to avoid this bug, the last thing you changed is probably the cause, if there is a simple cause. Your source text might in fact be wrong, and the problem might be occurring because Inform has failed to find a good way to say so. But even if your source text looks correct, there are probably rephrasings which would achieve the same effect.

(inform7-ide:73179): Gtk-CRITICAL **: 01:42:00.578: gtk_tree_store_get_value: assertion 'VALID_ITER (iter, tree_store)' failed

(inform7-ide:73179): GLib-GObject-WARNING **: 01:42:00.578: ../../../gobject/gtype.c:4333: type id '0' is invalid

(inform7-ide:73179): GLib-GObject-WARNING **: 01:42:00.579: can't peek value table for type '<invalid>' which is not currently referenced
Segmentation fault

I’ve basically been blindly copying things over from the Inform 7 build to try to get the build process to get far enough to compile, so I really have no idea what is going on there.

Philip (ptomato), I would appreciate it if you could give this patch a spin. I think it should do the trick, though it is hard to tell without testing. The key is that even though the URI encoder we were using doesn’t encode apostrophes, the decoders always decode %27, so we don’t have to worry about that end of it.

I’m kind of proud of this one – I haven’t done low-level byte-at-a-time code in a while.

1 Like

Thanks for tracking down that the problem is that file URIs are allowed to have apostrophes. I think I started to look into this bug when you mentioned it last time, in order to report it to GTK, but fell flat at reproducing it. When I tried to make a minimal example, though, gtk_recent_manager_add_full seemed to accept apostrophes just fine. I tracked the bug down to something in my code after all, and have pushed a fix.

Sorry, I can’t make head nor tail of why the Inform compiler is being executed during the build process. I apologize for the lack of clear instructions on what to copy where. I’ve also pushed an update to inform7-ide/INSTALL.md at main · ptomato/inform7-ide · GitHub

1 Like

Oh, you were the one wrapping the names in single quotes! Your fix should do the trick.

The problem is visible in the file quite clearly: the line in the recently_used.xbel file looks sort of like

url=‘Nathanael’s File’

Then, when going to load the names of the recently used files, it reads the apostrophe as the closing quote delimiter and barfs because it can’t parse the rest of the file.

I was just assuming that the recent_manager was managing the recently_used.xbel file, but seems like you were putting the single-quoted strings in it. Thanks for fixing the problem!


Thanks for updating the build instructions… I’m still having some copy-over trouble. I see how to copy the retrospective directory, but it looks like I have to copy some stuff into “intools” too?

Aha, I may have figured it out – it looks like I have to cp ../inform7-ide/build-aux/make-integration-settings.mk .. before I can make forceintegration ?

With that, it launches after typing ./build-aux/run_uninstalled.sh, though all the images are missing and it can’t find the documentation. Also, Inform7 can’t find its kits. Good enough for testing the UI though, I guess.

Thanks again. I look forward to the next beta / release candidate. I’m hoping to actually start updating my extensions.

Under bash, there’s the backslash escape, e.g.

ls agatha\'s\ folly\ \(as\ example\ of\ escapism\)\ with\ \$\$\$

(who got the cite around the ’ ? :wink: )

of course, this breaks winsozz compatibility, for obvious (and pathetic) reasons, but we’re talking about Linux IDE, so I guess it’s a viable suggestion for a solution of this issue…

Best regards from Italy,
dott. Piergiorgio

1 Like

Apologies, I blanked on adding make-integration-settings.mk to the instructions. I’ve done so now. Sounds like your copy of Inform is plagued by an incomplete installation from one of the previous attempts? Maybe this could be solved by cleaning out inform7/intools and the Extensions, HTML, Inter, Languages, Miscellany, and Pipelines directories inside inform7-ide/data/ and re-running make forceintegration in Inform.

1 Like

This did the trick. Thanks again!

…or maybe it didn’t. The pictures and the documentation is now back, but every time I try to actually compile a game, I get:

/home/neroden/programming/inform-build/inform7-ide/_install/usr/local/libexec/inform7-ide/inform7 \
	-internal /home/neroden/programming/inform-build/inform7-ide/_install/usr/local/share/inform7-ide -format=Inform6/32d -project /home/neroden/programming/inform-projects/Secondary Scratchpad.inform
Inform 7 v10.1.0 has started.
inform7: fatal error: cannot find kit 'BasicInformKit'

Checking out the _install folder, I find

/home/programming/inform-build/inform7-ide/_install/usr/local/share/inform7-ide/Inter/BasicInformKit

Exists but there are no files in it.

Checking

/home/neroden/programming/inform-build/inform7-ide/data/Inter

I find the same problem: the directories for the kits are all there, but they’re empty.

Apparently they didn’t get installed / copied with make forceintegration ?

Update: I think I may have figured this out. make forceintegration was stating:

sh: 1: rsync: not found
sh: 1: rsync: not found
sh: 1: rsync: not found
sh: 1: rsync: not found
sh: 1: rsync: not found

After installing rsync, it seems to be copying over correctly.

Either the dependency on rsync should be documented or it should be eliminated. This appears to be an Inform 7 issue.

What distro you use ?

in my Debian system, rsync is installed by default.

Best regards from Italy,
dott. Piergiorgio.

I also use Debian. It’s perfectly trivial for me to install rsync, and I did. But on general security principles I tend to delete any package which is potentially network-exposed which I’m not using, so I had it uninstalled previously.

It isn’t required to be present under Linux Standard Base or POSIX or the Single Unix Specification; dependencies on rsync must be specified explicitly under Debian.

So, it’s all going pretty well but I managed to trigger a segfault in inform7-ide. I think I triggered the segfault by changing an extension file in the Extensions folder using an external editor while inform7-ide was running; I could be wrong, it might have been something else, but I suspect that was it.

I think I’ve pinned this bug down further.

I now think it has to do with renaming an extension file from “Tab Removal.i7x” to “Tab Removal-v2.i7x” while inform7-ide is already running and while a story which does Include Tab Removal by Nathanael Nerode is open and has been compiled once. Attempting to recompile the story gave me a hard freeze-up of the program this time (stopped with control-C at the command line where I’d launched the program).

This is an interesting issue created by Inform’s new ability to read extension files with version names in the title. I assume there’s some sort of stale cache issue.

…actually, I’m realizing there’s also a more general cache issue here. When extensions are edited and changed – my usual workflow, lots of extension editing – the newly-edited versions don’t show up in the index until I quit and restart. Is there a way to trigger a rebuild?