Recent

Author Topic: Need advice: Applicationn created on one W10 does not work on others  (Read 1587 times)

hansotten

  • Jr. Member
  • **
  • Posts: 88
Strange problem, need advice where to look.

Two Windows 10 PC, 64 bit. latest updates (1903) applied

Lazarus 2.20, FPC 3.0.4 SVN rev 60954

Default installation on C; \lazarus

If I create an app (New Application) on PC 1 (which has 3 monitors attached) and build just this empy application, it runs fine on this PC 1.
Copied to the other PC 2 (one monitor, though I attached a second for test) starting the app result in the standard lazarus Icon in the tray, but no window.
Copied to PC 3 (Same OS etc) same empty not running app.

When I create the also empty) app on the other PC, compile it there, it runs on both PC's.

When I compile the source create on PC 2 on PC 1 it also runs on both PC's.

So something is different in the app when created on PC 1, but I cannot find it.  The C:\lazarus directory is identical, same install with the cleanup of older configurations.

The files created  like lfm lpi pas are identical (I did a file compare).

So what is preventing the app originally created on PC 1 running on both PC's?

This problem started with an application that now is quite big, several forms, etc, Developed on PC 1 but not running on PC 2.
With the experiment above I tried to find the cause.
 

Any advice? 
 
« Last Edit: July 26, 2019, 11:24:46 am by hansotten »

tudi_x

  • Hero Member
  • *****
  • Posts: 532
Re: Need advice: Applicationn created on one W10 does not work on others
« Reply #1 on: July 26, 2019, 11:37:31 am »
switch to Linux and provision the machines with Ansible (easiest).
the situation you are in is typical problem that was a trigger of DevOps.
Lazarus 2.0.2 64b on Debian LXDE 10

Peter H

  • Sr. Member
  • ****
  • Posts: 272
Re: Need advice: Applicationn created on one W10 does not work on others
« Reply #2 on: July 26, 2019, 12:57:23 pm »
Possible the window is open, but ouside screen coordinates.

In Taskbar, near to the "Cortana" icon, there is an Icon "Show active Apps".
(My desktop is not english, I dont know the name i english)
This should show all windows smaller tiled on the destop.

Try this. If you see the window, right-click it.
« Last Edit: July 26, 2019, 01:11:16 pm by Peter H »

hansotten

  • Jr. Member
  • **
  • Posts: 88
Re: Need advice: Applicationn created on one W10 does not work on others
« Reply #3 on: July 26, 2019, 01:09:29 pm »
Problem solved.

Indeed there was a problem with the windows off screen, not able to create even I think.

The left properties of the forms were out of reach of a single monitor system.
Move the forms to the main monitor on my 3 monitor system and the application shows fine on the other P's and all is well.

Peter, thanks for the hint, it pointed me to the solution!

Hans 
« Last Edit: July 26, 2019, 01:11:47 pm by hansotten »

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Need advice: Applicationn created on one W10 does not work on others
« Reply #4 on: July 26, 2019, 08:59:46 pm »
A more generic solution is probably setting the forms' DefaultMonitor and/or Position properties to some proper values for your setup.

Or check the forms' bounds in their OnActivate or OnFirstShow* events an adjust accordingly.


* There is no field or property to set "OnFirstShow"; you have to do it in the OnCreate handler by using AddHandlerFirstShow
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

 

TinyPortal © 2005-2018