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

[Bug]: Editor Crash (Division by 0 error) when debugging #12

Open
1 task done
boriel opened this issue Oct 31, 2024 · 0 comments
Open
1 task done

[Bug]: Editor Crash (Division by 0 error) when debugging #12

boriel opened this issue Oct 31, 2024 · 0 comments
Assignees
Labels
bug Something isn't working triage Classifiying the issue

Comments

@boriel
Copy link

boriel commented Oct 31, 2024

Contact Details

@boriel

IDE version

0.3

What happened?

When debugging the following program:

function third(a() as Ubyte) as Ubyte
   Dim b as Ubyte
   b = a(3, 4, 1)
   PRINT b
   return b
end Function

DIM a(2 to 5, 3 To 6, 2) as Ubyte

a(3, 4, 1) = 3
third(a)

if we put a break point in line which reads b = a(3, 4, 1) and start debugging, the executions halts as expected.
Hitting then key F9 (continue next asm instruction) crashes the editor with the error below (see next section).

Error and Warning messages

Lib audio: /home/boriel/src/boriel-basic/zxbasic/scratch/libportaudio.so
Unhandled exception. System.DivideByZeroException: Attempted to divide by zero.
   at ZXBasicStudio.BuildSystem.ZXVariableHelper.GetArrayDescriptor(IMemory Memory, UInt16 Address) in /home/boriel/src/boriel-basic/ZXBasicStudio/ZXBStudio/BuildSystem/ZXVariableHelper.cs:line 134
   at ZXBasicStudio.BuildSystem.ZXVariable.GetArrayDescriptor(IMemory Memory, IZ80Registers Registers) in /home/boriel/src/boriel-basic/ZXBasicStudio/ZXBStudio/BuildSystem/ZXVariable.cs:line 68
   at ZXBasicStudio.DebuggingTools.Variables.Controls.ZXVariablesView.BeginEdit() in /home/boriel/src/boriel-basic/ZXBasicStudio/ZXBStudio/DebuggingTools/Variables/Controls/ZXVariablesView.axaml.cs:line 82
   at ZXBasicStudio.MainWindow.AssemblerStepEmulator(Object sender, RoutedEventArgs e) in /home/boriel/src/boriel-basic/ZXBasicStudio/ZXBStudio/MainWindow.axaml.cs:line 1184
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
   at Avalonia.Threading.SendOrPostCallbackDispatcherOperation.InvokeCore()
   at Avalonia.Threading.DispatcherOperation.Execute()
   at Avalonia.Threading.Dispatcher.ExecuteJob(DispatcherOperation job)
   at Avalonia.Threading.Dispatcher.ExecuteJobsCore(Boolean fromExplicitBackgroundProcessingCallback)
   at Avalonia.Threading.Dispatcher.Signaled()
   at Avalonia.X11.X11PlatformThreading.CheckSignaled()
   at Avalonia.X11.X11PlatformThreading.RunLoop(CancellationToken cancellationToken)
   at Avalonia.Threading.DispatcherFrame.Run(IControlledDispatcherImpl impl)
   at Avalonia.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken)
   at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args) at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(AppBuilder builder, String[] args, Action`1 lifetimeBuilder)
   at ZXBasicStudio.Program.Main(String[] args) in /home/boriel/src/boriel-basic/ZXBasicStudio/ZXBStudio/Program.cs:line 23
Aborted (core dumped)

Code of Conduct

  • I agree to follow this project's Code of Conduct
@boriel boriel added bug Something isn't working triage Classifiying the issue labels Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Classifiying the issue
Projects
Status: No status
Development

No branches or pull requests

2 participants