• Crash when moving toplevel windows from one screen to next

    From Alexandru@21:1/5 to All on Fri Feb 10 09:28:56 2023
    Today I experienced a supprising crash of my Tcl app, on customers PC.
    When moving a toplevel window from one screen to next one. The user has actually three monitors attached to the computer.
    When trying to move the toplevel from one screen to the next screen, the whole app crahes and closes imediately.
    On my laptop, this doesn't happen. Does anywone experienced something similar? What could be the reason?

    Thanks
    Alexandru

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andreas Leitgeb@21:1/5 to Alexandru on Sat Feb 11 15:24:05 2023
    Alexandru <alexandru.dadalau@meshparts.de> wrote:
    Today I experienced a supprising crash of my Tcl app, on customers PC.
    When moving a toplevel window from one screen to next one. The user has actually three monitors attached to the computer.
    When trying to move the toplevel from one screen to the next screen, the whole app crahes and closes imediately.
    On my laptop, this doesn't happen. Does anywone experienced something similar? What could be the reason?

    Three monitors - maybe each 1920pixels wide (or wider?)...
    I don't have the hardware to reproduce this...

    But "just in case": things you might check for:

    - do you have any tcl code running upon moving toplevels?
    (e.g. bindings to Configure event)

    - can you ask the customer
    + if this happens repeatably (same move crashes always?)
    + only with a specific monitor as target-position
    + only when moving far-right, or from far-right?
    (not necessarily on monitor boundaries)
    + Do the monitors have different sizes/magnification?

    Maybe the answer could help pin down the problem...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandru@21:1/5 to Andreas Leitgeb on Sat Feb 11 08:50:21 2023
    Andreas Leitgeb schrieb am Samstag, 11. Februar 2023 um 16:24:09 UTC+1:
    Alexandru <alexandr...@meshparts.de> wrote:
    Today I experienced a supprising crash of my Tcl app, on customers PC.
    When moving a toplevel window from one screen to next one. The user has actually three monitors attached to the computer.
    When trying to move the toplevel from one screen to the next screen, the whole app crahes and closes imediately.
    On my laptop, this doesn't happen. Does anywone experienced something similar? What could be the reason?
    Three monitors - maybe each 1920pixels wide (or wider?)...
    I don't have the hardware to reproduce this...

    But "just in case": things you might check for:

    - do you have any tcl code running upon moving toplevels?
    (e.g. bindings to Configure event)

    - can you ask the customer
    + if this happens repeatably (same move crashes always?)
    + only with a specific monitor as target-position
    + only when moving far-right, or from far-right?
    (not necessarily on monitor boundaries)
    + Do the monitors have different sizes/magnification?

    Maybe the answer could help pin down the problem...
    Hi Andreas,

    For the moment I can say, that:
    The crash happens every time, the user moves the toplevel from one to next monitor.
    I have no code binding on configure event or similar things.
    Not 100% sure but I think with high probability that at least the two screens involved in the crash have same configuration (full HD desktop screens).
    The toplevel contains a matrix of labels where each lable contains an image. The matrix is 5x4 large.

    Regards
    Alexandru

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandru@21:1/5 to All on Sun Feb 12 10:49:08 2023
    et99 schrieb am Sonntag, 12. Februar 2023 um 19:35:44 UTC+1:
    On 2/11/2023 8:50 AM, Alexandru wrote:
    Andreas Leitgeb schrieb am Samstag, 11. Februar 2023 um 16:24:09 UTC+1:
    Alexandru <alexandr...@meshparts.de> wrote:
    Today I experienced a supprising crash of my Tcl app, on customers PC. >>> When moving a toplevel window from one screen to next one. The user has actually three monitors attached to the computer.
    When trying to move the toplevel from one screen to the next screen, the whole app crahes and closes imediately.
    On my laptop, this doesn't happen. Does anywone experienced something similar? What could be the reason?
    Three monitors - maybe each 1920pixels wide (or wider?)...
    I don't have the hardware to reproduce this...

    But "just in case": things you might check for:

    - do you have any tcl code running upon moving toplevels?
    (e.g. bindings to Configure event)

    - can you ask the customer
    + if this happens repeatably (same move crashes always?)
    + only with a specific monitor as target-position
    + only when moving far-right, or from far-right?
    (not necessarily on monitor boundaries)
    + Do the monitors have different sizes/magnification?

    Maybe the answer could help pin down the problem...
    Hi Andreas,

    For the moment I can say, that:
    The crash happens every time, the user moves the toplevel from one to next monitor.
    I have no code binding on configure event or similar things.
    Not 100% sure but I think with high probability that at least the two screens involved in the crash have same configuration (full HD desktop screens).
    The toplevel contains a matrix of labels where each lable contains an image. The matrix is 5x4 large.

    Regards
    Alexandru
    Linux or windows, and what version?

    I'd first make certain there are no exit statements that might
    be inadvertently left in the program.

    If on Linux, with a tcl crash, one usually gets a message such
    as segmentation fault. One can then run the program under gdb
    which will catch the fault and one can then get a backtrace.

    Even better, if one builds from source with debug symbols
    enabled, the backtrace provides line numbers as well. That's
    often enough to pinpoint both the script code and the tcl code
    causing the crash.


    Good luck.

    It's Windows 10 or 11.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From et99@21:1/5 to Alexandru on Sun Feb 12 10:35:40 2023
    On 2/11/2023 8:50 AM, Alexandru wrote:
    Andreas Leitgeb schrieb am Samstag, 11. Februar 2023 um 16:24:09 UTC+1:
    Alexandru <alexandr...@meshparts.de> wrote:
    Today I experienced a supprising crash of my Tcl app, on customers PC.
    When moving a toplevel window from one screen to next one. The user has actually three monitors attached to the computer.
    When trying to move the toplevel from one screen to the next screen, the whole app crahes and closes imediately.
    On my laptop, this doesn't happen. Does anywone experienced something similar? What could be the reason?
    Three monitors - maybe each 1920pixels wide (or wider?)...
    I don't have the hardware to reproduce this...

    But "just in case": things you might check for:

    - do you have any tcl code running upon moving toplevels?
    (e.g. bindings to Configure event)

    - can you ask the customer
    + if this happens repeatably (same move crashes always?)
    + only with a specific monitor as target-position
    + only when moving far-right, or from far-right?
    (not necessarily on monitor boundaries)
    + Do the monitors have different sizes/magnification?

    Maybe the answer could help pin down the problem...
    Hi Andreas,

    For the moment I can say, that:
    The crash happens every time, the user moves the toplevel from one to next monitor.
    I have no code binding on configure event or similar things.
    Not 100% sure but I think with high probability that at least the two screens involved in the crash have same configuration (full HD desktop screens).
    The toplevel contains a matrix of labels where each lable contains an image. The matrix is 5x4 large.

    Regards
    Alexandru

    Linux or windows, and what version?

    I'd first make certain there are no exit statements that might
    be inadvertently left in the program.

    If on Linux, with a tcl crash, one usually gets a message such
    as segmentation fault. One can then run the program under gdb
    which will catch the fault and one can then get a backtrace.

    Even better, if one builds from source with debug symbols
    enabled, the backtrace provides line numbers as well. That's
    often enough to pinpoint both the script code and the tcl code
    causing the crash.


    Good luck.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From et99@21:1/5 to Alexandru on Sun Feb 12 11:10:24 2023
    On 2/12/2023 10:49 AM, Alexandru wrote:
    et99 schrieb am Sonntag, 12. Februar 2023 um 19:35:44 UTC+1:
    On 2/11/2023 8:50 AM, Alexandru wrote:
    Andreas Leitgeb schrieb am Samstag, 11. Februar 2023 um 16:24:09 UTC+1: >>>> Alexandru <alexandr...@meshparts.de> wrote:
    Today I experienced a supprising crash of my Tcl app, on customers PC. >>>>> When moving a toplevel window from one screen to next one. The user has actually three monitors attached to the computer.
    When trying to move the toplevel from one screen to the next screen, the whole app crahes and closes imediately.
    On my laptop, this doesn't happen. Does anywone experienced something similar? What could be the reason?
    Three monitors - maybe each 1920pixels wide (or wider?)...
    I don't have the hardware to reproduce this...

    But "just in case": things you might check for:

    - do you have any tcl code running upon moving toplevels?
    (e.g. bindings to Configure event)

    - can you ask the customer
    + if this happens repeatably (same move crashes always?)
    + only with a specific monitor as target-position
    + only when moving far-right, or from far-right?
    (not necessarily on monitor boundaries)
    + Do the monitors have different sizes/magnification?

    Maybe the answer could help pin down the problem...
    Hi Andreas,

    For the moment I can say, that:
    The crash happens every time, the user moves the toplevel from one to next monitor.
    I have no code binding on configure event or similar things.
    Not 100% sure but I think with high probability that at least the two screens involved in the crash have same configuration (full HD desktop screens).
    The toplevel contains a matrix of labels where each lable contains an image. The matrix is 5x4 large.

    Regards
    Alexandru
    Linux or windows, and what version?

    I'd first make certain there are no exit statements that might
    be inadvertently left in the program.

    If on Linux, with a tcl crash, one usually gets a message such
    as segmentation fault. One can then run the program under gdb
    which will catch the fault and one can then get a backtrace.

    Even better, if one builds from source with debug symbols
    enabled, the backtrace provides line numbers as well. That's
    often enough to pinpoint both the script code and the tcl code
    causing the crash.


    Good luck.

    It's Windows 10 or 11.

    Ah, windows. I'm afraid I don't know how to debug tcl on
    windows.

    I think you'll have to whittle down your code (comment out
    parts temporarily) until you find the smallest possible test
    case so you can submit a ticket. In doing so, you might also
    find a workaround to avoid the crash.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandru@21:1/5 to All on Sun Feb 12 11:14:14 2023
    et99 schrieb am Sonntag, 12. Februar 2023 um 20:10:28 UTC+1:
    On 2/12/2023 10:49 AM, Alexandru wrote:
    et99 schrieb am Sonntag, 12. Februar 2023 um 19:35:44 UTC+1:
    On 2/11/2023 8:50 AM, Alexandru wrote:
    Andreas Leitgeb schrieb am Samstag, 11. Februar 2023 um 16:24:09 UTC+1: >>>> Alexandru <alexandr...@meshparts.de> wrote:
    Today I experienced a supprising crash of my Tcl app, on customers PC. >>>>> When moving a toplevel window from one screen to next one. The user has actually three monitors attached to the computer.
    When trying to move the toplevel from one screen to the next screen, the whole app crahes and closes imediately.
    On my laptop, this doesn't happen. Does anywone experienced something similar? What could be the reason?
    Three monitors - maybe each 1920pixels wide (or wider?)...
    I don't have the hardware to reproduce this...

    But "just in case": things you might check for:

    - do you have any tcl code running upon moving toplevels?
    (e.g. bindings to Configure event)

    - can you ask the customer
    + if this happens repeatably (same move crashes always?)
    + only with a specific monitor as target-position
    + only when moving far-right, or from far-right?
    (not necessarily on monitor boundaries)
    + Do the monitors have different sizes/magnification?

    Maybe the answer could help pin down the problem...
    Hi Andreas,

    For the moment I can say, that:
    The crash happens every time, the user moves the toplevel from one to next monitor.
    I have no code binding on configure event or similar things.
    Not 100% sure but I think with high probability that at least the two screens involved in the crash have same configuration (full HD desktop screens).
    The toplevel contains a matrix of labels where each lable contains an image. The matrix is 5x4 large.

    Regards
    Alexandru
    Linux or windows, and what version?

    I'd first make certain there are no exit statements that might
    be inadvertently left in the program.

    If on Linux, with a tcl crash, one usually gets a message such
    as segmentation fault. One can then run the program under gdb
    which will catch the fault and one can then get a backtrace.

    Even better, if one builds from source with debug symbols
    enabled, the backtrace provides line numbers as well. That's
    often enough to pinpoint both the script code and the tcl code
    causing the crash.


    Good luck.

    It's Windows 10 or 11.

    Ah, windows. I'm afraid I don't know how to debug tcl on
    windows.

    I think you'll have to whittle down your code (comment out
    parts temporarily) until you find the smallest possible test
    case so you can submit a ticket. In doing so, you might also
    find a workaround to avoid the crash.

    Thanks, I just wanted to know, if this bug is known somehow.
    Unfortuanatelly, the vast majority of Tcl developers program and test code not on Windows OS.
    I'll try to run some tests, though difficult on costomers computers.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandru@21:1/5 to All on Sun Feb 12 11:58:48 2023
    et99 schrieb am Sonntag, 12. Februar 2023 um 20:28:25 UTC+1:
    On 2/12/2023 11:14 AM, Alexandru wrote:
    et99 schrieb am Sonntag, 12. Februar 2023 um 20:10:28 UTC+1:
    On 2/12/2023 10:49 AM, Alexandru wrote:
    et99 schrieb am Sonntag, 12. Februar 2023 um 19:35:44 UTC+1:
    On 2/11/2023 8:50 AM, Alexandru wrote:
    Andreas Leitgeb schrieb am Samstag, 11. Februar 2023 um 16:24:09 UTC+1: >>>>>> Alexandru <alexandr...@meshparts.de> wrote:
    Today I experienced a supprising crash of my Tcl app, on customers PC.
    When moving a toplevel window from one screen to next one. The user has actually three monitors attached to the computer.
    When trying to move the toplevel from one screen to the next screen, the whole app crahes and closes imediately.
    On my laptop, this doesn't happen. Does anywone experienced something similar? What could be the reason?
    Three monitors - maybe each 1920pixels wide (or wider?)...
    I don't have the hardware to reproduce this...

    But "just in case": things you might check for:

    - do you have any tcl code running upon moving toplevels?
    (e.g. bindings to Configure event)

    - can you ask the customer
    + if this happens repeatably (same move crashes always?)
    + only with a specific monitor as target-position
    + only when moving far-right, or from far-right?
    (not necessarily on monitor boundaries)
    + Do the monitors have different sizes/magnification?

    Maybe the answer could help pin down the problem...
    Hi Andreas,

    For the moment I can say, that:
    The crash happens every time, the user moves the toplevel from one to next monitor.
    I have no code binding on configure event or similar things.
    Not 100% sure but I think with high probability that at least the two screens involved in the crash have same configuration (full HD desktop screens).
    The toplevel contains a matrix of labels where each lable contains an image. The matrix is 5x4 large.

    Regards
    Alexandru
    Linux or windows, and what version?

    I'd first make certain there are no exit statements that might
    be inadvertently left in the program.

    If on Linux, with a tcl crash, one usually gets a message such
    as segmentation fault. One can then run the program under gdb
    which will catch the fault and one can then get a backtrace.

    Even better, if one builds from source with debug symbols
    enabled, the backtrace provides line numbers as well. That's
    often enough to pinpoint both the script code and the tcl code
    causing the crash.


    Good luck.

    It's Windows 10 or 11.

    Ah, windows. I'm afraid I don't know how to debug tcl on
    windows.

    I think you'll have to whittle down your code (comment out
    parts temporarily) until you find the smallest possible test
    case so you can submit a ticket. In doing so, you might also
    find a workaround to avoid the crash.

    Thanks, I just wanted to know, if this bug is known somehow. Unfortuanatelly, the vast majority of Tcl developers program and test code not on Windows OS.
    I'll try to run some tests, though difficult on costomers computers.
    FWIW, I have 2 windows systems, one with 3 1080p monitors, and
    the main one on the left side, the other with 2 1080p and the
    main one on the right side (so there's negative coords on
    monitor 2). I have many tcl/tk programs (but smallish) where I
    move toplevel windows between the monitors all the time with
    never a crash.
    Well, I'm solely on Windows and also never seen a crash like this.
    I think it has something to do with Windows 11, which I never tested.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From et99@21:1/5 to Alexandru on Sun Feb 12 11:28:21 2023
    On 2/12/2023 11:14 AM, Alexandru wrote:
    et99 schrieb am Sonntag, 12. Februar 2023 um 20:10:28 UTC+1:
    On 2/12/2023 10:49 AM, Alexandru wrote:
    et99 schrieb am Sonntag, 12. Februar 2023 um 19:35:44 UTC+1:
    On 2/11/2023 8:50 AM, Alexandru wrote:
    Andreas Leitgeb schrieb am Samstag, 11. Februar 2023 um 16:24:09 UTC+1: >>>>>> Alexandru <alexandr...@meshparts.de> wrote:
    Today I experienced a supprising crash of my Tcl app, on customers PC. >>>>>>> When moving a toplevel window from one screen to next one. The user has actually three monitors attached to the computer.
    When trying to move the toplevel from one screen to the next screen, the whole app crahes and closes imediately.
    On my laptop, this doesn't happen. Does anywone experienced something similar? What could be the reason?
    Three monitors - maybe each 1920pixels wide (or wider?)...
    I don't have the hardware to reproduce this...

    But "just in case": things you might check for:

    - do you have any tcl code running upon moving toplevels?
    (e.g. bindings to Configure event)

    - can you ask the customer
    + if this happens repeatably (same move crashes always?)
    + only with a specific monitor as target-position
    + only when moving far-right, or from far-right?
    (not necessarily on monitor boundaries)
    + Do the monitors have different sizes/magnification?

    Maybe the answer could help pin down the problem...
    Hi Andreas,

    For the moment I can say, that:
    The crash happens every time, the user moves the toplevel from one to next monitor.
    I have no code binding on configure event or similar things.
    Not 100% sure but I think with high probability that at least the two screens involved in the crash have same configuration (full HD desktop screens).
    The toplevel contains a matrix of labels where each lable contains an image. The matrix is 5x4 large.

    Regards
    Alexandru
    Linux or windows, and what version?

    I'd first make certain there are no exit statements that might
    be inadvertently left in the program.

    If on Linux, with a tcl crash, one usually gets a message such
    as segmentation fault. One can then run the program under gdb
    which will catch the fault and one can then get a backtrace.

    Even better, if one builds from source with debug symbols
    enabled, the backtrace provides line numbers as well. That's
    often enough to pinpoint both the script code and the tcl code
    causing the crash.


    Good luck.

    It's Windows 10 or 11.

    Ah, windows. I'm afraid I don't know how to debug tcl on
    windows.

    I think you'll have to whittle down your code (comment out
    parts temporarily) until you find the smallest possible test
    case so you can submit a ticket. In doing so, you might also
    find a workaround to avoid the crash.

    Thanks, I just wanted to know, if this bug is known somehow.
    Unfortuanatelly, the vast majority of Tcl developers program and test code not on Windows OS.
    I'll try to run some tests, though difficult on costomers computers.


    FWIW, I have 2 windows systems, one with 3 1080p monitors, and
    the main one on the left side, the other with 2 1080p and the
    main one on the right side (so there's negative coords on
    monitor 2). I have many tcl/tk programs (but smallish) where I
    move toplevel windows between the monitors all the time with
    never a crash.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Francois Vogel@21:1/5 to All on Sun Feb 12 22:56:55 2023
    Le 12/02/2023 à 20:10, et99 a écrit :

    If on Linux, with a tcl crash, one usually gets a message such
    as segmentation fault. One can then run the program under gdb
    which will catch the fault and one can then get a backtrace.

    Even better, if one builds from source with debug symbols
    enabled, the backtrace provides line numbers as well. That's
    often enough to pinpoint both the script code and the tcl code
    causing the crash.


    Good luck.

    It's Windows 10 or 11.

    Ah, windows. I'm afraid I don't know how to debug tcl on
    windows.

    1. Install MSVC (there is a free edition) if you don't have it already.
    2. Run your script.
    3. Attach the debugger: CTRL+ALT+P
    4. Trigger the crash (move your window from a screen to another one).

    MSVC should catch the problem, show the source code line that triggers
    the crash, and show a stack trace.

    5. File all the info you have (including Tcl/Tk version identification)
    in a ticket.

    If, beforehand, you can build Tcl/Tk with symbols (i.e. in 'debug'
    mode), that will help a lot.

    Regards,
    Francois

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andreas Leitgeb@21:1/5 to Alexandru on Mon Feb 13 00:45:07 2023
    Alexandru <alexandru.dadalau@meshparts.de> wrote:
    Well, I'm solely on Windows and also never seen a crash like this.
    I think it has something to do with Windows 11, which I never tested.

    One of my laptops for work was just recently upgraded to Win11 - at least
    the taskbar looks different now, and the windows button is no longer
    in the corner...

    I connected two further monitors to it (one over HDMI, and one over a USB-C<->HDMI adapter), so all in all it now had three desktops (including
    the laptop's own screen.

    I started one of my (rather simple) tcl-scripts on it, running with some
    tclkit (8.6.9 with twapi) and could move the console and the main window
    to every monitor without disappearing...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)