Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workspace crashes when opening Gemas.app from the file browser #407

Closed
jasaldivara opened this issue Jan 8, 2022 · 10 comments
Closed

Workspace crashes when opening Gemas.app from the file browser #407

jasaldivara opened this issue Jan 8, 2022 · 10 comments

Comments

@jasaldivara
Copy link

I installed NEXTSPACE on Fedora 35 on an ARM 64 computer (Pinebook Pro)

Then I downloaded the sources for Gemas.app 0.4 (And HighlighterKit) from http://download.savannah.nongnu.org/releases/gnustep-nonfsf/ Gemas.app is a great code editor for GNUstep. It's not a full IDE like Project Center, but just a lightweight code editor with syntax highlighting. Gemas.app depends on HighlighterKit.

After building and installing HiglitherKit and Gemas.app, I browse to /Applications on Workspace's File Viewer and double click on Gemas.app. Then, Workspace crashes. If i click 'restart' button on Workspace's crash dialog, I see Gemas.app icon running after Workspace gets restarted.

This crash happens even if Gemas.app is already running when I click on Gemas.app on the file viewer.

Workspace doesn't crash when I open Gemas.app by other means, like wiriting openapp Gemas.app on a terminal, or on Workspace's launcher tool (Alt + L). This crash is only present when opening Gemas.app from the file viewer.

Workspace also crashes when trying to open a source or text file with Gemas.app from the File Viewer.

@trunkmaster
Copy link
Owner

Have you installed NEXTSPACE with build scripts?

@jasaldivara
Copy link
Author

jasaldivara commented Jan 8, 2022

Yes. I installed it from these scripts:

# ~/nextspace/Packaging/RedHat/0.build_libraries.sh ~/nextspace
# ~/nextspace/Packaging/RedHat/1.build_frameworks.sh ~/nextspace
# ~/nextspace/Packaging/RedHat/2.build_applications.sh ~/nextspace

I had to do some minor changes, so it will build from my Fedora version. Also tried to get libobjc2 to get built from the latest commit from master, but maybe I did it wrong, because then I noticed it was overwritten/updated to libobjc2 from fedora repos in the installation process.

Diff from the changes I made to spec files:
fedora35-aarch64.txt

Other than this crash, NEXTSPACE seems to be working fine.

Also Gemas.app is working correctly: I can see and edit files with it.

@trunkmaster
Copy link
Owner

OK, I'll try to reproduce this issue. Although I don't have ARM hardware to test. I guess libobjc2 version shouldn't be a problem.
JFYI: Currently I'm in the middle of code cleanup and implementation of new notification system. It is possible that code in master is half-broken since I've switched to separate branch.

@trunkmaster
Copy link
Owner

I've found the cause of a crash (incorrect app image path). I'll fix this right after I complete new notifications.
BTW, I've switched to Fedora 35 as development environment since CentOS 8 is EOL. So wait also for spec fixes: CentOS 7 and Fedora will be supported without CentOS 8.

@trunkmaster trunkmaster added the bug label Jan 9, 2022
@rmottola
Copy link

As additional info: I tried to reproduce the described steps in standard GWorkspace, with Gemas.
I tried: Starting Gemas with double-click, but also selecting a file and using inspector's instruments and selecting or right-click "open with"; both Gemas runnign and not. I cannot reproduce a crash.

@trunkmaster
Copy link
Owner

trunkmaster commented Jan 14, 2022

@rmottola, glad to see you here. As I said before, I know what line of code caused crash. I'm about to merge main and notification branches.

trunkmaster added a commit that referenced this issue Jan 17, 2022
  (openFile:fromImage:at:inView:): use pathForImageResource: to get
  app icon path. Fixes cases when "NSIcon" value in Info-gnustep.plist
  doesn't contain image file extension. Fixes issue #407.
@trunkmaster
Copy link
Owner

@jasaldivara the bug is fixed now. Check it out, please.

@jasaldivara
Copy link
Author

jasaldivara commented Jan 21, 2022

I rebuilt and reinstalled Workspace from the latest commit from master branch. I can confirm Workspace no longer crashes when I double click Gemas on the Applications directory.

But Workspace still crashes when I do a double-click on a source file (like an Objective-C file with .h or .m extension) when Gemas is set as the default application for files with that extension on the tools inspector.

If I set the default application of .m files to ProjectCenter, then I see an animation of an icon moving from the file viewer to the dock, and the file is opened on ProjectCenter without Workspace crashing.

So I think this is not completely fixed.

trunkmaster added a commit that referenced this issue Jan 23, 2022
…:at:inView:):

  Fixed app icon path detection when opening file with associated applicaion.
  Fixes issue #407.
@trunkmaster
Copy link
Owner

Fixed again for described case. Thanks.

@jasaldivara
Copy link
Author

I can confirm Workspace does not longer crash when double clicking on a file to be opened with Gemas. And also now I see a nice animation of an icon flying from the file viewer to the Gemas icon on the dock.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

3 participants