leezer3 / OpenBVE

OpenBVE- A free train simulator
http://www.openbve-project.net
280 stars 52 forks source link

M1 Mac, can't install packages? #848

Open susokie opened 1 year ago

susokie commented 1 year ago

It's either I can't or I don't know how to. [https://imgur.com/a/yu4Z90z](Link to image of what I'm seeing in the app) It's a really weird UI. Not sure if it's supposed to be like that but idk it sort of works. Do you have any idea what to do here? I can't drag the file into the app. What do I do?

EDIT: I figured out how to get to the file and install it but the app just keeps crashing every time I try to do it.

leezer3 commented 1 year ago

Drag + drop is definitely not supported.

I also don't have access to a M1 Mac, which makes troubleshooting a little challenging. Do you have any crash reports?

Packages however are just ZIP files with some metadata added, so you can just extract them with your preferred archive tool if necessary :)

leezer3 commented 1 year ago

https://vps.bvecornwall.co.uk/OpenBVE/Builds/OpenBVE-2023-01-02.dmg

This build adds experimental drag + drop support when Install Package has been selected, and may fix the crash issues, Please let me know if this helps.

susokie commented 1 year ago

https://vps.bvecornwall.co.uk/OpenBVE/Builds/OpenBVE-2023-01-02.dmg

This build adds experimental drag + drop support when Install Package has been selected, and may fix the crash issues, Please let me know if this helps.

Thanks for reaching out again. I just tried the build and it seems the drag and drop works. However the crashing issue is still occurring every time selecting the file normally through openbve and dragging and dropping.

leezer3 commented 1 year ago

Do you get any sort of a crash report from Apple? It definitely works on Windows, and I tested on an Intel Mac when this was first implemented.

If you do, please copy and paste the text from it here.

Some other thoughts / thinking-

susokie commented 1 year ago

Do you get any sort of a crash report from Apple? It definitely works on Windows, and I tested on an Intel Mac when this was first implemented.

If you do, please copy and paste the text from it here.

Some other thoughts / thinking-

  • Are you running direct from the DMG? Please try from the apps folder if so, as we need to store data.
  • Have you set Gatekeeper to allow apps from anywhere with the terminal setting, or do you need to right-click every time? (Can't remember if there is a difference....)

I do not get a crash report from apple unfortunately.

"Are you running direct from the DMG? Please try from the apps folder if so, as we need to store data." I'm not too sure what you meant by this but I did put openbve as an application if that's what you meant.

"Have you set Gatekeeper to allow apps from anywhere with the terminal setting, or do you need to right-click every time?" Yep, gatekeeper is on allow all

I noticed that very rarely openbve does not crash when choosing the file. I choose the file and it just infinitely loads which I'm not too sure what is loading, maybe it's trying to detect what file I chose because on it, it says this "No package selected" while loading which I'm pretty sure is supposed to change. This is before clicking the install button. I've never managed to get to click the install button

I'm also on MacOS ventura if that matters

Kenny-Hui commented 1 year ago

You can access the log by going into OpenBVE's config folder (Open Finder, Click "Go" on the top, then click "Go to Folder", then type ~/.config/OpenBve)

Inside the folder, go to "Settings" folder, if it crashes you will see text file named OpenBVE Crash-2023-xx-xx. If you see it, send the latest one here (The date is in the file name). If not, send log.txt.

Side note, unrelevant to your issue: Installing packages (as in clicking the install button) via the GL menu would freeze up the program, both on macOS Ventura and Mint 21.1. Probably stuck in a loop somewhere, the package however do get installed and registered properly. image

susokie commented 1 year ago

Do you get any sort of a crash report from Apple? It definitely works on Windows, and I tested on an Intel Mac when this was first implemented.

If you do, please copy and paste the text from it here.

Some other thoughts / thinking-

  • Are you running direct from the DMG? Please try from the apps folder if so, as we need to store data.
  • Have you set Gatekeeper to allow apps from anywhere with the terminal setting, or do you need to right-click every time? (Can't remember if there is a difference....)

Found some crash logs thanks to Kenny Hui but a lot of the crash logs are missing. I've went through the crashing process about 30 times and only shows 5.

The current routefile caused the following exception: System.NullReferenceException: Object reference not set to an instance of an object. at OpenBve.MainLoop.keyDownEvent (System.Object sender, OpenTK.Input.KeyboardKeyEventArgs e) [0x00202] in <0c27f1c2847542e09f12673b2148f1f3>:0 at (wrapper delegate-invoke) System.EventHandler1[OpenTK.Input.KeyboardKeyEventArgs].invoke_void_object_TEventArgs(object,OpenTK.Input.KeyboardKeyEventArgs) at OpenTK.NativeWindow.OnKeyDown (OpenTK.Input.KeyboardKeyEventArgs e) [0x00000] in <13d03852c6254f51840d199e801a688e>:0 at OpenTK.NativeWindow.OnKeyDownInternal (System.Object sender, OpenTK.Input.KeyboardKeyEventArgs e) [0x00000] in <13d03852c6254f51840d199e801a688e>:0 at (wrapper delegate-invoke) System.EventHandler1[OpenTK.Input.KeyboardKeyEventArgs].invoke_void_object_TEventArgs(object,OpenTK.Input.KeyboardKeyEventArgs) at OpenTK.Platform.NativeWindowBase.OnKeyDown (OpenTK.Input.Key key, System.Boolean repeat) [0x0002e] in <13d03852c6254f51840d199e801a688e>:0 at OpenTK.Platform.MacOS.CocoaNativeWindow.ProcessEvents () [0x000d7] in <13d03852c6254f51840d199e801a688e>:0 at OpenTK.NativeWindow.ProcessEvents (System.Boolean retainEvents) [0x00035] in <13d03852c6254f51840d199e801a688e>:0 at OpenTK.NativeWindow.ProcessEvents () [0x00000] in <13d03852c6254f51840d199e801a688e>:0 at OpenTK.GameWindow.Run (System.Double updates_per_second, System.Double frames_per_second) [0x000da] in <13d03852c6254f51840d199e801a688e>:0 at OpenTK.GameWindow.Run () [0x00000] in <13d03852c6254f51840d199e801a688e>:0 at OpenBve.MainLoop.StartLoopEx (OpenBve.LaunchParameters result) [0x0020b] in <0c27f1c2847542e09f12673b2148f1f3>:0 at OpenBve.Program.Main (System.String[] args) [0x0060e] in <0c27f1c2847542e09f12673b2148f1f3>:0 at System.Environment.get_StackTrace () [0x00000] in :0 at OpenBve.Program.Main (System.String[] args) [0x00000] in <0c27f1c2847542e09f12673b2148f1f3>:0 Current program memory usage: 153.74mb System memory free: 0mb

leezer3 commented 1 year ago

That I think was fixed in the build I linked above.

It sounds to me like it's something the Rosetta translation layer doesn't like if it's not creating a crash log. Testing on an Intel Mac this week is on the list of things to try and do, but if I can't reproduce this there I'm basically stuck.

susokie commented 1 year ago

That I think was fixed in the build I linked above.

It sounds to me like it's something the Rosetta translation layer doesn't like if it's not creating a crash log. Testing on an Intel Mac this week is on the list of things to try and do, but if I can't reproduce this there I'm basically stuck.

No worries, I really appreciate your effort