allusion-app / Allusion

A free and open source desktop application for managing your visual library
GNU General Public License v3.0
680 stars 44 forks source link

Crash due to undefined path #61

Closed hummingly closed 4 years ago

hummingly commented 5 years ago

These lines usually produce crashes at some point.

https://github.com/RvanderLaan/VisualLibrary/blob/3bee8d575a814566517f9a05ffaf66e3771cfc64/src/renderer/frontend/components/Inspector.tsx#L33

https://github.com/RvanderLaan/VisualLibrary/blob/3bee8d575a814566517f9a05ffaf66e3771cfc64/src/renderer/frontend/components/Inspector.tsx#L46

The bug is so annoying because it is sometimes unproducible. The tracebacks that I've got, suggest that the actual problematic line is another one.

https://github.com/RvanderLaan/VisualLibrary/blob/3bee8d575a814566517f9a05ffaf66e3771cfc64/src/renderer/frontend/components/Inspector.tsx#L23

The array is at some point filled with undefined objects due to a bug in mobx or somwhere else. I will leave this issue as a reminder.

hummingly commented 5 years ago

Additionally, the Inspector and FileInfo seem relevant as I keep errors from React. Something doesn't get cleaned up.

Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function. in wrappedComponent (created by FileInfo) in FileInfo (created by Inspector)

Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method. in InlineSVG in Blueprint3.Icon (created by Blueprint3.Button) in button (created by Blueprint3.Button) in Blueprint3.Button (created by MultiTagSelector) in div (created by Blueprint3.TagInput) in Blueprint3.TagInput (created by Blueprint3.QueryList) in div (created by Blueprint3.QueryList) in span (created by InnerReference) in Blueprint3.ResizeSensor (created by InnerReference) in InnerReference (created by Context.Consumer) in Reference (created by Blueprint3.Popover) in span (created by Blueprint3.Popover) in Manager (created by Blueprint3.Popover) in Blueprint3.Popover (created by Blueprint3.QueryList) in Blueprint3.QueryList (created by Blueprint3.MultiSelect) in Blueprint3.MultiSelect (created by MultiTagSelector) in MultiTagSelector (created by wrappedComponent) in wrappedComponent (created by FileTag)

RvanderLaan commented 5 years ago

I haven't come across these errors yet... That first one is weird, do you know whether it occurs for a specific file or just randomly? That second one seems to originate from the react-inlinesvg package. There's no issue about this there yet, but there are some related changes incoming in the next release: https://github.com/gilbarbara/react-inlinesvg/issues/106

hummingly commented 5 years ago

It happens when you change the view and somehow in between the selection of the files must get messed up randomly. It doesn't seem to be related with the files. You actually saw the errors whenever the app crashed when someone was presenting something. My guess is that in one of the useEffect calls, something doesn't get cleaned up or even in a mobx useObserver hook since the errors come from components that are wrapped in an observer. The issue is due to some state changes not being propagated properly. I hope it is something we can resolve and nothing upstream.