Ksp ошибка unity

2 hours ago, TheWilson45 said:

Hello everyone, I have an error for Kerbal Space Program which is that my un-modded install crashes on startup. I receive the error code of — Unity2019.2.2f1_ab112815d860. My specs are: i7 6700, gtx 1070, 16gm ram, and windows 10 version 1903 (Os Build 18362.778). Any suggestions will help. I looked around a thread from a few years back, but it got no where. Thanks!

I am getting the exact same thing on launch. Plain vanilla Steam download without any additional mods installed.

My specs are: AMD A8-3850, Radeon 6550hd graphics, 6gb RAM, Windows 10 64-bit

Any help would be gratefully received — my son is really looking forward to playing this!

When working with ksp/unity3d binaries, there can be several problems that arise. Here are some common ones and their solutions:

Error message: “Unable to find the requested .Net Framework Data Provider. It may not be installed.”

This error message can occur when trying to use a database with ksp/unity3d binaries. It means that the required .Net Framework Data Provider is not installed on your system. To solve this problem, you need to install the necessary .Net Framework Data Provider. Here is an example of how to install the SQLite Data Provider:

cd /path/to/project
dotnet add package System.Data.SQLite.Core

Error message: “The type or namespace name ‘SomeClass’ could not be found.”

This error message can occur when trying to use a class that is not included in your project. To solve this problem, you need to include the necessary class in your project. Here is an example of how to include the `Newtonsoft.Json` class:

cd /path/to/project
dotnet add package Newtonsoft.Json

Error message: “The type ‘System.Object’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘System.Runtime…”

This error message can occur when trying to use a class that is not included in your project. It means that the required assembly is not referenced in your project. To solve this problem, you need to add a reference to the required assembly. Here is an example of how to add a reference to the `System.Runtime.Serialization` assembly:

cd /path/to/project
dotnet add reference /path/to/System.Runtime.Serialization.dll

Error message: “The specified framework ‘Microsoft.NETCore.App’, version ‘2.1.0’ was not found.”

This error message can occur when trying to use a framework that is not installed on your system. To solve this problem, you need to install the necessary framework. Here is an example of how to install the .NET Core 2.1 framework:

sudo apt-get install dotnet-sdk-2.1

These are some of the common problems that can arise when trying to use ksp/unity3d binaries. By following these solutions, you can overcome these problems and successfully use ksp/unity3d binaries in your project.


Go to KerbalSpaceProgram


r/KerbalSpaceProgram


r/KerbalSpaceProgram

The Kerbal Space Program subreddit. For all your gaming related, space exploration needs.

http://kerbalspaceprogram.com




Members





Online



by

GoGravyNavy



KSP Unity Crash


Question

Hey — I recently bought KSP and I play it for about 5 minutes and it crashes out of nowhere with a popup saying «Unity Crash 2019»

Any fix?

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

Closed

Dunbaratu opened this issue

Jul 29, 2014

· 34 comments


· Fixed by #227

Comments

@Dunbaratu

(This bug was found after some back and forth posts with a user on the forums performing some debug tests for me. I do not have a Linux platform to test this on myself.)

The correct ascii character for the carriage return, or «control-M» or «RETURN KEY» is 0x0d. This means that when padded out into a 16 bit unicode character, it is supposed to be 0x000d. This is not supposed to be OS-dependant. That IS the return character in ascii and unicode cross-platform standards.

But the Linux build of Unity that KSP is using has a bug in regards to this. It is returning a unicode character of 0xff0d for RETURN instead of the correct 0x000d. Unity on Windows returns 0x000d as expected. (I haven’t tested on mac).

This bug makes kOS fail to detect the RETURN key properly in the terminal window, thus rendering the entire kOS mod utterly useless to Linux users since without RETURN, you can’t execute any command, not even run a program. (That’s why I’d classify this as a serious severity bug. It’s one very tiny thing that’s blocking an entire platform.)

Similar behavior seems to be happening for other control-characters like tab, which should be 0x0008 but is coming out as 0xff08 on Linux. The problem seems to be that Unity on Linux is padding out the keypress’s unicode character high byte with 1 bits instead of 0 bits in the case of control characters. (Oddly, the printable ascii characters, like «A», are being padded correctly with zeros.)

Because KSP is unlikely to release a public patch just to update the Unity engine underneath, even if Unity itself fixes the bug we’ll still be stuck with it for several months until the next KSP update at least, so we’ll need to implement a workaround now if we want to have any Linux users.

(Yes, I know the usual argument about how small a sliver of the marketplace Linux constitutes «so let’s not write special code to support it», but lets not forget that the filter «people who are interested in kOS» tends to select in favor of the more technical end of the userbase, making the Linux sliver of the pie a bit larger than it would be in a normal random sampling of users.)

@ddproxy

I noticed this on my Linux machine but it has not presented a problem yet (
too little time to play = no kos parts in tech tree ).

I’d be able to test patches if you guys get around to working on this.

—edited email stub —

@Dunbaratu

@ddproxy

Fixes it in the Terminal only.

I was looking directly in the TextEditor.cs trying my best (I found MonoDevelop :)

case 36:  // Linux enter
    NewLine();
    break;

But I realize now I was in the wrong place. I should point out that additional issues lie in the Text Editor.

asdw keys pass directly through the editor to manipulate the ship. I figure there are additional keys that are not being caught by the editor.

@Dunbaratu

Ah, I didn’t realize the problem existed in the text editor as well.

By the way, this is going to confuse the heck out of you, the file TextEditor.cs actually has nothing to do with the current Text editor in kOS. In the old days when the Text Editor was inside the Terminal window, there was the text editor class for all terminal manipulations the text editor does, and then a subset of the text editor class was used by the interpreter (for stuff like editing the current command line with backarrow).

When I added the new popup Text Editor, I had to leave the old TextEditor.cs file in place because the interactive prompt interpreter is still a subclass of it even if the fullscreen file text editor is disabled.

The new popup text editor widget is actually controlled by the file KOSTextEditPopup.cs

I wish I could work out what the problem is. What’s really annoying is that the text editor widget is processing the WASD keys itself. The kOS code isn’t doing a darn thing with that — it’s a Unity built-in GUI textarea widget that we’re calling out to and it’s supposed to be doing all that work itself.

@ddproxy

Well, that explains why it’s looking at keycodes by integer instead of the objects.

It’s rather irritating that the Unity text area doesn’t catch properly.

@ddproxy

@Dunbaratu — Mind throwing a snippit of code and method location my way for the terminal fix? I’m messing with Unitys’ TextArea a bit but I never caught how to actually fix the terminal’s return key.

BTW, the return key is broken across the rest of KSP as well, so I figure it may be caught reported by a number of linux users.

@Dunbaratu

Hmm. I suppose I could commit the change and upload it just to my fork without making a pull request for it yet.
Here: https://github.com/Dunbaratu/KOS-1/compare/Dunbaratu:develop…test-linux-keyboard?expand=1

Please ignore all the diffs in the Docs/ directory — those are bogus diffs because of some files I didn’t update on my side from the master. Just look at the diffs in the src/ directory only.

I’m off to bed now so I’ll be out of contact until tomorrow. Good luck.

@kellpossible

I’m pretty sure I’ve also experienced similar problems with typing values into MechJeb before on linux. What a pain to discover that typing words and text in a text area of mechjeb still affects the underlying game depending on which keys you press! Still haven’t gotten around to trying kOS again, but will try out your dll patch when I get the chance.

@pjf

Huh. I play exclusively under Linux, and don’t remember having any problems pressing enter in the console and having things work. I’ve never seen a kOS editor window, but I just assumed one developed on the mission control mainframe (volume 0, with git and vim) and copied over to the probe cores as appropriate, right?

As for Linux being a small segment, I’ve seen lots of discussions of people installing ubuntu just so they can play a 64-bit KSP. :)

@pjf

Mind you, I am running a community patched version of the 0.23.5 binary, so it might be that unwittingly applied a fix from one of the linux threads and didn’t realise it.

@erendrake

@pjf now that @Dunbaratu and i are back in the saddle after 0.24. would you mind linking to the community fix versions so we can get the mainline version back up to speed?

@Dunbaratu

If anyone with a linux install, and the ability to compile and edit the C# code, is willing to try solving the problem further, please do so. I’ve sort of reached the end of what I can try myself because of not having my own Linux install to play with. I’m probably going to be getting back into Linux again in a few months but not until I get a new computer which is an expense I’m not in a position to justify at the moment.

As to Linux being a small segment, I was an avid Linux user since about Slackware 1.2, so I do get the frustration with the frequent statement, «there’s no reason for our product to support Linux because it’s not common», a statement which of course is the very reason Linux is not common, so it’s a bit of an unfair situation of a social recursive effect without a base case (i.e. a self-fulfilling prophecy).

I quit a job back in the late ’90s at a company over this very issue, as I was getting tired of the decisions from on high to take our product (an inventory control and work allocation system for massive warehouse distribution centers used by companies like UPS and Home Depot) off of flagging proprietary UNIXes like Solaris, HPUX, and AIX, and onto Windows NT, when Linux was right there! as a perfectly easy, very cheap replacement platform to migrate to and still leave most of our code untouched because our code was written for UNIX. I was partly annoyed because I liked Linux, but even more annoyed because it showed that the suits running the company were more willing to believe sales pitches from outside companies than to believe the advice of their own technical expert employees. It was a slap of disrespect in the face of all the software engineers and sysadmin experts who actually designed and created the product the company’s existence depended upon.

So yeah, I get it about Linux. It matters, and I like it. I’m just not currently in a position where I can test on it, and won’t be for several more months, and the bug reports I’m getting from different people on this are so contradictory that I really need to see with my own eyes what’s happening if I want to try to fix it.

That’s why I’m saying if any of the people who can run the linux version are willing to donate some developer time to looking at the issue, I’d really, really, appreciate it. If you can run Google Hangouts with Screenshare, we might even be able to arrange times to work as a pair together on it if you don’t want to deal with setting up a C# development environment — I could try editing the code to insert diagnostic patches, then have you run them while I watch through Screenshare and we talk about what’s happening and cycle back and forth a few times this way until we learn more about what’s going on.

@ddproxy

I completely understand the issues related to Linux adoption, I’ve left a
company recently for similar issues but more along the lines of NOT wanting
to spend ANY money on necessary upgrades.

I have not worked in mono, ever til last night. But I have done some C# in
the last few years. The very reason I’ve become involved in kOS and other
KSP projects is to have a more stable support ‘group’ to get back into
working with C#.

So, I’m game. I run Ubuntu LXDE (hate Unity) with and without wine
available.

I’ve already gotten my hands dirty playing with the interpreter and text
editor (merging the objects to see if I can make it work). As soon as I get
time, I’ll be taking a look at the Unity text area to hook into the utility
parser created to fix the return problem.
On Jul 29, 2014 12:13 PM, «Steven Mading» notifications@github.com wrote:

If anyone with a linux install, and the ability to compile and edit the C#
code, is willing to try solving the problem further, please do so. I’ve
sort of reached the end of what I can try myself because of not having my
own Linux install to play with. I’m probably going to be getting back into
Linux again in a few months but not until I get a new computer which is an
expense I’m not in a position to justify at the moment.

As to Linux being a small segment, I was an avid Linux user since about
Slackware 1.2, so I do get the frustration with the frequent statement,
«there’s no reason for our product to support Linux because it’s not
common», a statement which of course is the very reason Linux is not
common, so it’s a bit of an unfair situation of a social recursive effect
without a base case (i.e. a self-fulfilling prophecy).

I quit a job back in the late ’90s at a company over this very issue, as I
was getting tired of the decisions from on high to take our product (an
inventory control and work allocation system for massive warehouse
distribution centers used by companies like UPS and Home Depot) off of
flagging proprietary UNIXes like Solaris, HPUX, and AIX, and onto Windows
NT, when Linux was right there! as a perfectly easy, very cheap
replacement platform to migrate to and still leave most of our code
untouched because our code was written for UNIX. I was partly annoyed
because I liked Linux, but even more annoyed because it showed that the
suits running the company were more willing to believe sales pitches from
outside companies than to believe the advice of their own technical expert
employees. It was a slap of disrespect in the face of all the software
engineers and sysadmin experts who actually designed and created the
product the company’s existence depended upon.

So yeah, I get it about Linux. It matters, and I like it. I’m just not
currently in a position where I can test on it, and won’t be for
several more months, and the bug reports I’m getting from different people
on this are so contradictory that I really need to see with my own eyes
what’s happening if I want to try to fix it.

That’s why I’m saying if any of the people who can run the linux
version are willing to donate some developer time to looking at the issue,
I’d really, really, appreciate it. If you can run Google Hangouts with
Screenshare, we might even be able to arrange times to work as a pair
together on it if you don’t want to deal with setting up a C# development
environment — I could try editing the code to insert diagnostic patches,
then have you run them while I watch through Screenshare and we talk about
what’s happening and cycle back and forth a few times this way until we
learn more about what’s going on.


Reply to this email directly or view it on GitHub
#206 (comment).

@Dunbaratu

I’m glad to hear you’re looking into it!

(When you said you «hate Unity» — did you mean the Ubuntu window manager «Unity», or the «Unity» we’ve been talking about here? This clash of terms made google searching on this problem yesterday a pain, by the way. Normally, google searching for problems in Unity is easy — until you add the word «linux» to the search terms — then all you see are posts about Ubuntu’s window manager called «Unity».)

As a piece of advice about the issue with the popup text editor widget — from what people are saying about it I’m leaning toward thinking it’s a difference in the «input stacking order» (I don’t know what the correct term for it is in Unity). Whenever a GUI event-driven system like Unity gets mouseclicks, keypresses, or other events, it sends them around to all the potential candidate objects that might be interested in responding to them. Each object can either ignore the event, process it and NOT consume it, or process it AND consume it. If it does consume it, that means the search stops and no other objects will get the event. Thus the stacking order of window widgets is supposed to be the same order as the order in which an event is sent to the widgets for processing — try the topmost widget first, then the next widget under it, and so on.

What seems to be happening in the Linux Unity version is that the input stacking order is wrong such that KSP’s main flight controls (the «background») are getting «first crack» at the WASD keys and consuming them before the textarea widget is getting to see them. It should be the other way around and the textarea should get to see them first before the flight controls do, which is what’s happening on the Windows version.

So that’s where I’d suggest you look for the problem — see if there might be some way to fix or override the input stacking order to force the textarea widget to come first in the input event processing.

@ddproxy

Unity UI for ubuntu. Hate it.

I was going to extend the Unity GUI text area to define a method and
listener to keypresses while the text area was ‘active’/clicked into. I’m
very likely using the wrong terminology for what I really mean, I’ve been
working with MVC Java script way too much lately.

The input stacking would be a much more elegant solution though. Definitely
going to look I to that first.
On Jul 29, 2014 1:50 PM, «Steven Mading» notifications@github.com wrote:

I’m glad to hear you’re looking into it!

(When you said you «hate Unity» — did you mean the Ubuntu window manager
«Unity», or the «Unity» we’ve been talking about here? This clash of terms
made google searching on this problem yesterday a pain, by the way.
Searching for bugs in Unity works just fine until you add the word «linux»
to the search terms. If the term «linux» and the term «unity» appear
anywhere in the search terms, you get a flood of links about the window
manager Unity instead of the Unity we’re talking about. Adding extra terms
like «textarea» and «focus» and «keycode» and so on don’t help
differentiate it, as those are all going to be terms appearing in Unity
issues too.)

As a piece of advice about the issue with the popup text editor widget —
from what people are saying about it I’m leaning toward thinking it’s a
difference in the «input stacking order» (I don’t know what the correct
term for it is in Unity). Whenever a GUI event-driven system like Unity
gets mouseclicks, keypresses, or other events, it sends them around to all
the potential candidate objects that might be interested in responding to
them. Each object can either ignore the event, process it and NOT consume
it, or process it AND consume it. If it does consume it, that means the
search stops and no other objects will get the event. Thus the stacking
order of window widgets is supposed to be the same order as the order in
which an event is sent to the widgets for processing — try the topmost
widget first, then the next widget under it, and so on.

What seems to be happening in the Linux Unity version is that the input
stacking order is wrong such that KSP’s main flight controls (the
«background») are getting «first crack» at the WASD keys and consuming them
before the textarea widget is getting to see them. It should be the other
way around and the textarea should get to see them first before the flight
controls do, which is what’s happening on the Windows version.

So that’s where I’d suggest you look for the problem — see if there might
be some way to fix or override the input stacking order to force the
textarea widget to come first in the input event processing.


Reply to this email directly or view it on GitHub
#206 (comment).

@pjf

@erendrake

@NoPanShabuShabu

Just out of curiosity I Googled some questions about this and the only places I could find stuff like this mentioned is in X11’s keysym definitions (like keyboard keycodes.) For all the ASCII/Unicode charaters from 0x20 — 0x7e they are the same (these would be all the printable characters in ASCII.)

But the lower characters show this 0xff business:
keysym unicode value
0xff08 0x0008 # BackSpace
0xff09 0x0009 # Tab
0xff0a 0x000a # Linefeed
0xff0b 0x000b # Clear
0xff0d 0x000d # Return
0xff13 0x0013 # Pause
0xff14 0x0014 # Scroll_Lock
0xff15 0x0015 # Sys_Req
0xff1b 0x001b # Escape

Also, there are these which I suppose are the keypad, so does this behavior also hold true for these keys?
keysym unicode value
0xff80 0x0020 # KP_Space
0xff89 0x0009 # KP_Tab
0xff8d 0x000d # KP_Enter
0xffaa 0x002a # KP_Multiply
0xffab 0x002b # KP_Add
0xffac 0x002c # KP_Separator
0xffad 0x002d # KP_Subtract
0xffae 0x002e # KP_Decimal
0xffaf 0x002f # KP_Divide
0xffb0 0x0030 # KP_0
0xffb1 0x0031 # KP_1
0xffb2 0x0032 # KP_2
0xffb3 0x0033 # KP_3
0xffb4 0x0034 # KP_4
0xffb5 0x0035 # KP_5
0xffb6 0x0036 # KP_6
0xffb7 0x0037 # KP_7
0xffb8 0x0038 # KP_8
0xffb9 0x0039 # KP_9
0xffbd 0x003d # KP_Equal

I’m think that maybe what where seeing returned here isn’t the unicode value but the keysym value, which would look the same for the printable English characters.

@Dunbaratu

The values X11 lists for the keysym are correct.
The values X11 lists for the unicode are correct.
The error seems to be that it’s returning the keysym in a context where it’s supposed to be returning the unicode.

The Unity function call being made by kOS is Event.current.character, which the Unity docs claim will return the unicode of the character regardless of the key pressed (in other words, lets say you press keypad ‘3’. Event.current.character is supposed to return the same thing for keypad 3 as for typewriter key 3 — it doesn’t care exactly which key was hit — only what the resulting character is.)

At any rate, the fix I made to my experimental version corrects this (if the unicode is 0xffNN, where NN is anything, then transform it into 0x00NN, because there’s no way anyone would have a keyboard that actually types any of the unicode 0xffNN characters. They’re very weird and specialized.) The only reason it wasn’t made into a pull request is that other linux problems were found with the program editor popup that people had reported as still broken.

I’d prefer it if the text editor popup problems were made into a separate issue, so that this issue can be resolved and fixed independently of the text editor problem.

@NoPanShabuShabu

That method will work for the under 0x20 ASCII characters, but if it’s also returning the keysym values for those keypad entries too, those would get changed to something wrong. So, does that happen now? And if it does, do you want kOS to handle those properly? Just stripping out the 0xff from the front will make some of them return some other «high ASCII» character. Would it not be better to just re-map a selection of the ones you know you want to capture?

@Dunbaratu

What would be better would be for Unity to fix their damn system!

It looks as if any solution that uses Event.current.character simply cannot be correct no matter what. If you map too many characters under the assumption that they’re wrong on one system, you start getting the problem that it makes right characters to wrong ones on other systems.

It may be that the only solution that works is to utterly ignore Event.current.character since Unity refuses to implement it correctly, and instead always look at the keysym (regardless of whether it’s on Linux or not) and map it ourselves.

@NoPanShabuShabu

And until Unity fixes their system, you’re going to have to work around it, and since you are working with Unity, you will have to use it’s framework. In my opinion, the solution should only re-map keys which you know are coming back wrong and which are ones that you need to handle. That’s all I’m trying to say here.

@Dunbaratu

The problem with that is that I can’t know they’re coming back wrong unless I have the environment in question to test on. (And I’d prefer to make the solution as universal as possible. If the keysym is right across all platforms, and the unicode is wrong on some platforms, then it makes sense to use the keysym instead of writing special case exceptions into the code.)

@NoPanShabuShabu

I understand about the testing trouble and how that would be frustrating, but I think you should think along the lines of «What does kOS need to function properly?» and «What would be the possible undesirable side effects?»

Second question first: Some unicode characters in the 0xffXX range will be incorrectly thought to be something else. Well, those can’t be displayed or used by kOS in any way at all since they aren’t part of the scripting language. In fact, just changing to 0x00XX shouldn’t have any impact on a kOS user at all. The only argument against that is that it doesn’t handle the keypad characters properly.

So, let’s think about what we’d need to cover.

Let’s start with those first 8 which are under 0x20:
I doubt you’d need such things as Sys_Req or Scroll_lock for example, so you could leave those alone. But, since the likelihood of those unicode values actually legitimately being returned and being usable by kOS, is infinitesimal, you could include those 8, or even all of 0x00 to 0x1f.

Now consider the Keypad keys:
It turns out that these are in fact not being returned correctly. I tried this out on an Ubuntu install I have, x64. I couldn’t see what values it was actually returning, but could definitely see that it was just producing what looked like spaces, so I’m pretty sure it was returning those keysym values just like the Return key. So, even though I’ve never seen a keypad with a Space or Tab, include those 20.

So, you could do something as simple as 28 (or fewer if you decide you would never want to use something like Scroll_lock) case statements where you precisely control the mapping like: case 0xff0d return 0x000d, or even return KeyCode.Return.

Or you could do it as a few ranges like:
if between 0xff08 and 0xff1b subtract 0xff00
if between 0xff89 and 0xffbd subtract 0xff80
if equals 0xff80 subtract 0xff60, or return 0x0020 or Space.

The case statements only change keys you want to, and you can choose exactly what you want to return. The ranges are simpler, but do wind up including some other highly unlikely characters.

I don’t think there would be any measurable effect on Windows, on Linux it should (hopefully) make it work at least the same as Windows, and who knows about Mac (at worst it should be the same as Windows, at best it might fix something.)

@Dunbaratu

Well, if you could implement a lookup table like so based on your being able to test on linux where I can’t, then I could include it in the fix. If you provide me something formatted like so:

Unicode               |  Correct Unicode
That Unity returns  |  It should be
on Linux            |  returning
====================|=====================
0xff00              |  0x0000
0xff01              |  0x0001
0xff02              |  0x0002
0xff03              |  0x0003
0xff04              |  0x0004
0xff05              |  0x0005
0xff06              |  0x0006
0xff07              |  0x0007
0xff08              |  0x0008
0xff09              |  0x0009
0xff0a              |  0x000a
0xff0b              |  0x000b
0xff0c              |  0x000c
0xff0d              |  0x000d
0xff0e              |  0x000e
0xff0f              |  0x000f
0xff10              |  0x0010
0xff11              |  0x0011
.... etc ....

then I could just use that and do a dumb lookup replacement using the table. That way there’s no logic, no thinking — just a crude table lookup.

Note, you don’t have to mention every unicode char — just the ones that come out wrong. If Unity is giving the right unicode (i.e. like it does for the alphabet characters), then leave that out of the table. The algorithm I’d use is «if it’s in the table, map it, else leave it alone as is.»

As long as there’s no cases where the mapping causes something to break on one system then I can just run it universally. (What I dislike, and want to avoid, is case statements like «if we are on Linux do this, else if we are on Windows do this, else if we are on Mac do this…»)

@Dunbaratu

Also, I’m going to split off the other issue that a user discovered, that the texteditor widget on linux doesn’t seem to be processing the input in the right stacking order (so the background flight controls see «W,A,S,D» before kOS does, even when the kOS terminal is focused), and make it a separate issue to be solved independantly. Otherwise this keymapping issue wouldn’t be close-able on its own.

@NoPanShabuShabu

This should be the maximum you need, and even if some of them aren’t necessary (I think backspace actually worked by some miracle) changing them should have zero impact on other OSes:

Incorrect Correct Description
0xff08 0x0008 BackSpace
0xff09 0x0009 Tab
0xff0a 0x000a Linefeed
0xff0b 0x000b Clear
0xff0d 0x000d Return
0xff13 0x0013 Pause
0xff14 0x0014 ScrollLock
0xff15 0x0015 SysReq
0xff1b 0x001b Escape
0xff80 0x0020 KeypadSpace
0xff89 0x0009 KeypadTab
0xff8d 0x000d KeypadEnter
0xffaa 0x002a KeypadMultiply
0xffab 0x002b KeypadAdd
0xffac 0x002c KeypadSeparator
0xffad 0x002d KeypadSubtract
0xffae 0x002e KeypadDecimal
0xffaf 0x002f KeypadDivide
0xffb0 0x0030 Keypad0
0xffb1 0x0031 Keypad1
0xffb2 0x0032 Keypad2
0xffb3 0x0033 Keypad3
0xffb4 0x0034 Keypad4
0xffb5 0x0035 Keypad5
0xffb6 0x0036 Keypad6
0xffb7 0x0037 Keypad7
0xffb8 0x0038 Keypad8
0xffb9 0x0039 Keypad9
0xffbd 0x003d KeypadEqual

@NoPanShabuShabu

And now I’ll describe some other weirdness.

I hacked in a remap like we’re talking about just to see if this will work:
I created a remap function «char FixChar(Char ch)» for those keys in TermWindow.cs.
In ProcessKeyStrokes() function I made a couple of changes:
added «.. && Event.current.character != 0xff0d && Event.current.character != 0xff0a ..» in the first part of the if..else if statement where it checks for return or linefeed.
changed «Type(Event.current.character);» to «Type(FixChar(Event.current.character));»

Keep in mind this is not how I think it should be implemented, just a hacky test. Also it wouldn’t be in a good position to help out the TextEditor.

So, Build and test:
Windows x32 & x64: All OK.
Linux x64: All OK, also keypad works now. BUT! Now ctrl-c doesn’t work? Nor ctrl-shift-x…

Which didn’t make any sense since I didn’t do anything to the second part of that if..else if. Then I thought «Why ‘else if’?» and «How did that ever work in the first place?» The first part will run if the char is not 0, 13, or 10 (plus 0xff0d and 0xff0a now). The second part is where it calls Keydown which appears to be where it checks for ctrl-c, ctrl-shift-x and other special keys. Other than when that function handles the Return key, logically it shouldn’t ever be called, should it?

Removing the «else» makes everything seem to work like normal in Windows and Linux. I just don’t understand how it worked with the «else» in the first place, unless those special keys are also being handled somewhere else.

Well it’s food for thought, and something I’ll be sure to check when you implement your remapping.

@NoPanShabuShabu

The issue I talked about earlier is because of this:

When you press a key on Windows, Unity sends 2 events (I suppose to OnGUI?).
The first gives the keycode: Event.current.keyCode has a value and Event.current.character is 0
The second gives the character: Event.current.keyCode is 0 and Event.current.character has a value.
Some keys like Backspace, Home, and End only have one: Event.current.keyCode has a value character is 0.

On Linux, there is only one event: Event.current.keyCode has a value and Event.current.character has a value. The keys like Backspace, Home, etc. the same as above with on event with the character being 0.

So, on Windows it passes through ProcessKeystrokes 2 times for most keys, and on Linux only 1 time.

And one more thing of little consequence, but to keep in mind: on Windows when you press Enter, the KeyCode is 13, and the Character is 10. On Linux, KeyCode is 13 and Character is 13 (actually 0xff0d).

@Dunbaratu

For crying out Loud! The whole POINT of Unity, and in fact the reason it’s called Unity, was to be a platform-independant game engine. But they can’t even get platform consistency with this basic feature of reading the keyboard, which has nothing to do with actual OS implemenation, but with how Unity chooses to package the information and pass it to software.

Sigh. Alright. Fine.

The problem is that if I try to react to either the character or the keycode, and make both work, I end up getting TWO keypresses per keypress on WIndows, because they come through as different events. Whereas if I react only to one or only the other, then I miss some of the events that are not generated (like Backspace not sending a unicode character).

@NoPanShabuShabu

This was referenced

Aug 22, 2014

@qsantos

Linux 64 KSP player here. I tested the result of some key inputs:

Key Character
Backspace 0x0
Tab 0xff09
Return 0xff0d
Pause 0xff13
Escape 0xff1b
KeypadEnter 0xff8d
KeypadMultiply 0xffaa
KeypadAdd 0xffab
KeypadSubstract 0xffad
KeypadDecimal 0x2e (period)
KeypadDivide 0xffaf
Keypad0 0xffb0
Keypad1 0xffb1
Keypad2 0xffb2
Keypad3 0xffb3
Keypad4 0xffb4
Keypad5 0xffb5
Keypad6 0xffb6 most GUIs provides two values for key events
Keypad7 0xffb7
Keypad8 0xffb8
Keypad9 0xffb9

The only key that is not accurately detected (in the keyCode) is the keypad’s period. The others, do have high values though. I think a simple 0x007f mask should retrieve the character value if you really need it.

@Dunbaratu

This was implemented but I don’t know if it’s fixed. I’ll reopen this if the complaint resurfaces.

@ghost
ghost

mentioned this issue

Mar 3, 2015

@Xasin

Hey!
I’ve recently tested out kOS on my KSP, and it seems like this bug is still (or again) affecting linux users.
(At least I would assume this, as I am running 64-Bit linux and KSP, 1.0.2, kOS directly downloaded via CKAN.)

Is there any way I could fix this myself?

hvacengi

added a commit
to hvacengi/KOS
that referenced
this issue

Aug 2, 2017

@hvacengi

Обновлено: 20.09.2023

KSP_x64.exe caused an Access Violation (0xc0000005)
in module KSP_x64.exe at 0033:00000000.

Error occurred at 2017-06-22_130834.
B:\Игры\Kerbal Space Program v1.2.9.1764 Rus\KSP_x64.exe, run by DanilKA.
31% memory in use.
8146 MB physical memory [5604 MB free].
9426 MB paging file [6634 MB free].
134217728 MB user address space [134216777 MB free].
Write to location 00000000 caused an access violation.

Как решить эту проблему, удалял и ставил заново игру, раньше нормально запускалась

22 дек. 2019 в 9:12

Hi Im just wondering if anyone experienced unity error «Kerbal Space Program — Unity 2019.2.2f1_ab112815d860» upon launch of the game. I had this error for the past 1month and 16 days and try sending email on the developers of the game. I perform the following as per the developer suggested but to the error persist.

* Uninstall the game from Steam
* Delete residual files on my computer
* Disable steamcloud
* reinstall the game.

I am desperate on having this issue fixed. I still don’t receive message from KSP team maybe because it’s holiday season so im asking for help from everyone.

При запуске Disco Elysium вылетает эта ошибка. Подобное также было при запуске Atom RPG, Subnautica и Among Us. По системным требованиям игры подходят.

У меня подобная ошибка была на ноутбуке. Решил я её отключив один видеопроцессор.

Вполне возможно, что вашему приложению требуется более свежая версия драйвера, но поскольку эти карты теперь являются устаревшими, для них не запланированы обновления драйверов.» Ну это не только старые карты! Unity по-прежнему вылетает с R7 или R9. Я написал AMD в 2015 году, когда был выпущен Catalyst 15.4, и AMD заявила, что это не их вина, а ошибка разработчиков Unity, и предложил связаться с разработчиками Unity. В своем официальном письме разработчики Unity заявили, что это вина AMD. AMD и Unity обвиняют друг друга. Так кто виноват?

Игры на базе Unity3D и Unity до сих пор вылетают на моем AMD R9. Некоторое время они работают в режиме D3D11 и через пару минут вылетают с черным экраном, я слышу музыку / звуковые эффекты, но есть только черный экран. Я могу убить его только через диспетчер задач. Если я смогу переключить игру на OpenGL (Subnautica, Hand of Fate2), они заработают. В такой игре, как Portia, либо отсутствует графический движок OpenGL, либо проблема с OpenGL, потому что параметр cmd -force-opengl или -force-oglcore вызывает сбой игры с окном ошибки «Ошибка инициализацииEngi♥♥♥♥♥phics».

Выпускайте качественные игры благодаря автоматизации обработки ошибок.

Начало работы с Backtrace для Unity

Backtrace избавляет от рутинной работы по обработке аварийных завершений и исключений кроссплатформенных приложений, позволяя сосредоточиться на выпуске игры. Смотрите пошаговое видео, чтобы узнать, насколько просто интегрировать Backtrace в Unity и начать работу.

Все игры иногда зависают, выдают сбои и ошибки. Система отслеживания ошибок Backtrace помогает обнаружить ошибки до того, как они возникнут у игроков.

Регистрируйте каждый сбой и исключение для быстрого устранения неполадок

«Недавно мы перевели одну из наших игр для PS4 на Backtrace, и теперь у нас есть единый портал для анализа проблем, влияющих на качество нашей игры Star Wars Jedi: Fallen Order, как на ПК, так и на игровых консолях. Такая прозрачность выводит наши методы контроля качества ПО на новый уровень».

Fred Gill, Technical Director, Respawn Entertainment

Chris Millar, CEO, Fun Bits Interactive

“Радует, что на рынке существует такое средство автоматизации сбора данных о сбоях, как Backtrace, которое избавляет от множества проблем и помогает автоматизировать процессы малым командам, которые не могут позволить себе держать целый отдел контроля качества для регулярного менеджмента и отслеживания сбоев и написания отчетов.”

«Backtrace перевернула наш взгляд на анализ и использование данных о сбоях. Сотрудникам очень удобно делать запросы и понимать состояние качества одной из наших игр».

Ключевые преимущества

Извлечение полезной информации из отчетов об ошибках

Автоматизируйте регистрацию данных об ошибках и их интерпретацию, упрощая общение клиентов со службой поддержки.

Интеграция в рабочий процесс
Кроссплатформенная поддержка

Единый инструмент, открывающий возможности для кроссплатформенного управления информацией о сбоях и исключениях с различных клиентских устройств, по различным движкам, языкам, стриминговым сервисам и платформам развертывания.

Гибкое развертывание

Запустите систему на общем, выделенном или локальном сервере. Выбор за вами.

Запросы и поиск

Гибкая система запросов позволяет собирать информацию об ошибках в разных окружениях. Поиск и распределение приоритетов по широкому спектру атрибутов.

Контроль над показателем удержания

Управление дамп-файлами и метаданными осуществляется по собственным графикам, позволяя анализировать долгосрочные тенденции.

Подробнее

Запись в блоге Backtrace

Информационный лист по Backtrace для игр

С Backtrace игровые студии получают инструментарий, необходимый для кроссплатформенной регистрации сбоев, что поможет увеличить удержание аудитории и ее удовлетворенности за счет первоклассной стабильности игры.

Вебинар Unite Now Backtrace

Вебинар Unite Now Backtrace

Пример использования: Nimble Giant

Пример использования: Nimble Giant

Узнайте, чем автоматизированные средства сбора ошибок и интеллектуальные системы анализа Backtrace помогли Nimble Giant в сборе, сортировке и решении проблем.

Пример использования: Perfect World

Пример использования: Perfect World

Perfect World Entertainment и Cryptic Studios улучшают качество игры с Backtrace. Узнайте подробности.

В течение 30-дневного пробного периода вы сможете подать или загрузить до 25 тыс. отчетов о сбоях, а также понять, чем Backtrace поможет вашей организации в обработке сбоев. В течение пробного периода вы можете добавить в организацию до пяти пользователей.

Backtrace работает на всех популярных платформах, включая Android, iOS, ПК, Mac, Xbox, PlayStation, Nintendo Switch и Stadia.

Обязательно ли использовать Unity для работы с Backtrace?

Нет. Backtrace не имеет привязки к определенному движку; его можно использовать с Unity, Unreal и другими.

Стоимость зависит от платформы, для которой вы используете Backtrace. Мы предусмотрели три различных пакета. Все тарифы составлены по принципу «одно место на одного пользователя» и не учитывают НДС и налог с продаж.

600 $ в год, только для мобильных устройств iOS и Android
900 $ в год, для мобильных устройств iOS и Android, компьютеров Windows и Mac, а также браузеров
1 200 $ в год для мобильных устройств iOS и Android, компьютеров Windows и Mac, браузеров, а также консолей Xbox, PlayStation и Nintendo Switch.

Начните бесплатный пробный период сейчас, перейдя по этой ссылке и завершив процесс оформления. Свяжитесь с разработчиками, если вам нужна помощь или если у вас есть вопросы.

Сравнение тарифов

Backtrace Developer Edition

Бесплатно для самостоятельных разработчиков и использования на серверах, в мобильных, консольных и PC-играх

  • До 25 тыс. ошибок в месяц
  • Журнал на 1 месяц
  • Облачное хранилище (10 ГБ)
Цены на Backtrace

Доступно три тарифа для разных целевых платформ.

  • Только для мобильных устройств: 600 $ за рабочее место
  • Для мобильных устройств и ПК: 900 $ за рабочее место
  • Для мобильных устройств, ПК, игровых консолей и серверов: 1 200 $ за рабочее место
  • Поддержка Backtrace
  • 1 млн ошибок в месяц
  • Журнал на 3 месяца
  • Облачное хранилище (100 ГБ)

Читайте также:

      

  • Morrowind rebirth как установить
  •   

  • Как включить спидхак через консоль cs go
  •   

  • Князь легенды лесной страны вылетает на мороках
  •   

  • Как убрать подсказки в battlefield 2
  •   

  • Ошибка записи medium error power calibration area error

Понравилась статья? Поделить с друзьями:

Интересное по теме:

  • Ksm 3056 00 ошибка
  • Kone ошибка 0126
  • Kraftway krp472 ошибка 557
  • Korting стиральная машина ошибка e03
  • Kra 640x ошибка f18

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии