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

Adding date column throws error #1201

Closed
cybersteel8 opened this issue Jan 20, 2019 · 18 comments
Closed

Adding date column throws error #1201

cybersteel8 opened this issue Jan 20, 2019 · 18 comments
Assignees

Comments

@cybersteel8
Copy link

cybersteel8 commented Jan 20, 2019

  1. Windows 10 Enterprise x64 v10.0.17134
  2. Transmission 2.92 (14714)
  3. transgui-5.16.0-i386-win32

I am adding a new column by right clicking on the columns in the torrent list and clicking Setup Columns. The error is throws whenever a date column is added (Added on, Completed on, Last Active). The error that appears is "Could not convert variant of type (Null) into type (Int64)". Clicking OK terminates the application.

image

Stack trace:
  $004A68F7
  $004A17D6
  $0052F3B8
  $005968D2
  $005C7C77
  $0052F21E
  $0040D588
  $005218A1
  $00592780
  $0058A809
  $0050A0DA
  $0050A74B
  $73F7BF1B
  $73F783EA
  $73F77C9E
  $73F77A80
  $0050B5BD
@leonsoft-kras
Copy link
Contributor

@PeterDaveHello, what will happen now? Will you compile a separate version?
(The version displays the line number with the error).

@antekgla
Copy link
Contributor

I can't reproduce this error.
Downloaded 5.16 and when I add a date column is all fine.

Windows 10 Home x64
Transmission 2.84 (14307)
TransGUI 5.16.0

@leonsoft-kras
Copy link
Contributor

I said that some mistakes are not repeated. Therefore, it is necessary to configure the compilation to display the line number with an error (enable debug flags).
But for us the main thing is to have a beautiful source code (it's sarcasm).

@cybersteel8
Copy link
Author

cybersteel8 commented Jan 22, 2019

I have investigated the issue a bit further and it appears to be related to the privileges of the application, not the column itself.

When I start transgui.exe normally and I add the column, the error appears but if I wait a moment longer the dates fill in on the column, despite the error message being displayed. Clicking OK still terminates the application.
But, if I start transgui.exe by right-clicking and selecting Run As Administrator (and pressing Yes at the prompt), the error does not appear and the column is added without a fuss.

Additionally, the column is not retained on application restart in non-privileged mode. When I run as administrator and add the column, the column remains when I restart the application.

EDIT: This appears to be inconsistent. Currently the error is occurring even after running as administrator.

@cfpp2p
Copy link

cfpp2p commented Jan 23, 2019

@cybersteel8
Can you try delete your transgui.ini file and then place an empty 0 (zero) byte transgui.ini in the directory where you have transgui.exe installed. Then you'll need to start from scratch transmission-remote-gui configuration, so you could try copy transgui.ini to install directory and delete from original location instead.

@antekgla
Copy link
Contributor

It is like @cybersteel8 says... your TransGUI dont have permitions to write transgui.ini
Where is located your transgui.ini ?

@cybersteel8
Copy link
Author

@cfpp2p I currently have my transgui.ini file inside the same directory transgui.exe exists, which is in my C:/Users/[username]/Downloads folder.

I backed up my ini file and completely removed it from that directory and created a new zero-byte file. When launching transgui, I provide my transmission connection details and all works as normal, however the error still appears when adding that column. I checked the transgui.ini and it is now filled out with all the configuration settings, including my transmission connection details, so it appears to have written to the ini file correctly.

Also, the behaviour is very inconsistent - I ran as administrator, and I attempted to add the column, and it worked. In the same session (I did not exit transgui) I removed the column and added it again, and the error came up. 99% of the time it doesn't work, even when run as administrator.

@leonsoft-kras
Copy link
Contributor

transgui.zip
Try this version. If there is an error, see the file crashreport.txt.

@cybersteel8
Copy link
Author

@leonsoft-kras This is the stack trace from the crash report:

  $004AA077 line 789 of lazutilsstrconsts.pas
  $004A4F56 line 789 of lazutilsstrconsts.pas
  $00532B58  TCONTROL__MOUSEMOVE,  line 4424 of ./include/control.inc
  $0059A152  TCUSTOMGRID__MOUSEMOVE,  line 6505 of grids.pas
  $005CB501  TVARGRID__MOUSEMOVE,  line 814 of vargrid.pas
  $005329BE  TCONTROL__WMMOUSEMOVE,  line 4383 of ./include/control.inc
  $0040D588
  $00525011  TWINCONTROL__WNDPROC,  line 5397 of ./include/wincontrol.inc
  $00596000  TCUSTOMGRID__WNDPROC,  line 4709 of grids.pas
  $0058E089  DELIVERMESSAGE,  line 112 of lclmessageglue.pas
  $0050D84A  TWINDOWPROCHELPER__DOWINDOWPROC,  line 2513 of ./win32/win32callback.inc
  $0050DEBB  WINDOWPROC,  line 2671 of ./win32/win32callback.inc
  $73F7BF1B
  $73F783EA
  $73F77C9E
  $73F77A80
  $0050ED2D  TWIN32WIDGETSET__APPPROCESSMESSAGES,  line 407 of ./win32/win32object.inc

@leonsoft-kras
Copy link
Contributor

thanks!This is useful information. It is now clear where to look for a mistake and set a defense.

@cybersteel8
Copy link
Author

I am happy to help if you require me to perform more testing, or if you need more information.

@leonsoft-kras
Copy link
Contributor

Are all updates installed in the OS???
An error occurs somewhere in the MouseMove function code (Pascal / Lazarus).
How this relates to the date is not clear.

@cybersteel8
Copy link
Author

I can't know for sure. I provided the build number of my Windows OS in the OP, what is the latest build number from Microsoft?

@cfpp2p
Copy link

cfpp2p commented Jan 25, 2019

I can't reproduce the error. Try setting NullStrictConvert to false in vargrid.pas

--- I:/T2/transgui-5-16/source-5.16/vargrid.pas.org.pas	Wed Jan 16 23:42:50 2019
+++ I:/T2/transgui-5-16/source-5.16/vargrid.pas	Fri Jan 25 20:40:54 2019
@@ -138,6 +138,7 @@
     procedure DoEditorHide; override;
 
   public
+    NullStrictConvert : boolean;
     constructor Create(AOwner: TComponent); override;
     destructor Destroy; override;
     function EditorByStyle(Style: TColumnButtonStyle): TWinControl; override;
@@ -811,6 +812,7 @@
 var
   pt: TPoint;
 begin
+  NullStrictConvert := False;
   inherited MouseMove(Shift, X, Y);
   pt:=MouseToCell(Point(x, y));
   if (FHintCell.x <> -1) and ((FHintCell.x <> pt.x) or (FHintCell.y <> pt.y)) then begin 

@leonsoft-kras
Copy link
Contributor

Try
transgui-5.16-setup.zip

@leonsoft-kras
Copy link
Contributor

my version: win10, version 1803 (assembly 17134.523)

There are test results for the new version of TRGUI?

@cybersteel8
Copy link
Author

Try
transgui-5.16-setup.zip

This one appears to work. I cannot reproduce the error using this version.

@leonsoft-kras
Copy link
Contributor

fine. I will make a correction to the main code in the evening.

leonsoft-kras added a commit that referenced this issue Jan 31, 2019
cfpp2p pushed a commit to cfpp2p/transmisson-remote-gui that referenced this issue Feb 8, 2019
qu1ck pushed a commit to qu1ck/transgui that referenced this issue Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants