Bug - Ask Question UI Glitch

Hey @VehbiEmiroglu I have been seeing this quite a lot while doing some extensive development in samba for the last few weeks. I have seen it with the dlg.AskQuestion in scripts and with ask question actions. I have also noticed in some rare cases the show message or ask question showed behind the samba ui and locked up the whole system since its locked to the prompt behind the sambapos ui. I have seen it in different databases, different computers, and in the last 2-3 versions of samba.

At first that square box let me type text in it with my keyboard but after starting the task manager and switching to different ui screens it locked up completely and is now not letting me do anything on samba or on the box… system is completely locked up.

After closing the prompt window by hitting x on 2nd samba item on taskbar, samba crashed and showed the following message.


I saw something like this today on 5.2.20, in my case it was stuck with what appeared to be a hidden window. I tried few different things like pressing enter, esc, however what worked was Alt+F4, which then brought up the error dialog (crash). So possibly in your case this is also happening, SambaPOS is crashing but for whatever reason the error dialog is not coming to front and not displaying properly. Try Alt+F4 and see if it works.


@Hasa Can you send me DB backup or give detail about your Ask Question script for reproduce this.

1 Like

Hey Vehbi, this happened with a simple ask question action… doesn’t matter in script or regular action. I can send you script again but i just used simple dlg.askquestion command.

1 Like

Ask Question also occasionally raises exception “Invalid Window Handle” and then tries to repeatedly open “SambaPOS Reporter” window until SambaPOS finally crashes with “Out of Memory”.

I have never seen this. Can you please provide more information of when this occurs? What kind of setup do you have using it?

It’s difficult to determine the conditions as it happens quite infrequently.
Originally I noticed it happening when using the JS Helper dlg.AskQuestion function so thought it was related to Script calls only but it has also occurred on the Ask Question action.

My setup uses lots of Automation, JavaScript, SQL, etc. so it’s difficult to describe all that here. The Ask Question works 99% of the time so not likely to be related to my setup.

The Ask Question which crashed is executed immediately after pressing a Command Button widget and firing the associated rule. At that time, all other SambaPOS automation and scripts are idle, but it could possibly be related to rapidly pressing that button while some other Widgets were still being refreshed. I can’t be sure but it appeared to happen while working rapidly.

The error log would help a lot.

09/07/2019 08:36

[General Info]

Application: SambaPOS
Version: 5.2.20
Region: en
User: samba
Date: 09/07/2019
Time: 01:36

User Explanation:

samba said “”

[Exception Info 1]

Top-level Exception
Type: System.ComponentModel.Win32Exception
Message: Invalid window handle
Source: WindowsBase
Stack Trace: at MS.Win32.HwndWrapper.DestroyWindow(Object args)
at MS.Win32.HwndWrapper.Dispose(Boolean disposing, Boolean isHwndBeingDestroyed)
at MS.Win32.HwndWrapper.Dispose()
at System.Windows.Interop.HwndSource.Dispose(Boolean disposing)
at System.Windows.Interop.HwndSource.WeakEventDispatcherShutdown.OnShutdownFinished(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Threading.Dispatcher.ShutdownImplInSecurityContext(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.Dispatcher.ShutdownImpl()
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at Samba.Presentation.App.Main()

[Assembly Info]

mscorlib, Version=
System, Version=
Samba.Services, Version=
Samba.Domain, Version=
Samba.Infrastructure.Data, Version=
System.ComponentModel.Composition, Version=
Samba.Presentation.Services, Version=
System.Core, Version=
PresentationCore, Version=
WindowsBase, Version=
PresentationFramework, Version=
DevExpress.Xpf.LayoutControl.v16.2, Version=
System.Xml, Version=
DevExpress.Xpf.Grid.v16.2, Version=
DevExpress.Xpf.Grid.v16.2.Core, Version=
System.Xaml, Version=
Samba.Infrastructure, Version=
Microsoft.Practices.Prism, Version=
System.Runtime.Serialization, Version=
Microsoft.Practices.Prism.MefExtensions, Version=
DevExpress.Xpf.Core.v16.2, Version=
System.Windows.Forms, Version=
System.Drawing, Version=
Samba.Persistance, Version=
Stateless, Version=
PropertyTools, Version=2012.4.14.1
Samba.Localization, Version=
ReachFramework, Version=
EntityFramework, Version=
FluentValidation, Version=
NCalc, Version=
Microsoft.CSharp, Version=
Omu.ValueInjecter, Version=
Microsoft.Practices.ServiceLocation, Version=
DevExpress.Data.v16.2, Version=
WindowsInput, Version=

[System Info]

Operating System
-Microsoft Windows 10 Pro
–CodeSet = 1252
–CSDVersion =
–CurrentTimeZone = 420
–FreePhysicalMemory = 11272260
–OSArchitecture = 64-bit
–OSLanguage = 2057
–ServicePackMajorVersion = 0
–ServicePackMinorVersion = 0
–Version = 10.0.15063

–Manufacturer = System manufacturer
–Model = System Product Name
–TotalPhysicalMemory = 16968839168
–UserName = POS-SERVER\samba

######################### E N D #########################

I found a post by Emre related to a slightly different but possibly related issue with similar log data.
see "Hwnd of Zero is not valid" Issue

Emre said there are problems with some Graphics Drivers and suggests trying the -softrender startup option.

I’m using the -softrender option now and will report if Ask Question crashes in that mode. I have never had crashes on this machine using other software, so … let’s see …

1 Like