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

Moving loaded model on viewport crashes application #18

Closed
ooploopl- opened this issue Sep 4, 2019 · 18 comments
Closed

Moving loaded model on viewport crashes application #18

ooploopl- opened this issue Sep 4, 2019 · 18 comments

Comments

@ooploopl-
Copy link

ooploopl- commented Sep 4, 2019

SHADERed v1.1.3 Win64
As stated in title, a simple obj file below i can reproduce the crash with it.
icosphere.zip

@dfranx
Copy link
Owner

dfranx commented Sep 4, 2019

Thanks for reporting! Looking more into it right now! It also crashes on my PC before I even load it. Probably because material file is missing. If I remove mtllib line it loads fine but crashes on selection.

But anyway, working on a fix for both things. Thanks for providing the model too, makes it easier to find bugs!

Edit: Actually it crashes randomly, the missing material file doesn't matter. Interesting

@dfranx
Copy link
Owner

dfranx commented Sep 4, 2019

Thanks again for reporting, I have fixed it! The fix will come with the version 1.1.4

@dfranx dfranx closed this as completed Sep 4, 2019
@dfranx
Copy link
Owner

dfranx commented Sep 11, 2019

Hey @ooploopl- !

I've just pushed a release that includes a fix for this bug. Could you try testing again and see if it works now?

@ooploopl-
Copy link
Author

Hello there, it doesn't work for me. Crashing right away when trying to load. I also tried keeping vertex order, writing polygroups, exporting as group or/and as object.

@dfranx
Copy link
Owner

dfranx commented Sep 11, 2019

That is so weird... Works fine here...
screenshot

I am going to push a hotfix as soon as I find what causes this...

Edit: also, are you loading the exact version of 3D model you gave me?

@dfranx dfranx reopened this Sep 11, 2019
@ooploopl-
Copy link
Author

ooploopl- commented Sep 11, 2019

I'm using exact model, also tried several other, all resulted same type of crash.

@dfranx
Copy link
Owner

dfranx commented Sep 14, 2019

Hey @ooploopl- !
Could you please download the v1.1.5 and do the following steps:

  1. Turn on the "Stream logs" option (Options -> General -> Stream logs)
  2. Restart SHADERed
  3. First, try to load the examples/features/model project. If it crashes, send me the log.
  4. If the previous step works fine then try to add your own 3D model provided here and then send me the log.

Also, what OpenGL version does your GPU support?

@ooploopl-
Copy link
Author

Hello @dfranx ,
"examples/features/model" project loads without any error.
Model i provided crashes, log is below.
My gpu supports OpenGL 4.6.
log.txt

@ooploopl-
Copy link
Author

And here is log for another model, exactly same error.
log.txt

@dfranx
Copy link
Owner

dfranx commented Sep 15, 2019

Thanks for the logs.
It seems like you are not properly openning your 3D model file.
The message "Loading a 3D model D:/Apps/SHADERed/templates/GLSL/" tells me that you haven't properly selected a file (there is no file name and extension after ./GLSL/).

AFAIK, this shouldn't be possible with the file dialog. Are you manually entering the 3D model location? Also, what version of Windows are you using?

@ooploopl-
Copy link
Author

I'm not manually entering. It literally crashes right after i select the file from dialog. I'm including a small video for you to review how i try to load the model.
crash_view
Windows 10 Enterprise N LTSC
Version 1809
OS Build: 17763.737

@dfranx
Copy link
Owner

dfranx commented Sep 15, 2019

Okay! That bug is definitely weird... I've tested SHADERed on few different PCs and loading your 3D model worked normally. But I will look more into and try to find the cause of this problem.
Also, thank you so much for the detailed info.

@ooploopl-
Copy link
Author

I just found the bug, if file is on different drive e.g application sitting on D:\ drive and model was located on C:. I tried moving my model to the same drive application located and it loads without any problem.

@dfranx
Copy link
Owner

dfranx commented Sep 15, 2019

Thanks so much for the help! I've pushed a commit that should fix this problem. The binary version will probably come out in a week or so. I will leave this issue open until then.

Thank you once again!

@ooploopl-
Copy link
Author

Your welcome, thanks for your hard work.

@dfranx
Copy link
Owner

dfranx commented Sep 17, 2019

Hey! I've just released binaries for v1.2 which includes a fix for this.. Could you confirm that it works now?

@ooploopl-
Copy link
Author

Hello, yes issue is resolved, works as expected. Thank you! 🎉

@dfranx
Copy link
Owner

dfranx commented Sep 17, 2019

Nice! No problem! Closing

@dfranx dfranx closed this as completed Sep 17, 2019
AlvaroRuizDelgado added a commit to AlvaroRuizDelgado/SHADERed that referenced this issue Dec 21, 2019
* Cross platform update

* Minor CMake changes

* Use inotify for file watcing on linux

* Fix for dfranx#5

* Fix GLSL shaders + fix for a bug that occurs when using multiple textures

* Add steps for Windows in the README

* Add FindGLM.cmake

* Variable pointers

* Small fix for variable pointers

* Shader macros

* fix sdl linking on Linux

* Update CHANGELOG

* Fix for dfranx#13

* Add FrameIndex system variable dfranx#14

* Add option that disables RT clear dfranx#15

* UIHelper -> include clocale

* Shader variable flags dfranx#12

* Fix CopyState() crash

* Fix last frame flag for GeometryTransform dfranx#12

* Disable last frame for IsPicked + change var manager default size

* Icons

* Add format property to render textures dfranx#17

* Add toolbar

* Add elapsed time to status bar + make the toolbar buttons work

* Pause and increase time

* Fix float4/int4/bool4 variables

* Add Mouse and MouseButton system variables

* Zoom in/out functionality

* Zoom controls

* Fix RT filtering and model rendering

* Fix a bug where SHADERed would crash with multiple 3D models dfranx#18

* Replace glm::identity<glm::mat4>() with glm::mat4(1) dfranx#6

* Add option to reset time

* Fix zoom area dragging & limit zoom selection bounds

* Add CTRL+ALT+MWheel to zoom in/out

* Add FindSFML.cmake

* Add USE_FINDSFML variable

* Add cubemap preview

* Fix picking when zoomed in

* Improve gizmo, bounding box & zoom area performance

* Add option to modify system variables when rendering to an image

* macOS changes

* Object preview window

* Fix CMakeLists.txt

* Add proper cubemap and audio preview to the object preview window

* Add buffers

* Add instancing

* Add ability to use buffers as inputs for instanced objects

* Fix 3D model instancing

* Make it compilable on windows

* Add auto check for updates on startup

* Add buffer to toolbar & minor improvements to UpdateChecker

* Update TextEditor dfranx#19

* Add show whitespace option

* Update external libraries

* Add auto recompile option - compile changed shaders every 200ms

* Add option to disable window's alpha channel

* Add ScreenQuadNDC

* Add the ability to set CodeUI.Save and Project.Save to same shortcut

* Add option to stream logs to file

* Bump version

* Fix loading files from different drives on Windows dfranx#18

* Add ImageObject

* Add compute shaders

* Compute shader examples + fixes

* Minor changes

* Update README.md & TUTORIAL.md

* Fix README gif

* Remove some gifs

* Fix crash on RWTexture2D

* Fix crash on HLSL function calls with no arguments (update glslang)

* Fix various transcompiler crashes

* Various TextEditor fixes (check CHANGELOG) - update ImGuiColorTextEdit submodule

* Fix a bug that occurs when fetching texel data from a texture without a sampler

* Write item type in the properties

* Use different color to write shader pass with an error in the PipelineUI

* Disable various path textboxes

* Prevent pause button from overlapping

* Update TextEditor, add hlsl compute example, bump version

* Add Vulkan GLSL support dfranx#21

* Minor fixes

* Add input layout (dfranx#25)

* Exporting/importing shader pass input layout

* Add input layout manager

* Fix tangents and bitangents

* Add option to export a sequence of images dfranx#23

* Improve performance mode dfranx#24

* Various fixes & changes

* Add CameraPosition3 and CameraDirection3 variables

* Add drag & drop

* Add 'Are you sure?' message box

* Multiple bug fixes

* Rework ImageObject & fix ScreenQuadNDC rendering

* Add resource manager

* Add CTRL+F/search box in the text editor

* Fix for dfranx#27

* Fix a bug where SHADERed would recompile file two times after clicking Compile button

* Add ability to change variable type after variable has been created

* Add a window where all system variables are listed

* Add magnifier tool to object preview window

* Make it so that any form of project save also saves all shader code modifications

* Shader code modifications now also count as project modifications

* Minor changes

* Add context menu and replace feature in the text editor & fix copy and paste functionalities

* Some internal changes to the magnifier tool in ObjectPreviewUI

* Detect if some Editor shortcuts are missing

* Remove all the maps from ObjectManager

* Fix for gcc

* Fixes

* Add support for HLSL types in the buffer format

* Recompile shader pass after we change it's shader path

* Add ability to change warning, message and error text colors in the theme files

* CodeEditorUI now holds pointers to PipelineItems

* Close code editors after a shader pass has been deleted

* Add feature that automatically creates variables when creating a shader pass

* Add Editor.FindNext & improve text editor find feature

* Add 3D textures

* Add Project -> Options

* Fix 3D textures

* Fix texture loading

* Add various checks to prevent crashes

* Add multi-camera system (+ ShadowMapping example) & fix matrix variable export/import

* Update readme

* Add audio shaders (+ audioshader example)

* Update libraries

* Update TODO.md

* Fix a bug where openning Sobel -> Edge -> Sobel examples would break the rendered

* Fix a crash on openning 'cubemap' example

* Update README.md & settings.ini

* Improve image sequence export speed & add ability to use sprintf format specifiers in filename (dfranx#23)

* Add Fedora Dependencies

* Scroll to the selection & fix FindNext highlighting

* Update TODO.md

* Fix Editor.Find and Editor.Replace shortcuts

* Fix HOME/END shortcuts

* Fix gizmo interaction when preview is zoomed in

* Add drag & drop to PipelineUI

* Bump version

* Add ability to deactivate certain shader pass

* Pausing preview now also pauses compute shaders

* Improve TextEditor shortcuts

* Revert

* Update TODO.md & CHANGELOG.txt

* Fix a bug where TextEditor would lose focus on ALT key press

* Plugin API base

* Fixed missed return ArcBallCamera '=' operator

* Fixed missed return value for '=' operator

* Memory leak fix

```
		if (m_item.Data != nullptr)
			delete m_item.Data;
```
m_item.Data:
https://github.com/dfranx/SHADERed/blob/24ba95faebfde61581a08792b82f5ad2cb13d69f/Objects/PipelineItem.h#L45

it leads to mem leak as 'delete' operator can't delete 'void*' proper. (not type information -> not size data, and no information about destructor, ... )
https://github.com/dfranx/SHADERed/blob/24ba95faebfde61581a08792b82f5ad2cb13d69f/Objects/PipelineItem.h#L45
i.e. destructors of internal fields (ex https://github.com/dfranx/SHADERed/blob/24ba95faebfde61581a08792b82f5ad2cb13d69f/Objects/PipelineItem.h#L78)  won't be executed.

* Mem-leak fix

Base class should have a virtual destructor otherwise delete (UIView*) ... won't be able to call derived destructor (even a default one).

* Add support for #include

* Update TODO.md & minor changes to KeyboardShortcuts (dfranx#35)

* Fix #include's for HLSL

* Fix message line numbers when using #include in GLSL shaders

* Add 'Recursive #include detected' message

* Update default theme & font (dfranx#9)

* Add an option to save supersampled screenshots (dfranx#34)

* Update imgui

* Add search in Options -> Shortcuts

* Bump version

* Add ability to load projects by drag and dropping them

* Toolbar item for openning projects should now also show 'Are you sure?' message box

* Somewhat fix autocomplete and find window background colors

* Update and expand the API

* Hide object view window in performance mode

* Add MSAA (dfranx#36)

* Change how MouseButton works

* Fix a bug where user could select same RT multiple times for the same pass

* Fix camera rotation loading from project file

* Add ability to add custom system variable types

* Check if user doesn't have required plugins for a project

* Add ability to disable certain plugins

* Consistency between auto-recompile and normal recompile when using #include

* Add ability to add custom functions

* Add ability to install SHADERed binaries (dfranx#33)

* make install -> lowercase (dfranx#33)

* Compiles on linux

* Plugins can now add custom ObjectManager items

* Add PipelineItem::PluginItem

* Fixes, improvements & add various plugin functions

* Add GetPluginVersion() & fix bugs

* More fixes

* Update shortcuts.kb

* Add ShowContextItems(pluginitem_add, item_type)

* Add GetDPI, Log, FileExists, ClearMessageGroup to plugin API

* Add GetObjectCount, GetObjectName, IsTexture, GetTexture, GetTextureSize plugin functions + fix pipelineitem_add

* Add XDG desktop and AppData files for Linux integration

This also installs those files in CMake to expose SHADERed
to the application launcher once installed.

* Add BeginRender and EndRender to PluginAPI

* Prevent SHADERed from crashing when plugins directory doesn't exist (dfranx#38)

* Cache PluginItems in RenderEngine

* Add BindDefaultStateFn

* Add ability to check for changes in plugin's custom files

* Plugin API can now access CodeEditorUI features

* Auto recompile now works with plugin items

* Plugin API changes

* Prevent crashes when one of the directories (themes, templates, data) doesn't exist

* Create data directory if it doesn't exist

* Update plugin API

Co-authored-by: Franx <dfranx00@gmail.com>
Co-authored-by: CuriousTommy <CuriousTommy@users.noreply.github.com>
Co-authored-by: Denis <denis.ovod@gmail.com>
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants