-
Notifications
You must be signed in to change notification settings - Fork 44
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
SkyboltExamples MinimalApp failure #2
Comments
What version of OSG are you using? There was a long standing threading bug in the osgdb_curl plugin which caused a crash when loading images from multiple threads. It looks like that might be the source of your problem. The bug was fixed in OpenSceneGraph commit ccf6554d2d145017a277312e3848e6f8af859f21 which is in the master branch, but I don't think it has made it into any released versions yet. I would recommend using the master version of OSG until the next OSG release. As a workaround you can force the application to be single threaded by setting coreCount=1 in EngineRoot.cpp:71. It should avoid the crash, but tile streaming performance will suffer greatly. The unit tests are failing for 2 reasons:
|
That workaround did work, and updating to the current master of osg also worked. I'll try and keep up with osg updates from here. Now the MinimalApp doesn't crash and I do get the planet model being displayed. I still have no input, however. I plan to look into my version of ois next when I get a chance since I don't know what my issue is. Those were the reasons the unit tests were failing. I didn't look too far into not being able to create an off-screen OpenGL context, so I'm not sure of the solution to that one. I may try and run this on Windows so I can see what your output is like as well. Thanks for your response! |
Ok, there is still no input ability in the app (mouse drag, scroll, keyboard, etc). Am I missing something else? I've checked/changed ois versions and I am getting the same results. Should I even have input here? Or am I terribly mistaken with how this should be working? Here is an image of what I see when I run. I get no errors, running with 8 CPU cores (7 background threads) Also, If this is not the place to be having a conversation about my specific issues please point in the correct direction. And aside from the source code, is there any documentation I could be looking through? I appreciate the responses. |
The app should respond to these inputs:
I suspect OIS is having an internal error of some kind which you'll need to debug to get more information. Look at InputPlatformOis.cpp and put breakpoints in to check whether the OIS objects initialize correctly, and that events are fired. If you can't see anything wrong at that level, you might need to go inside the OIS library code itself. Your screenshot is sort of correct, except that you're not getting any terrain tiles, which I think is why there's a hole in the earth. You need to put a mapbox key into the settings file (should be a path to the file printed at the start of the application log output). You can find info about getting a mapbox key at the bottom of the README file https://github.com/Piraxus/Skybolt/blob/master/README.md The only documentation so far is in that README file and the source code. I plan to create a wiki soon where users can add additional documentation and how-to's. |
When running in Linux, I can follow the debugger through setting up the InputPlatform, though I never hit input events after that (mouseMoved, keyPressed, etc.) On the other hand, I DID get it running in windows and I believe I am seeing proper behavior. The app is responsive to mouse movements and exits with esc. I still see the hole when at a certain zoom level, I will have to double check my mapbox key. EDIT: it was the key, tile streaming is good to go. There are differences between the apps in windows and linux. In linux, I get a window with a title bar with Minimize, Maximize, and Close buttons (they do nothing). In Windows, there is no title bar, just the window. Some difference in that I think is causing the input issue. |
I fixed a bug where the incorrect window handle was passed into the input system on linux. The fix is now on master. See if that helps your input issues. |
Keyboard input should be working now, but mouse input is still broken. I've isolated the problem, it's caused by OSG consuming the X11 mouse events before OIS has a chance to handle them. I'm going to rework the InputManager and I'll report back once I've got a fix. |
I pushed a fix to the master branch which uses OSG's mouse/keyboard input system instead of OIS for the MinimalApp. As a result, input should now work with linux, and OIS is no longer required as a SkyboltEngine dependency. I have successfully tested it running ubuntu on windows through wsl2. Let me know if it works, and I'll close the issue if there are no other problems. OIS is still required for building Sprocket because the Sprocket window is provided by Qt instead of OSG hence there's no OSG input available. I have not had a chance to test Sprocket on linux yet, but if there's a similar problem with Qt and OIS competing for mouse input, I could use Qt as the input source to fix this case. |
I pulled your updates and mouse and keyboard inputs are now working in the Minimal App. The app performance/responsiveness is definitely lesser than when I run it on windows, though that is likely something I can look into in my particular setup. |
Glad it's working. Can I close this issue now? |
Yes I think that fixes this issue. If I experience something else I will create a new one |
I am experiencing a segfault when attempting to run the MinimalApp in SkyboltExamples in Ubuntu 20.04. I assume this is due to some configuration issues on my part, but I am not sure. I am fairly new with gl programming so let me know if I can provide any addition information.
The segfault seems to occur when attempting to load tile images. I am running with OpenSceneGraph 3.6.4 and am using a settings file with my mapbox apikey. I have downloaded all 3 asset packages you provided (Core, EarthMed, Seattle). When I run the app, a window is created (it is all black) and a few moments later it segfaults.
I attempted to run the app without loading the PlanetEarth entity to avoid the issue. This does not produce a segfault and the app doesnt die, but the window is just filled black and it doesnt seem to be taking any inputs. Also, I can't close the app via the esc key or the 'x' in the window.
Here is my callstack if it helps:
Another note (that may or may not be related) is when I run the SkyboltVisTests, I am getting 2 failures. Here is the output for that:
The text was updated successfully, but these errors were encountered: