View Issue Details

IDProjectCategoryView StatusLast Update
0003600NoesisGUIC# SDKpublic2024-09-19 13:21
Reportervoula_d Assigned Tosfernandez  
PrioritynormalSeveritymajorReproducibilityunable to reproduce
Status resolvedResolutionfixed 
Product Version3.2.4 
Target Version3.2.5Fixed in Version3.2.5 
Summary0003600: Attempted to read or write protected memory when resizing window
DescriptionI'm getting a System.AccessViolationException when, under certain circumstances, resizing the MainWindow of my application. My question is, what can I do to find the root cause of the exception. The stack trace tells me that Noesis.App.dll throws the exception but I have no other information as to what is causing it.

The exception: Exception thrown: 'System.AccessViolationException' in Noesis.App.dll
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

The stack trace:
Noesis.App.dll!NoesisApp.Window.Render(double time)
Noesis.App.dll!NoesisApp.Application.Run.AnonymousMethod__51_0(NoesisApp.Display d)
Noesis.App.Displays.Win32.dll!NoesisApp.Win32Display.EnterMessageLoop(bool runInBackground)
Noesis.App.dll!NoesisApp.Application.Run()

I cannot reproduce this in a simpler scenario and I also cannot reproduce it using one of the samples.
TagsNo tags attached.
PlatformAny

Activities

sfernandez

sfernandez

2024-08-07 12:46

manager   ~0009864

Can you attach the crash minidump too so we can debug it?
voula_d

voula_d

2024-08-07 17:56

reporter   ~0009865

I'm unable to attach the file directly to the note, the upload never completes. I don't think size is the problem, it's a 600Kb zipped file. Here is a link where you can get the minidump from: https://we.tl/t-BBxKuHJYwd
sfernandez

sfernandez

2024-08-12 14:07

manager   ~0009869

It is crashing updating some geometries in the render tree, but I can't figure out the origin of the problem.
Are you able to reproduce this crash using one of our samples? If not, would it be possible to get a minimal project where I can reprocude it?
Thanks a lot for your help.
voula_d

voula_d

2024-08-12 14:47

reporter   ~0009870

I can't reproduce the exception using the samples. I could try to create a minimal project that reproduces the exception but it would really help if I had a hint of what the real error is. Right now I only know that resizing the window triggers it. Could you provide more info on the exception on your end?
sfernandez

sfernandez

2024-08-14 18:05

manager   ~0009888

The crash is happening invalidating (in the render thread) a child geometry of a GeometryGroup, probably the Data of a Path shape element.
But I'm not able to determine if that geometry was deleted or if it is something else.
voula_d

voula_d

2024-08-21 23:38

reporter   ~0009896

Thank you for the error information, it pointed me to the right direction. I have a reproducible case, although the exception does not always throw in the minimal project I am attaching. However, I am always getting an error in the output and the window turns black. The error:
[NOESIS/E] <memory>(10,70): Invalid token
Here is a link to a minimal test project: https://we.tl/t-1Hqa7x5JvQ
Thank you
NoesisTest.zip (132,773 bytes)
sfernandez

sfernandez

2024-09-02 19:37

manager   ~0009931

The error message "[NOESIS/E] <memory>(10,70): Invalid token" corresponds to an issue already solved (0003311).

And the black screens gets solved if you update all the Noesis nuget packages to the latest 3.2.4 version (you were mixing 3.2.2 with older 3.1.7 in packages.config).

Could you please try to upgrade to the latest version and see if everything works as expected?
voula_d

voula_d

2024-09-03 15:21

reporter   ~0009940

You are absolutely right. But my real app uses v3.2.4 and still crashes. So I had to try harder to reproduce this and I hope I have a case. Please try running again. The crash happens when resizing the window but the second tab must not be focused. The following steps always crash the app for me:
1. Run the app and select the second tab
2. Let it run for a few seconds (you will see some random data running in the chart)
3. Go back to the first tab
4. Try to resize the window. You'll most probably need to resize a few times before the app crashes
Thanks for all your help
NoesisTest-2.zip (132,767 bytes)
sfernandez

sfernandez

2024-09-03 17:50

manager   ~0009941

Last edited: 2024-09-03 17:51

Thank you for the new project, I was able to reproduce it and I can now debug it.
sfernandez

sfernandez

2024-09-04 18:11

manager   ~0009944

Hi, I found the source of the problem and have generated a patched library, could you please try it?
https://drive.google.com/file/d/1-w7F2LvvhRr383W_Ad8eNsBeBrWy8Jpu/view?usp=sharing
voula_d

voula_d

2024-09-05 15:04

reporter   ~0009946

Thank you for the patch. I tested with my real application and it works for the Windows target. The Android target is still having the same issue but I guess the patched dll is only meant to work for Windows.

Issue History

Date Modified Username Field Change
2024-08-07 12:09 voula_d New Issue
2024-08-07 12:46 sfernandez Assigned To => sfernandez
2024-08-07 12:46 sfernandez Status new => feedback
2024-08-07 12:46 sfernandez Note Added: 0009864
2024-08-07 17:56 voula_d Note Added: 0009865
2024-08-07 17:56 voula_d Status feedback => assigned
2024-08-12 14:07 sfernandez Status assigned => feedback
2024-08-12 14:07 sfernandez Note Added: 0009869
2024-08-12 14:47 voula_d Note Added: 0009870
2024-08-12 14:47 voula_d Status feedback => assigned
2024-08-14 18:05 sfernandez Status assigned => feedback
2024-08-14 18:05 sfernandez Note Added: 0009888
2024-08-21 23:38 voula_d Note Added: 0009896
2024-08-21 23:38 voula_d File Added: NoesisTest.zip
2024-08-21 23:38 voula_d Status feedback => assigned
2024-08-22 01:18 jsantos Target Version => 3.2.5
2024-09-02 19:37 sfernandez Status assigned => feedback
2024-09-02 19:37 sfernandez Note Added: 0009931
2024-09-03 15:21 voula_d Note Added: 0009940
2024-09-03 15:21 voula_d File Added: NoesisTest-2.zip
2024-09-03 15:21 voula_d Status feedback => assigned
2024-09-03 17:50 sfernandez Note Added: 0009941
2024-09-03 17:51 sfernandez Note Edited: 0009941
2024-09-04 18:11 sfernandez Status assigned => feedback
2024-09-04 18:11 sfernandez Note Added: 0009944
2024-09-05 15:04 voula_d Note Added: 0009946
2024-09-05 15:04 voula_d Status feedback => assigned
2024-09-19 13:21 sfernandez Status assigned => resolved
2024-09-19 13:21 sfernandez Resolution open => fixed
2024-09-19 13:21 sfernandez Fixed in Version => 3.2.5