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

Global Hotkey and Cursor bug. #195

Closed
ChrisFarmer-dev opened this issue Jul 26, 2022 · 26 comments
Closed

Global Hotkey and Cursor bug. #195

ChrisFarmer-dev opened this issue Jul 26, 2022 · 26 comments

Comments

@ChrisFarmer-dev
Copy link

ChrisFarmer-dev commented Jul 26, 2022

The Global Hotkey is supposed to toggle ppInk from paint to cursor. But whenever I am in cursor mode and click on the screen it seems to switch back to paint automatically. Even when I click on the cursor button/icon in the ppInk toolbar and then click on the screen it switches automatically.

notepad_1OqbtROVxh.mp4

Another thing I noticed is that when recording (using Sharex) it looks really weird. I had clicked on the ppInk tool bar multiple times but in the recording it seems like I was clicking on nothing (I wasn't using shortcuts other than the global hotkeys). I am not sure if its a ShareX issue or ppInk. Even the spotlight feature (when you hold the alt button) looks weird in the recording. But for me it works perfectly fine (only issue is the cursor and global hotkey thing)

Thank you so much 🙏 I really love the features this tool provides its really amazing.

@pubpub-zz
Copy link
Owner

Hi @ChrisFarmer-dev,
I'm sorry but the video seems corrupted, can you republish it within a zip : I will have a look to see if you found a sequence that is inducing the problem

about ShareX, It could be a compatibility issue or a limitation of ShareX (actually I don't know this program) I personally use ffmpeg and I've proposed a way to control it from ppInk if you want to try. Obs is used by other users with good results.

@ChrisFarmer-dev
Copy link
Author

@pubpub-zz
Yea sure, same for me actually. I usually use Firefox, it shows Video can't be played because the file is corrupt. But when I open in a chromium browser like Edge it works properly.
notepad_1OqbtROVxh.zip
Yea that could be the case. Ayoo you can record using ffmpeg? thats cool i never knew that. Then most likely its a ShareX issue.

@pubpub-zz
Copy link
Owner

for investigation, can you retry to unset the enter mouse mode with Alt+Tab (1 on image below)
image

Can you try also to kill your key logger/display application

Meanwhile, I will try to prepare some debug traces (hope to be able to do that today or tommorow), once available, you will need to active the traces (2 on the image)

@pubpub-zz
Copy link
Owner

PS : for FFMPEG, you need to have the binaries in your path or in the same folder as ppInk. then have a look at the video tab 😀

@ChrisFarmer-dev
Copy link
Author

I hope this will help. Also if you notice in the recording once I click the cursor icon as well and it gives me the same error.
https://user-images.githubusercontent.com/71568799/181591634-0300bf8f-cab3-454f-ae11-7f21d89996cf.mp4

Also about that visual glitch, it is ShareX, this time I used Bandicam I tried learning FFMPEG seems like it might take sometime for me to figure how to use it 😅 but it's so cool I will definitely give it a try.

@pubpub-zz
Copy link
Owner

I hope this will help. Also if you notice in the recording once I click the cursor icon as well and it gives me the same error. https://user-images.githubusercontent.com/71568799/181591634-0300bf8f-cab3-454f-ae11-7f21d89996cf.mp4

Also about that visual glitch, it is ShareX, this time I used Bandicam I tried learning FFMPEG seems like it might take sometime for me to figure how to use it 😅 but it's so cool I will definitely give it a try.

Thanks for the information. I will have a closer look to the video but I think I will have to provide you with a version with more debug traces.

I understand that killing the key displayer had no impact (if so can you confirm you did unload it from memory).
Can you confirm also that disabling the alt+tab option had no impact?

About ffmpeg, a default command line is already configured. You just need to install it and ensure it is in the path so that ppink can run it. You then just have to enable the button in the toolbar in the video tab

@ChrisFarmer-dev
Copy link
Author

Yep, actually I uninstalled the key displayer. I only installed it so you could see when I was using the Global Hotkeys, and so when it wasn't needed, I just uninstalled it. Also, about the alt+tab option thing, it still has that problem. However, I did notice that when the toolbar is expanded, and I switch from paint tool to cursor using Global Hotkeys and then click on my screen, it does not change to paint tool.

Omggg I did not even notice the Video tab in the options. 😂 😅 It workkss damnn I got a video icon next to the cross.
image
Wait I clicked on it and it gave me an error and now that icon is gone. I put it in the path as well as copied ffmpeg binaries and the folder into ppInk folder.

@pubpub-zz
Copy link
Owner

Wait I clicked on it and it gave me an error and now that icon is gone. I put it in the path as well as copied ffmpeg binaries and the folder into ppInk folder.
the icon disappeared most probably because once You've activated the Icon, you did not saved the configuration (button on first screen)
about the error can you send the crash.txt file ?

@ChrisFarmer-dev
Copy link
Author

07 / 28 / 2022 21:02UIThreadException

version 1.8.2.39999 built on 08/04/2022 22:13
Oops, ppInk crashed! Please include the following information if you plan to contact the developers (a copy of the following information is stored in crash.txt in the application folder):

The system cannot find the file specified

Stack Trace:
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at gInk.FormCollection.VideoRecordStartFFmpeg(Rectangle rect) in D:\gink.git\ppink.legacy\src\FormCollection.cs:line 5908
at gInk.FormDisplay.timer1_Tick(Object sender, EventArgs e) in D:\gink.git\ppink.legacy\src\FormDisplay.cs:line 1235
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

@ChrisFarmer-dev
Copy link
Author

wait nah fam I am just dumb I forgot to select FFMPEG in the video tab option

@ChrisFarmer-dev
Copy link
Author

ChrisFarmer-dev commented Jul 28, 2022

Wait so like for FFMPEG thing right the moment I select the area nothing happens is something supposed to happen?
AutoSave.strokes.txt
I went to the folder where it saves the video but there is just a text file. Am I doing something wrong?

@pubpub-zz
Copy link
Owner

when ffmpeg is running you should get a frame : can you confirm you've got it?

@ChrisFarmer-dev
Copy link
Author

yep when i use alt + r i get a frame
image
but If i click on the icon and select an area it nothing appears.

@pubpub-zz
Copy link
Owner

about your issue with the ffmpeg, check you security setup : maybe ffmpeg does not have rights to write in gink data folder

Else here you are a test version with extra traces.
They will be logged in the debug window. Try to reproduce once only (to ease traces analysis), go to the debug window, then select all the text, copy it and send it please.

@pubpub-zz
Copy link
Owner

with the file
ppInkTrace1.zip

@ChrisFarmer-dev
Copy link
Author

about your issue with the ffmpeg, check you security setup : maybe ffmpeg does not have rights to write in gink data folder

Else here you are a test version with extra traces. They will be logged in the debug window. Try to reproduce once only (to ease traces analysis), go to the debug window, then select all the text, copy it and send it please.

This is the output i got
Debug Window activated
A=63794647473.5824
C=63794647473.6889
AB=63794647474.1635
AB=63794647476.1414
MouseDown
MouseUp
ffmpeg -y -f gdigrab -framerate 15 -offset_x 541 -offset_y 233 -video_size 1010x678 -show_region 1 -i desktop -c:v libx264 -preset ultrafast -crf 25 -pix_fmt yuv420p C:\Users\Chris/Pictures/gInk/CAPT_280722_230715_2.mp4
AB=63794647477.8839
CursorDown :Mouse
MouseDown
Hand

This is the Global Hotkey bug debug output.
Debug Window activated
A=63794647914.265
Unpointer#1
at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Environment.get_StackTrace()
at gInk.Root.UnPointer() in E:\ppink.src\ppInk\src\Root.cs:line 881
at gInk.FormCollection.SelectPen(Int32 pen) in E:\ppink.src\ppInk\src\FormCollection.cs:line 3920
at gInk.FormCollection.Initialize() in E:\ppink.src\ppInk\src\FormCollection.cs:line 1250
at gInk.Root.StartInk() in E:\ppink.src\ppInk\src\Root.cs:line 612
at gInk.Root.callshortcut() in E:\ppink.src\ppInk\src\Root.cs:line 545
at gInk.TestMessageFilter.PreFilterMessage(Message& m) in E:\ppink.src\ppInk\src\Root.cs:line 115
at System.Windows.Forms.Application.ThreadContext.ProcessFilters(MSG& msg, Boolean& modified)
at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at gInk.Program.Main() in E:\ppink.src\ppInk\src\Program.cs:line 99
C=63794647914.436
AB=63794647915.134
AB=63794647918.2235
Unpointer#1
at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Environment.get_StackTrace()
at gInk.Root.UnPointer() in E:\ppink.src\ppInk\src\Root.cs:line 881
at gInk.FormCollection.SelectPen(Int32 pen) in E:\ppink.src\ppInk\src\FormCollection.cs:line 3920
at gInk.FormCollection.AltTabActivate() in E:\ppink.src\ppInk\src\FormCollection.cs:line 1336
at gInk.FormButtonHitter.WndProc(Message& msg) in E:\ppink.src\ppInk\src\FormButtonHitter.cs:line 66
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.PeekMessage(MSG& msg, HandleRef hwnd, Int32 msgMin, Int32 msgMax, Int32 remove)
at System.Windows.Forms.UnsafeNativeMethods.PeekMessage(MSG& msg, HandleRef hwnd, Int32 msgMin, Int32 msgMax, Int32 remove)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at gInk.Program.Main() in E:\ppink.src\ppInk\src\Program.cs:line 99
Undock#1
at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Environment.get_StackTrace()
at gInk.Root.UnDock() in E:\ppink.src\ppInk\src\Root.cs:line 841
at gInk.FormCollection.AltTabActivate() in E:\ppink.src\ppInk\src\FormCollection.cs:line 1341
at gInk.FormButtonHitter.WndProc(Message& msg) in E:\ppink.src\ppInk\src\FormButtonHitter.cs:line 66
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.PeekMessage(MSG& msg, HandleRef hwnd, Int32 msgMin, Int32 msgMax, Int32 remove)
at System.Windows.Forms.UnsafeNativeMethods.PeekMessage(MSG& msg, HandleRef hwnd, Int32 msgMin, Int32 msgMax, Int32 remove)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at gInk.Program.Main() in E:\ppink.src\ppInk\src\Program.cs:line 99
AB=63794647919.5105
0

@pubpub-zz
Copy link
Owner

starting to have some clues...
can you do the same with this new debug version pleas
ppInkTrace2.zip
e

@ChrisFarmer-dev
Copy link
Author

ChrisFarmer-dev commented Jul 29, 2022

starting to have some clues... can you do the same with this new debug version pleas ppInkTrace2.zip e

That's good to hear.
This is the output I got for the cursor glitch

Debug Window activated
A=63794736293.4589
Unpointer#1
   at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
   at System.Environment.get_StackTrace()
   at gInk.Root.UnPointer() in E:\ppink.src\ppInk\src\Root.cs:line 881
   at gInk.FormCollection.SelectPen(Int32 pen) in E:\ppink.src\ppInk\src\FormCollection.cs:line 3920
   at gInk.FormCollection.Initialize() in E:\ppink.src\ppInk\src\FormCollection.cs:line 1250
   at gInk.Root.StartInk() in E:\ppink.src\ppInk\src\Root.cs:line 612
   at gInk.Root.callshortcut() in E:\ppink.src\ppInk\src\Root.cs:line 545
   at gInk.Root.TrayIcon_Click(Object sender, MouseEventArgs e) in E:\ppink.src\ppInk\src\Root.cs:line 587
   at System.Windows.Forms.NotifyIcon.OnMouseClick(MouseEventArgs mea)
   at System.Windows.Forms.NotifyIcon.WmMouseUp(Message& m, MouseButtons button)
   at System.Windows.Forms.NotifyIcon.WndProc(Message& msg)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.PeekMessage(MSG& msg, HandleRef hwnd, Int32 msgMin, Int32 msgMax, Int32 remove)
   at System.Windows.Forms.UnsafeNativeMethods.PeekMessage(MSG& msg, HandleRef hwnd, Int32 msgMin, Int32 msgMax, Int32 remove)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at gInk.Program.Main() in E:\ppink.src\ppInk\src\Program.cs:line 99
C=63794736293.6475
AB=63794736294.2494
Hitter#1 WParm 1, LParm265850
Hitter#1 CompanygInk
AB=63794736300.18
Hitter#1 WParm 0, LParm0
Hitter#1 WParm 0, LParm265850
Hitter#1 CompanygInk
Unpointer#1
   at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
   at System.Environment.get_StackTrace()
   at gInk.Root.UnPointer() in E:\ppink.src\ppInk\src\Root.cs:line 881
   at gInk.FormCollection.SelectPen(Int32 pen) in E:\ppink.src\ppInk\src\FormCollection.cs:line 3920
   at gInk.FormCollection.AltTabActivate() in E:\ppink.src\ppInk\src\FormCollection.cs:line 1336
   at gInk.FormButtonHitter.WndProc(Message& msg) in E:\ppink.src\ppInk\src\FormButtonHitter.cs:line 70
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.PeekMessage(MSG& msg, HandleRef hwnd, Int32 msgMin, Int32 msgMax, Int32 remove)
   at System.Windows.Forms.UnsafeNativeMethods.PeekMessage(MSG& msg, HandleRef hwnd, Int32 msgMin, Int32 msgMax, Int32 remove)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at gInk.Program.Main() in E:\ppink.src\ppInk\src\Program.cs:line 99
Undock#1
   at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
   at System.Environment.get_StackTrace()
   at gInk.Root.UnDock() in E:\ppink.src\ppInk\src\Root.cs:line 841
   at gInk.FormCollection.AltTabActivate() in E:\ppink.src\ppInk\src\FormCollection.cs:line 1341
   at gInk.FormButtonHitter.WndProc(Message& msg) in E:\ppink.src\ppInk\src\FormButtonHitter.cs:line 70
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.PeekMessage(MSG& msg, HandleRef hwnd, Int32 msgMin, Int32 msgMax, Int32 remove)
   at System.Windows.Forms.UnsafeNativeMethods.PeekMessage(MSG& msg, HandleRef hwnd, Int32 msgMin, Int32 msgMax, Int32 remove)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at gInk.Program.Main() in E:\ppink.src\ppInk\src\Program.cs:line 99
AB=63794736302.254
0

This is the output I got for the ffmpeg thingy.

A=63794736371.801
Unpointer#1
   at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
   at System.Environment.get_StackTrace()
   at gInk.Root.UnPointer() in E:\ppink.src\ppInk\src\Root.cs:line 881
   at gInk.FormCollection.SelectPen(Int32 pen) in E:\ppink.src\ppInk\src\FormCollection.cs:line 3920
   at gInk.FormCollection.Initialize() in E:\ppink.src\ppInk\src\FormCollection.cs:line 1250
   at gInk.Root.StartInk() in E:\ppink.src\ppInk\src\Root.cs:line 612
   at gInk.Root.callshortcut() in E:\ppink.src\ppInk\src\Root.cs:line 545
   at gInk.Root.TrayIcon_Click(Object sender, MouseEventArgs e) in E:\ppink.src\ppInk\src\Root.cs:line 587
   at System.Windows.Forms.NotifyIcon.OnMouseClick(MouseEventArgs mea)
   at System.Windows.Forms.NotifyIcon.WmMouseUp(Message& m, MouseButtons button)
   at System.Windows.Forms.NotifyIcon.WndProc(Message& msg)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.PeekMessage(MSG& msg, HandleRef hwnd, Int32 msgMin, Int32 msgMax, Int32 remove)
   at System.Windows.Forms.UnsafeNativeMethods.PeekMessage(MSG& msg, HandleRef hwnd, Int32 msgMin, Int32 msgMax, Int32 remove)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at gInk.Program.Main() in E:\ppink.src\ppInk\src\Program.cs:line 99
C=63794736371.9704
AB=63794736372.6289
AB=63794736374.4364
MouseDown
MouseUp
AB=63794736376.6104
ffmpeg -y -f gdigrab -framerate 15 -offset_x 1252 -offset_y 256 -video_size 566x426 -show_region 1 -i desktop -c:v libx264 -preset ultrafast -crf 25 -pix_fmt yuv420p D:/Misc/Pictures/gInk/CAPT_300722_000741_1.mp4
Hitter#1 WParm 1, LParm0
Hitter#1 WParm 0, LParm265868
Hitter#1 CompanygInk
AB=63794736377.6859

@pubpub-zz
Copy link
Owner

This version may fix the problem:
ppInkFix1.zip

about ffmpeg try the command line manually:
open a cmd and run:
ffmpeg -y -f gdigrab -framerate 15 -offset_x 1252 -offset_y 256 -video_size 566x426 -show_region 1 -i desktop -c:v libx264 -preset ultrafast -crf 25 -pix_fmt yuv420p D:/Misc/Pictures/gInk/CAPT_300722_000741_1.mp4

@ChrisFarmer-dev
Copy link
Author

This version may fix the problem: ppInkFix1.zip

about ffmpeg try the command line manually: open a cmd and run: ffmpeg -y -f gdigrab -framerate 15 -offset_x 1252 -offset_y 256 -video_size 566x426 -show_region 1 -i desktop -c:v libx264 -preset ultrafast -crf 25 -pix_fmt yuv420p D:/Misc/Pictures/gInk/CAPT_300722_000741_1.mp4

Oh hmm the cursor bug is still there

Debug Window activated
A=63794738882.5257
Unpointer#1
   at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
   at System.Environment.get_StackTrace()
   at gInk.Root.UnPointer() in E:\ppink.src\ppInk\src\Root.cs:line 881
   at gInk.FormCollection.SelectPen(Int32 pen) in E:\ppink.src\ppInk\src\FormCollection.cs:line 3920
   at gInk.FormCollection.Initialize() in E:\ppink.src\ppInk\src\FormCollection.cs:line 1250
   at gInk.Root.StartInk() in E:\ppink.src\ppInk\src\Root.cs:line 612
   at gInk.Root.callshortcut() in E:\ppink.src\ppInk\src\Root.cs:line 545
   at gInk.TestMessageFilter.PreFilterMessage(Message& m) in E:\ppink.src\ppInk\src\Root.cs:line 115
   at System.Windows.Forms.Application.ThreadContext.ProcessFilters(MSG& msg, Boolean& modified)
   at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at gInk.Program.Main() in E:\ppink.src\ppInk\src\Program.cs:line 99
C=63794738882.7032
AB=63794738883.3857
Hitter#1 WParm 1, LParm 200244
Hitter#1 Company gInk
AB=63794738885.8152
Hitter#1 WParm 0, LParm 0
Hitter#1 WParm 0, LParm 200244
Hitter#1 Company gInk
Unpointer#1
   at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
   at System.Environment.get_StackTrace()
   at gInk.Root.UnPointer() in E:\ppink.src\ppInk\src\Root.cs:line 881
   at gInk.FormCollection.SelectPen(Int32 pen) in E:\ppink.src\ppInk\src\FormCollection.cs:line 3920
   at gInk.FormCollection.AltTabActivate() in E:\ppink.src\ppInk\src\FormCollection.cs:line 1336
   at gInk.FormButtonHitter.WndProc(Message& msg) in E:\ppink.src\ppInk\src\FormButtonHitter.cs:line 70
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.PeekMessage(MSG& msg, HandleRef hwnd, Int32 msgMin, Int32 msgMax, Int32 remove)
   at System.Windows.Forms.UnsafeNativeMethods.PeekMessage(MSG& msg, HandleRef hwnd, Int32 msgMin, Int32 msgMax, Int32 remove)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at gInk.Program.Main() in E:\ppink.src\ppInk\src\Program.cs:line 99
Undock#1
   at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
   at System.Environment.get_StackTrace()
   at gInk.Root.UnDock() in E:\ppink.src\ppInk\src\Root.cs:line 841
   at gInk.FormCollection.AltTabActivate() in E:\ppink.src\ppInk\src\FormCollection.cs:line 1341
   at gInk.FormButtonHitter.WndProc(Message& msg) in E:\ppink.src\ppInk\src\FormButtonHitter.cs:line 70
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.PeekMessage(MSG& msg, HandleRef hwnd, Int32 msgMin, Int32 msgMax, Int32 remove)
   at System.Windows.Forms.UnsafeNativeMethods.PeekMessage(MSG& msg, HandleRef hwnd, Int32 msgMin, Int32 msgMax, Int32 remove)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at gInk.Program.Main() in E:\ppink.src\ppInk\src\Program.cs:line 99
AB=63794738887.1412

and when I run the ffmpeg command it gives me this output

ffmpeg -y -f gdigrab -framerate 15 -offset_x 1252 -offset_y 256 -video_size 566x426 -show_region 1 -i desktop -c:v libx264 -preset ultrafast -crf 25 -pix_fmt yuv420p D:/Misc/Pictures/gInk/CAPT_300722_000741_1.mp4
ffmpeg version 2022-07-28-git-6f7d3bde11-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 12.1.0 (Rev2, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      57. 30.100 / 57. 30.100
  libavcodec     59. 39.100 / 59. 39.100
  libavformat    59. 29.100 / 59. 29.100
  libavdevice    59.  8.101 / 59.  8.101
  libavfilter     8. 46.100 /  8. 46.100
  libswscale      6.  8.101 /  6.  8.101
  libswresample   4.  8.100 /  4.  8.100
  libpostproc    56.  7.100 / 56.  7.100
[gdigrab @ 000001633b24ac00] Capturing whole desktop as 566x426x32 at (1252,256)
Input #0, gdigrab, from 'desktop':
  Duration: N/A, start: 1659131381.699317, bitrate: 115742 kb/s
  Stream #0:0: Video: bmp, bgra, 566x426, 115742 kb/s, 15 fps, 15 tbr, 1000k tbn
D:/Misc/Pictures/gInk/CAPT_300722_000741_1.mp4: No such file or directory

@pubpub-zz
Copy link
Owner

about ffmpeg, you seem to have an issue with the filename/directory:
you should be able to specify the file path or create the folder.
image

about your actual issue, a new attempt:
ppInkFix2.zip

@ChrisFarmer-dev
Copy link
Author

about ffmpeg, you seem to have an issue with the filename/directory: you should be able to specify the file path or create the folder. image

about your actual issue, a new attempt: ppInkFix2.zip

OMGGGGGGGGGG IT WORKSSS THANK YOU SO MUCHHH 🙏 🫂

AYOOO EVEN THE FFMPEG THINGY WORKS LESGOOOO

CAPT_300722_110717_4.mp4

It works perfectly. Thank you so muchh you are amazing🙏

@pubpub-zz
Copy link
Owner

👌 I cleaned up the code; can you confirm it is fixed in this version ?
ppInkFinalFix.zip

@ChrisFarmer-dev
Copy link
Author

Yep works perfectly. Even the FFmpeg works beautifully. Thank you so much 🙏 .
There was another thing I noticed. There is an icon bug.

CAPT_300722_140751_1.mp4

So basically, I activated the toolbar using Global hotkeys. Then I switched to the eraser tool using the “E” hotkey and toggled back to the cursor using Global Hotkeys. Then I switched to the paint tool, but the eraser icon was there instead.

@pubpub-zz
Copy link
Owner

This should fix your issue:
ppInkEraseCursor.zip

@ChrisFarmer-dev
Copy link
Author

Perfect thank you so much 🙏 🫂

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