Bug#1024757: Editor: -key ignored

2022-12-13 Thread Kristian Nielsen
The root cause of this problem with openscad is this upstream bug in Qt:

  https://bugreports.qt.io/browse/QTBUG-95108

The symptoms are that in some keyboard layouts, the Qt::GroupSwitchModifier
is handled incorrectly, causing some keys to not respond correctly in
certain applications.

This bug was introduced in Qt 5.15.5, and has been fixed in Qt 5.15.7.

The bug can be reproduced by temporarily switching layout:

  setxkbmap -model pc105 -layout de -variant neo

and starting the "openscad" program; in the editor, the  does not
work.

I verified that installing libqt5gui5 version 5.15.7+dfsg-1+b1 from
experimental fixes the problem.

So this bug can be closed when Qt 5.15.7 goes into unstable.

 - Kristian.



Bug#1024757: Editor: -key ignored

2022-12-07 Thread Dr. Nikolaus Klepp
Anno domini 2022 Tue, 06 Dec 23:20:06 +0100
 Kristian Nielsen scripsit:
> [...]
> The 5.15.6 version entered Unstable on November 29, so something like this
> should be a recent snapshot that contains the 5.15.4 version:
>
>   http://snapshot.debian.org/archive/debian/20220928T030933Z/
>
> I'll see if I can get a definite confirmation that the QT bug is the root
> cause, and then probably re-assign this bug to QT.

Thank you for the link. Reverting to the old version solves the problem.

Nik

> Thanks,
>
>  - Kristian.
>



--
Please do not email me anything that you are not comfortable also sharing with 
the NSA, CIA ...



Bug#1024757: Editor: -key ignored

2022-12-06 Thread Kristian Nielsen
"Dr. Nikolaus Klepp"  writes:

> Ok, setting the keyboard layout to US makes  working again. Here 3x 
> :

Thanks for the additional test. That data point does suggest that the QT bug
is the root cause.

>> 3. It would be interesting to try to downgrade Qt to some 5.15.4 version and
>> see if that solves the problem. However, I'm not sure how feasible that is,

> This is a thing most likely to solve the problem, 'cause the update I
> dis on 5th November replaced QT 5.15.4 with 5.15.6. Is there an
> archive where I can get the old version?

You can try snapshots.debian.org:

  http://snapshot.debian.org/

The 5.15.6 version entered Unstable on November 29, so something like this
should be a recent snapshot that contains the 5.15.4 version:

  http://snapshot.debian.org/archive/debian/20220928T030933Z/

I'll see if I can get a definite confirmation that the QT bug is the root
cause, and then probably re-assign this bug to QT.

Thanks,

 - Kristian.



Bug#1024757: Editor: -key ignored

2022-12-06 Thread Dr. Nikolaus Klepp
Ok, setting the keyboard layout to US makes  working again. Here 3x 
:

$ setxkbmap -model pc105 -layout us
$ openscad --debug=scintillaeditor
scintillaeditor:   KeyPress - modifiers: SHIFT ctrl alt meta keypad group
scintillaeditor: KeyRelease - modifiers: SHIFT ctrl alt meta keypad group
scintillaeditor: KeyRelease - modifiers: shift ctrl alt meta keypad group
scintillaeditor:   KeyPress - modifiers: SHIFT ctrl alt meta keypad group
scintillaeditor: KeyRelease - modifiers: SHIFT ctrl alt meta keypad group
scintillaeditor: KeyRelease - modifiers: shift ctrl alt meta keypad group
scintillaeditor:   KeyPress - modifiers: SHIFT ctrl alt meta keypad group
scintillaeditor: KeyRelease - modifiers: SHIFT ctrl alt meta keypad group
scintillaeditor: KeyRelease - modifiers: shift ctrl alt meta keypad group

Two KeyRelase for one KeyPress is a bit strange.

> 2. See if you can reproduce the problem with the Qt example program
> "codeeditor", as in the Qt bug. It is available from package
> qtbase5-examples as
> /usr/lib/x86_64-linux-gnu/qt5/examples/widgets/widgets/codeeditor/codeeditor

No, here the -key works as expected.

> 3. It would be interesting to try to downgrade Qt to some 5.15.4 version and
> see if that solves the problem. However, I'm not sure how feasible that is,
> the dependencies around Qt are probably quite complex. The bug also mentions
> that reverting patch from QTBUG-49771 fixes their issue, but again I'm not
> sure how easy it would be to get a rebuilt Qt with that patch reverted to
> test with.
This is a thing most likely to solve the problem, 'cause the update I dis on 
5th November replaced QT 5.15.4 with 5.15.6. Is there an archive where I can 
get the old version?

Nik
 
> Would be good to determine if the bug QTBUG-95108 could be the root cause.
> If not, I'll try to think of a way to debug what is eating the KeyPress
> events before they get into the openscad Editor event handler code.
> 
>  - Kristian.
> 



-- 
Please do not email me anything that you are not comfortable also sharing with 
the NSA, CIA ...



Bug#1024757: Editor: -key ignored

2022-12-05 Thread Kristian Nielsen
Thanks a lot for the additional information,

"Dr. Nikolaus Klepp"  writes:

> This is what I get when I run "openscad --debug=scintillaeditor":
>
> Pressing  3 times:
> scintillaeditor: KeyRelease - modifiers: shift ctrl alt meta keypad GROUP
> scintillaeditor: KeyRelease - modifiers: shift ctrl alt meta keypad GROUP
> scintillaeditor: KeyRelease - modifiers: shift ctrl alt meta keypad GROUP

There are two interesting observations here:

1. the GROUP modifier (which is Qt::GroupSwitchModifier) is always set, here
and below.

2. The code only sees KeyRelease events for the  key, no key presses,
which could explain why the key has no effect.

I found this Qt bug report, which could be relevant:

  https://bugreports.qt.io/browse/QTBUG-95108

This bug report mentions:

 - As seen in your case, the Qt::GroupSwitchModifier is always set.

 - As a consequence  and other non-printing characters do not work.

 - Apparently introduced in Qt 5.15.5; Unstable has 5.15.6.

 - The problem seems to depend on the keyboard layout.

So some things you could try:

1. Try temporarily setting another keyboard map, eg. plain US layout, and
see if it makes the problem go away (the GROUP modifier in the printout, and
the non-functional  key). I think maybe this command can do it:

  setxkbmap -model pc105 -layout us

2. See if you can reproduce the problem with the Qt example program
"codeeditor", as in the Qt bug. It is available from package
qtbase5-examples as
/usr/lib/x86_64-linux-gnu/qt5/examples/widgets/widgets/codeeditor/codeeditor

3. It would be interesting to try to downgrade Qt to some 5.15.4 version and
see if that solves the problem. However, I'm not sure how feasible that is,
the dependencies around Qt are probably quite complex. The bug also mentions
that reverting patch from QTBUG-49771 fixes their issue, but again I'm not
sure how easy it would be to get a rebuilt Qt with that patch reverted to
test with.

Would be good to determine if the bug QTBUG-95108 could be the root cause.
If not, I'll try to think of a way to debug what is eating the KeyPress
events before they get into the openscad Editor event handler code.

 - Kristian.



Bug#1024757: Editor: -key ignored

2022-12-04 Thread Dr. Nikolaus Klepp
Hi!

This is what I get when I run "openscad --debug=scintillaeditor":

Pressing  3 times:
scintillaeditor: KeyRelease - modifiers: shift ctrl alt meta keypad GROUP
scintillaeditor: KeyRelease - modifiers: shift ctrl alt meta keypad GROUP
scintillaeditor: KeyRelease - modifiers: shift ctrl alt meta keypad GROUP

Pressing + 3 times:
scintillaeditor:   KeyPress - modifiers: SHIFT ctrl alt meta keypad GROUP
scintillaeditor:   KeyPress - modifiers: SHIFT ctrl alt meta keypad GROUP
scintillaeditor: KeyRelease - modifiers: SHIFT ctrl alt meta keypad GROUP
scintillaeditor:   KeyPress - modifiers: SHIFT ctrl alt meta keypad GROUP
scintillaeditor: KeyRelease - modifiers: SHIFT ctrl alt meta keypad GROUP
scintillaeditor:   KeyPress - modifiers: SHIFT ctrl alt meta keypad GROUP
scintillaeditor: KeyRelease - modifiers: SHIFT ctrl alt meta keypad GROUP
scintillaeditor: KeyRelease - modifiers: shift ctrl alt meta keypad GROUP

Pressing  (or any other letter) 3 times:
scintillaeditor:   KeyPress - modifiers: shift ctrl alt meta keypad GROUP
scintillaeditor: KeyRelease - modifiers: shift ctrl alt meta keypad GROUP
scintillaeditor:   KeyPress - modifiers: shift ctrl alt meta keypad GROUP
scintillaeditor: KeyRelease - modifiers: shift ctrl alt meta keypad GROUP
scintillaeditor:   KeyPress - modifiers: shift ctrl alt meta keypad GROUP
scintillaeditor: KeyRelease - modifiers: shift ctrl alt meta keypad GROUP

Sorry, I dont' have a nimpad on my keyboard, so I can't test that -key.

Nik



-- 
Please do not email me anything that you are not comfortable also sharing with 
the NSA, CIA ...



Bug#1024757: Editor: -key ignored

2022-12-04 Thread Kristian Nielsen
I did not manage to find a way to reproduce myself. But I found that
openscad has some debugging option that may provide additional information.

Can you try to run openscad with the --debug option:

  openscad --debug=scintillaeditor

and then reproduce the problem with the ENTER key and note down the output
from the openscad program?

When I run it, I see output like this:

  scintillaeditor:   KeyPress - modifiers: shift ctrl alt meta keypad group
  scintillaeditor:   KeyPress - modifiers: SHIFT ctrl alt meta keypad group

For every key press and key release, it logs the modifiers received with the
event. It doesn't log which key was pressed, but you should be able to match
key press to output line by looking when the output appears relative to the
key-presses.

It would be useful to know what is (if any) logged for

 - A "shift+enter" key press, which inserts a linebreak correctly
 - An "enter" keypress without shift that is ignored incorrectly
 - Try using both the normal and numeric-pad enter key
 - What is logged for another key that works normally (space, letters)

This information will hopefully give a clue to why the "enter" key doesn't
work on its own.

Based on this I can try to build an openscad binary with more detailed
debugging printouts to hopefully track down the root cause of the issue. In
case this becomes necessary, do you prefer to build openscad yourself from a
git branch/patch; or for me to supply a (signed) temporary .deb with the
extra debugging?

 - Kristian.



Bug#1024757: Editor: -key ignored

2022-11-27 Thread Kristian Nielsen
Kristian Nielsen  writes:

> I had some problems running openscad in my unstable/sid environment to try to
> reproduce this. I will try to solve this, but meanwhile...

I managed to run the latest openscad package in unstable. I did not see the
problem, the  key worked fine to insert a line break.

Anything special in your setup you can suggest is needed to reproduce the
problem?

 - Kristian.



Bug#1024757: Editor: -key ignored

2022-11-27 Thread Kristian Nielsen
"Dr. Nikolaus Klepp"  writes:

> Package: openscad
> Version: 2021.01-5+b2

> After yesterdays upgrade openscad ignores the -key
>
> Expected: 
> - press  --> editor performs linebreak.
>
> Observed:
> - press  --> nothing happen, the key is ignored.
> - press + --> editor performs linebreak.

Thanks for the report!
I had some problems running openscad in my unstable/sid environment to try to
reproduce this. I will try to solve this, but meanwhile...

> -key is working everywhere else. 

I believe openscad is using the scintilla widget for its editor. It looks
like packages such as juffed and octave are also using scintilla.

Can you test if the same problem occurs in one of the packages `juffed` and
`octave`, eg. by temporarily installing them? This would give a hint to
whether the problem is something general with scintilla, or specific to
openscad. (`octave --force-gui` opens octave with the editor).

For me, juffed and octave do not have the enter/shift+enter issue in latest
unstable/sid.

The new 2021.01-5+b2 should be a rebuild-only version for the libicu72
transition, there are no changes to openscad sources. But that doesn't
necessarily mean the problem is not with the openscad package, it could be
some interaction with the dependencies or something.

> The openscad 2021.01 Appimage also works as expected.

Useful info; this suggests it's not solely a problem with your environment,
eg. window manager or some such.

 - Kristian.



Bug#1024757: Editor: -key ignored

2022-11-24 Thread Dr. Nikolaus Klepp
Package: openscad
Version: 2021.01-5+b2
Severity: important
X-Debbugs-Cc: off...@klepp.biz

Dear Maintainer,

After yesterdays upgrade openscad ignores the -key

Expected: 
- press  --> editor performs linebreak.

Observed:
- press  --> nothing happen, the key is ignored.
- press + --> editor performs linebreak.

-key is working everywhere else. 
The openscad 2021.01 Appimage also works as expected.

Regards,
Nik

-- Package-specific info:
Output of /usr/share/bug/openscad:
$ glxinfo |grep 'OpenGL .* string:'
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon RX 6600 (navi23, LLVM 15.0.5, DRM 3.48, 
6.0.0-4-amd64)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 22.2.4
OpenGL core profile shading language version string: 4.60
OpenGL version string: 4.6 (Compatibility Profile) Mesa 22.2.4
OpenGL shading language version string: 4.60
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 22.2.4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

-- System Information:
Debian Release: bookworm/sid
merged-usr: no
Architecture: amd64 (x86_64)

Kernel: Linux 6.0.0-4-amd64 (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8), 
LANGUAGE=de_AT:de
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages openscad depends on:
ii  lib3mf11.8.1+ds-4
ii  libboost-filesystem1.74.0  1.74.0-17+b2
ii  libboost-program-options1.74.0 1.74.0-17+b2
ii  libboost-regex1.74.0 [libboost-regex1.74.0-icu72]  1.74.0-17+b2
ii  libc6  2.36-5
ii  libcairo2  1.16.0-6
ii  libdouble-conversion3  3.2.1-1
ii  libfontconfig1 2.13.1-4.5
ii  libfreetype6   2.12.1+dfsg-3
ii  libgcc-s1  12.2.0-9
ii  libgl1 1.5.0-1
ii  libglew2.2 2.2.0-4+b1
ii  libglib2.0-0   2.74.1-2
ii  libglu1-mesa [libglu1] 9.0.2-1.1
ii  libgmp10   2:6.2.1+dfsg1-1.1
ii  libharfbuzz0b  5.2.0-2+b1
ii  libmpfr6   4.1.0-3
ii  libopencsg11.5.0-1+b1
ii  libqscintilla2-qt5-15  2.11.6+dfsg-4+b1
ii  libqt5core5a   5.15.6+dfsg-2+b1
ii  libqt5dbus55.15.6+dfsg-2+b1
ii  libqt5gamepad5 5.15.6-2
ii  libqt5gui5 5.15.6+dfsg-2+b1
ii  libqt5multimedia5  5.15.6-2
ii  libqt5network5 5.15.6+dfsg-2+b1
ii  libqt5widgets5 5.15.6+dfsg-2+b1
ii  libspnav0  1.0-1
ii  libstdc++6 12.2.0-9
ii  libx11-6   2:1.8.1-2
ii  libxml22.9.14+dfsg-1.1+b2
ii  libzip41.7.3-1+b1

Versions of packages openscad recommends:
ii  openscad-mcad  2019.05-1

Versions of packages openscad suggests:
pn  geomview  
pn  librecad  
pn  meshlab   
pn  openscad-testing  

-- no debconf information