Sounds a lot like a DLL is missing or the wrong version on the laptop.Or an antivirus issue. Antivirus software has become the enemy of software development these days. Do both computers have the same antivirus? Deactivate the antivirus on the laptop and see if it fixes the issue. I had to remove my BitDefender because it used to delete fpc and related tools. I am using now Windows Defender, no problems so far with it (although putting the Lazarus program and project folders on the white list is a MUST here too).
I am using now Windows Defender, no problems so far with it (although putting the Lazarus program and project folders on the white list is a MUST here too).Yes? I also use just Windows Defender (which is quite good, actually) I didn't white-list anything. May be an OPM issue? Because I have no issues at all.
Remark: I did that step to step-debugging already.Sorry I cannot follow these steps... Do I understand correctly that the crash happens in Application.CreateForm(TMasterForm, MasterForm) somewhere related to Application.GetTitle? But AFAICS this does not require the UTF8-to-UTF16 conversion... And what did you do that you can step into LCL units? Normally this is not possible.
...
32bit Laptop1 | 64bit Laptop1 | 32bit Laptop2 | 64bit Laptop | 32bit PC | 64bit PC | |
Run on development | No | No | No | No | Yes | Yes |
Laptop1 | Laptop2 | PC | |
Run as exe | No | No | Yes |
Run as exe created on Laptop1 32bit | No | No | Yes |
Run as exe created on Laptop1 64bit | No | No | Yes |
Run as exe created on Laptop2 32bit | No | No | Yes |
Run as exe created on Laptop2 64bit | No | No | Yes |
Run as exe created on PC 32bit | No | No | Yes |
Run as exe created on PC 64bit | No | No | Yes |
You said all this happened after adding the second form to the program (I guess TVIEWERform).
What happens if you remove it?
What is included in the uses of TVIEWERform what is missing in TMASTERform?
You can look at the code all you want but I don't think you'll find the solution there (unless it is to debug where the crash happens). The .exe from the other machine also won't run on the laptop (while it runs on the PC just fine). To me, that says it must be an environment issue.
Also, the fact you see a blank window just before the crash (TMasterform?) says the crash happens after FormCreate and even after FormShow. Try setting a Showmessage at the end of FormCreate and one in FormShow and see if that's true.
It smells a too small buffer for conversion.I wouldn't trust the debugger (note that we are talking about gdb here) to pinpoint the exact crash location in this case.
It smells a too small buffer for conversion.I was thinking about something like Issue : 33296 corrected in Revision: 57429 that did nicely crash programs.
I wouldn't trust the debugger (note that we are talking about gdb here) to pinpoint the exact crash location in this case.I just find (Window 32bits) that GDB7.7.1 works bloody well for programs compiled :
When another program just kills the process, the gdb debugger will go completely nuts.
if fileexists( cFile ) then
begin
with tStringList.create do
try
LoadFromFile( cFile );
MASTERform.Top := strtoint(Strings[0]);
MASTERform.Left := strtoint(Strings[1]);
schijfeenheid.Text := trim( Strings[2] );
folder.Text := trim( Strings[3] );
appl.Text := trim( Strings[4] );
foto_base.Text := trim( Strings[5] );
thumbhoogte.Text := trim( Strings[6] );
finally
free;
end;
end;
if sender is tbutton then
begin
if tbutton(sender).tag=1 then
This night I did the proposal stripping all stuff in the pas-source (Put in comment).Did you try to save the project with DatabaseName cleared? Then, at runtime, you can set the DatabaseName (like you actually do).
And yes, suddenly I could run it again on the Laptop ! I put the same garbage-written source on the PC and as I expected ir run there too.
Finally I found the place were things go wrong.
As the little app must serve to access several database I try to modify the SQLConnection.
While developing it is set to into the component. This permits to see all needed info while developing (fdatafields ...)
When you choose another database (in setup) I close all connection and enter a new databasename and reopen the connection.
Strange, on the PC this runs !! however, on the Laptop this causes the strange behavour.
You try to run and all is compiling correctly, BUT, the app pops up and closes directly without any error ..
The new, read other databasename is stored in the 'parameter'-file and the default is fe 'test' which works correct.
This parameter can been entered in setup and is the edit-component 'foto_base'
At startup 'rerun) the stored value is entered in the SQLconnection-component. This gives no error, but the application does not give focus on the Laptop. The app pops up and closes immediately. On the PC however it continues and there I get focus, but now I see that it does not change to another database if requested.
MasterQuery.Close; MasterQuery.Active := False; MasterSQLTransaction.Active := False; DBConnection.Connected := False; DBConnection.d // DBConnection.DatabaseName := foto_base.Text; DBConnection.HostName := 'Localhost'; DBConnection.UserName := 'root'; DBConnection.Connected := True; MasterSQLTransaction.Active := True; MasterQuery.Active := True;